cesium-native
0.43.0
Loading...
Searching...
No Matches
SpanHelper.h
1
#pragma once
2
3
#include <span>
4
5
namespace
CesiumUtility
{
12
template
<
typename
To,
typename
From>
13
std::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
CesiumUtility
Utility classes for Cesium.
Definition
TilesetExternals.h:17
CesiumUtility::reintepretCastSpan
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
CesiumUtility
include
CesiumUtility
SpanHelper.h
Generated by
1.12.0