10 using RawTo = std::remove_const_t<To>;
11 using RawFrom = std::remove_const_t<From>;
12 static_assert(!std::is_pointer_v<RawTo>,
"'To' shouldn't be pointer");
13 static_assert(!std::is_reference_v<RawTo>,
"'To' shouldn't be reference");
14 using CastTo = std::conditional_t<std::is_const_v<From>,
const RawTo,
To>;
15 static_assert(!std::is_same_v<RawTo, RawFrom>);
16 static_assert(std::is_base_of_v<RawTo, RawFrom>);
27 using RawTo = std::remove_const_t<To>;
28 using RawFrom = std::remove_const_t<From>;
29 static_assert(!std::is_pointer_v<RawTo>,
"'To' shouldn't be pointer");
30 static_assert(!std::is_reference_v<RawTo>,
"'To' shouldn't be reference");
31 using CastTo = std::conditional_t<std::is_const_v<From>,
const RawTo,
To>;
32 static_assert(!std::is_same_v<RawFrom, RawTo>);
33 static_assert(std::is_base_of_v<RawFrom, RawTo>);