summaryrefslogtreecommitdiff
path: root/include/mbgl/util
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-26 17:53:49 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-27 13:08:53 +0300
commitf3146e43cd19bdf85957d6d62132ac7c31eacc50 (patch)
tree34ba28b265d95911ccc07915b5162eb8edeba792 /include/mbgl/util
parent34ab7be2251bc8f6afca29c7a2ce3b6f1bc7cb10 (diff)
downloadqtlocation-mapboxgl-f3146e43cd19bdf85957d6d62132ac7c31eacc50.tar.gz
[core] ValueFactory for `expression::formatted`, other improvements
Diffstat (limited to 'include/mbgl/util')
-rw-r--r--include/mbgl/util/traits.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/mbgl/util/traits.hpp b/include/mbgl/util/traits.hpp
index 5b9401aad7..e37144e60e 100644
--- a/include/mbgl/util/traits.hpp
+++ b/include/mbgl/util/traits.hpp
@@ -1,7 +1,9 @@
#pragma once
+#include <array>
#include <cstdint>
#include <type_traits>
+#include <vector>
namespace mbgl {
@@ -25,4 +27,12 @@ typename std::enable_if<is_utf16char_like<InChar>::value && is_utf16char_like_po
return reinterpret_cast<OutPointer>(in);
}
+template <typename T>
+struct is_linear_container : std::false_type {};
+
+template <typename T, std::size_t N>
+struct is_linear_container<std::array<T, N>> : std::true_type {};
+template <typename... Ts>
+struct is_linear_container<std::vector<Ts...>> : std::true_type {};
+
} // namespace mbgl