73 if constexpr (std::is_same_v<T, float>)
75 else if constexpr (std::is_same_v<T, double>)
77 else if constexpr (std::is_same_v<T, long double>)
80 static_assert(std::is_same_v<T, void>);
81 }
catch (std::invalid_argument &e) {
84 .ec = std::errc::invalid_argument,
86 }
catch (std::out_of_range &e) {
89 .ec = std::errc::result_out_of_range,
108 if constexpr (std::is_same_v<T, signed char>)
109 value =
static_cast<signed char>(
111 else if constexpr (std::is_same_v<T, short>)
112 value =
static_cast<short>(
114 else if constexpr (std::is_same_v<T, int>)
116 else if constexpr (std::is_same_v<T, long>)
118 else if constexpr (std::is_same_v<T, long long>)
120 else if constexpr (std::is_same_v<T, unsigned char>)
121 value =
static_cast<unsigned char>(
123 else if constexpr (std::is_same_v<T, unsigned short>)
124 value =
static_cast<unsigned short>(
126 else if constexpr (std::is_same_v<T, unsigned int>)
127 value =
static_cast<unsigned int>(
129 else if constexpr (std::is_same_v<T, unsigned long>)
131 else if constexpr (std::is_same_v<T, unsigned long long>)
134 static_assert(std::is_same_v<T, void>);
135 }
catch (std::invalid_argument &e) {
138 .ec = std::errc::invalid_argument,
140 }
catch (std::out_of_range &e) {
143 .ec = std::errc::result_out_of_range,