diff options
Diffstat (limited to 'include/mbgl/util')
-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 |