Skip to content

Commit 7f476cd

Browse files
committed
fix clang unused-function warning
1 parent 54782eb commit 7f476cd

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

include/fast_float/float_common.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,8 @@ template <typename UC> static constexpr uint64_t int_cmp_zeros() {
738738
template <typename UC> static constexpr int int_cmp_len() {
739739
return sizeof(uint64_t) / sizeof(UC);
740740
}
741-
template <typename UC> static constexpr UC const *str_const_nan() {
742-
return nullptr;
743-
}
741+
742+
template <typename UC> constexpr UC const *str_const_nan();
744743
template <> constexpr char const *str_const_nan<char>() { return "nan"; }
745744
template <> constexpr wchar_t const *str_const_nan<wchar_t>() { return L"nan"; }
746745
template <> constexpr char16_t const *str_const_nan<char16_t>() {
@@ -749,9 +748,8 @@ template <> constexpr char16_t const *str_const_nan<char16_t>() {
749748
template <> constexpr char32_t const *str_const_nan<char32_t>() {
750749
return U"nan";
751750
}
752-
template <typename UC> static constexpr UC const *str_const_inf() {
753-
return nullptr;
754-
}
751+
752+
template <typename UC> constexpr UC const *str_const_inf();
755753
template <> constexpr char const *str_const_inf<char>() { return "infinity"; }
756754
template <> constexpr wchar_t const *str_const_inf<wchar_t>() {
757755
return L"infinity";

0 commit comments

Comments
 (0)