12 template<
typename TSuperset,
typename TSubset>
15 std::is_integral_v<TSuperset> && std::is_integral_v<TSubset>
18 ((std::is_unsigned_v<TSuperset>
19 == std::is_unsigned_v<TSubset>) &&(
sizeof(TSuperset) >=
sizeof(TSubset)))
21 || ((std::is_unsigned_v<TSuperset> != std::is_unsigned_v<TSubset>) &&(
22 sizeof(TSuperset) >
sizeof(TSubset))))>;
25 template<
typename T0,
typename T1>
27 (
sizeof(T0) >
sizeof(T1)),
29 std::conditional_t<((
sizeof(T0) ==
sizeof(T1)) && std::is_unsigned_v<T0> && std::is_signed_v<T1>), T0, T1>>;
32 template<
typename T0,
typename T1>
34 (
sizeof(T0) <
sizeof(T1)),
36 std::conditional_t<((
sizeof(T0) ==
sizeof(T1)) && std::is_signed_v<T0> && std::is_unsigned_v<T1>), T0, T1>>;
40 template<
typename T0,
typename T1>
42 (std::is_unsigned_v<T0> == std::is_unsigned_v<T1>),
44 std::is_unsigned_v<T0>,
45 std::conditional_t<(
sizeof(T0) <
sizeof(T1)), T1, T0>,
46 std::conditional_t<(
sizeof(T0) <
sizeof(T1)), T0, T1>>,
47 std::conditional_t<std::is_unsigned_v<T0>, T0, T1>>;
51 template<
typename T0,
typename T1>
53 (std::is_unsigned_v<T0> == std::is_unsigned_v<T1>),
54 std::conditional_t<(
sizeof(T0) >
sizeof(T1)), T0, T1>,
55 std::conditional_t<std::is_signed_v<T0>, T0, T1>>;