1 #include <mbgl/util/util.hpp>
2 
3 #include <array>
4 #include <type_traits>
5 #include <utility>
6 
7 namespace mbgl {
8 namespace util {
9 
10 template<typename To, typename From, std::size_t Size,
11          typename = std::enable_if_t<std::is_convertible<From, To>::value>>
convert(const std::array<From,Size> & from)12 MBGL_CONSTEXPR std::array<To, Size> convert(const std::array<From, Size>&from) {
13     std::array<To, Size> to {{}};
14     std::copy(std::begin(from), std::end(from), std::begin(to));
15     return to;
16 }
17 
18 } // namespace util
19 } // namespace mbgl
20