#pragma once #include #include namespace mbgl { template constexpr auto underlying_type(T t) -> typename std::underlying_type_t { return typename std::underlying_type_t(t); } template struct is_utf16char_like: std::false_type {}; template struct is_utf16char_like: is_utf16char_like {}; template <> struct is_utf16char_like: std::true_type {}; template <> struct is_utf16char_like: std::true_type {}; template <> struct is_utf16char_like: std::true_type {}; template using is_utf16char_like_pointer = std::integral_constant::value && is_utf16char_like::type>::value>; template typename std::enable_if::value && is_utf16char_like_pointer::value, OutPointer>::type utf16char_cast(InChar *in) { return reinterpret_cast(in); } } // namespace mbgl