diff --git a/include/mbgl/util/convert.hpp b/include/mbgl/util/convert.hpp new file mode 100644 index 000000000..c2b3d9950 --- /dev/null +++ b/include/mbgl/util/convert.hpp @@ -0,0 +1,17 @@ +#include +#include +#include + +namespace mbgl { +namespace util { + +template::value>> +constexpr std::array convert(const std::array&from) { + std::array to {}; + std::copy(std::begin(from), std::end(from), std::begin(to)); + return to; +} + +} // namespace util +} // namespace mbgl diff --git a/src/mbgl/util/convert.cpp b/src/mbgl/util/convert.cpp new file mode 100644 index 000000000..97bfe9108 --- /dev/null +++ b/src/mbgl/util/convert.cpp @@ -0,0 +1,9 @@ +#include + +namespace mbgl { +namespace util { + +template std::array convert(const std::array&); + +} // namespace util +} // namespace mbgl