Skip to content

Commit 865bd65

Browse files
lemiretoughengineer
authored andcommitted
specialize for std::float32_t and std::float64_t explicitly
1 parent e9438e6 commit 865bd65

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/fast_float/float_common.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,16 @@ constexpr chars_format adjust_for_feature_macros(chars_format fmt) {
12461246
}
12471247
} // namespace detail
12481248

1249+
1250+
#ifdef __STDCPP_FLOAT64_T__
1251+
template <>
1252+
struct binary_format<std::float64_t> : public binary_format<double> {};
1253+
#endif
1254+
#ifdef __STDCPP_FLOAT32_T__
1255+
template <>
1256+
struct binary_format<std::float32_t> : public binary_format<float> {};
1257+
#endif
1258+
12491259
} // namespace fast_float
12501260

12511261
#endif

0 commit comments

Comments
 (0)