cesium-native 0.43.0
Loading...
Searching...
No Matches
SpanHelper.h
1#pragma once
2
3#include <span>
4
5namespace CesiumUtility {
12template <typename To, typename From>
13std::span<To> reintepretCastSpan(const std::span<From>& from) noexcept {
14 return std::span<To>(
15 reinterpret_cast<To*>(from.data()),
16 from.size() * sizeof(From) / sizeof(To));
17}
18} // namespace CesiumUtility
Utility classes for Cesium.
std::span< To > reintepretCastSpan(const std::span< From > &from) noexcept
This function converts between span types. This function has the same rules with C++ reintepret_cast ...
Definition SpanHelper.h:13