diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-09-26 17:53:49 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-09-27 13:08:53 +0300 |
commit | f3146e43cd19bdf85957d6d62132ac7c31eacc50 (patch) | |
tree | 34ba28b265d95911ccc07915b5162eb8edeba792 /include/mbgl/util/traits.hpp | |
parent | 34ab7be2251bc8f6afca29c7a2ce3b6f1bc7cb10 (diff) | |
download | qtlocation-mapboxgl-f3146e43cd19bdf85957d6d62132ac7c31eacc50.tar.gz |
[core] ValueFactory for `expression::formatted`, other improvements
Diffstat (limited to 'include/mbgl/util/traits.hpp')
-rw-r--r-- | include/mbgl/util/traits.hpp | 10 |
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 |