MCPcopy Create free account
hub / github.com/LAStools/LAStools / conditional_static_cast

Function conditional_static_cast

src/json.hpp:4050–4053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4048// to avoid useless casts (see https://github.com/nlohmann/json/issues/2893#issuecomment-889152324)
4049template < typename T, typename U, enable_if_t < !std::is_same<T, U>::value, int > = 0 >
4050T conditional_static_cast(U value)
4051{
4052 return static_cast<T>(value);
4053}
4054
4055template<typename T, typename U, enable_if_t<std::is_same<T, U>::value, int> = 0>
4056T conditional_static_cast(U value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected