@@ -260,90 +260,6 @@ struct is_supported_char_type
260260 > {
261261};
262262
263- #if 0
264- union float_union {
265- float f;
266- uint32_t bits;
267- };
268-
269- union double_union {
270- double f;
271- uint64_t bits;
272- };
273-
274- template <typename T, typename U> constexpr T bit_cast(const U &u);
275-
276- template <>
277- fastfloat_really_inline constexpr float bit_cast(const uint32_t &u) {
278- float_union fu;
279- fu.bits = u;
280- return fu.f;
281- }
282-
283- template <>
284- fastfloat_really_inline constexpr double bit_cast(const uint64_t &u) {
285- double_union fu;
286- fu.bits = u;
287- return fu.f;
288- }
289-
290- template <>
291- fastfloat_really_inline constexpr uint32_t bit_cast(const float &u) {
292- float_union fu;
293- fu.f = u;
294- return fu.bits;
295- }
296-
297- template <>
298- fastfloat_really_inline constexpr uint64_t bit_cast(const double &u) {
299- double_union fu;
300- fu.f = u;
301- return fu.bits;
302- }
303-
304- #ifdef __STDCPP_FLOAT16_T__
305- union float16_union {
306- std::float16_t f;
307- uint16_t bits;
308- };
309-
310- template <>
311- fastfloat_really_inline constexpr uint16_t bit_cast(const std::float16_t &u) {
312- float16_union fu;
313- fu.f = u;
314- return fu.bits;
315- }
316-
317- template <>
318- fastfloat_really_inline constexpr std::float16_t bit_cast(const uint16_t &u) {
319- float16_union fu;
320- fu.bits = u;
321- return fu.f;
322- }
323- #endif // __STDCPP_FLOAT16_T__
324-
325- #ifdef __STDCPP_BFLOAT16_T__
326- union bfloat16_union {
327- std::bfloat16_t f;
328- uint16_t bits;
329- };
330-
331- template <>
332- fastfloat_really_inline constexpr uint16_t bit_cast(const std::bfloat16_t &u) {
333- bfloat16_union fu;
334- fu.f = u;
335- return fu.bits;
336- }
337-
338- template <>
339- fastfloat_really_inline constexpr std::bfloat16_t bit_cast(const uint16_t &u) {
340- bfloat16_union fu;
341- fu.bits = u;
342- return fu.f;
343- }
344- #endif // __STDCPP_BFLOAT16_T__
345- #endif // 0
346-
347263// Compares two ASCII strings in a case insensitive manner.
348264template <typename UC>
349265inline FASTFLOAT_CONSTEXPR14 bool
@@ -1078,36 +994,6 @@ to_float(bool negative, adjusted_mantissa am, T &value) {
1078994#endif
1079995}
1080996
1081- #if 0
1082- #ifdef __STDCPP_FLOAT16_T__
1083- template <>
1084- fastfloat_really_inline void to_float<std::float16_t>(bool negative,
1085- adjusted_mantissa am,
1086- std::float16_t &value) {
1087- constexpr int mantissa_bits =
1088- binary_format<std::float16_t>::mantissa_explicit_bits();
1089- value = bit_cast<std::float16_t>(
1090- uint16_t(am.mantissa | (uint16_t(am.power2) << mantissa_bits) |
1091- (negative ? 0x8000 : 0)));
1092- }
1093-
1094- #endif // __STDCPP_FLOAT16_T__
1095-
1096- #ifdef __STDCPP_BFLOAT16_T__
1097- template <>
1098- fastfloat_really_inline void to_float<std::bfloat16_t>(bool negative,
1099- adjusted_mantissa am,
1100- std::bfloat16_t &value) {
1101- constexpr int mantissa_bits =
1102- binary_format<std::bfloat16_t>::mantissa_explicit_bits();
1103- value = bit_cast<std::bfloat16_t>(
1104- uint16_t(am.mantissa | (uint16_t(am.power2) << mantissa_bits) |
1105- (negative ? 0x8000 : 0)));
1106- }
1107-
1108- #endif // __STDCPP_BFLOAT16_T__
1109- #endif // 0
1110-
1111997template <typename = void > struct space_lut {
1112998 static constexpr bool value[] = {
1113999 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 commit comments