#pragma once #include namespace CesiumUtility { /** * @brief This function converts between span types. This function * has the same rules with C++ reintepret_cast * https://en.cppreference.com/w/cpp/language/reinterpret_cast. So please use it * carefully */ template std::span reintepretCastSpan(const std::span& from) noexcept { return std::span( reinterpret_cast(from.data()), from.size() * sizeof(From) / sizeof(To)); } } // namespace CesiumUtility