diff --git a/format.cc b/format.cc index 362e702a..fc414fac 100644 --- a/format.cc +++ b/format.cc @@ -1132,24 +1132,6 @@ template int fmt::internal::CharTraits::format_float( wchar_t *buffer, std::size_t size, const wchar_t *format, unsigned width, int precision, long double value); -template <> template <> char* fmt::BasicWriter::append_float_length( char* format_ptr) { return format_ptr; } -template <> template <> wchar_t* fmt::BasicWriter::append_float_length( wchar_t* format_ptr) { return format_ptr; } - -template <> template <> char* fmt::BasicWriter::append_float_length( char* format_ptr) { return format_ptr; } -template <> template <> wchar_t* fmt::BasicWriter::append_float_length( wchar_t* format_ptr) { return format_ptr; } - -template <> template <> char* fmt::BasicWriter::append_float_length( char* format_ptr) -{ - *format_ptr++ = 'L'; - return format_ptr; -} - -template <> template <> wchar_t* fmt::BasicWriter::append_float_length( wchar_t* format_ptr) -{ - *format_ptr++ = 'L'; - return format_ptr; -} - #if _MSC_VER # pragma warning(pop) #endif diff --git a/format.h b/format.h index 1d1a6eb9..4fd237fd 100644 --- a/format.h +++ b/format.h @@ -1494,7 +1494,7 @@ class BasicWriter { void operator<<(typename internal::CharTraits::UnsupportedStrType); template - Char* append_float_length(Char* format_ptr); + Char* append_float_length(Char* format_ptr) { return format_ptr; } friend class internal::ArgFormatter; friend class internal::PrintfFormatter; @@ -1981,6 +1981,16 @@ void BasicWriter::write_double( } } +template <> template <> inline char* BasicWriter::append_float_length( char* format_ptr) { + *format_ptr++ = 'L'; + return format_ptr; +} + +template <> template <> inline wchar_t* BasicWriter::append_float_length( wchar_t* format_ptr) { + *format_ptr++ = 'L'; + return format_ptr; +} + /** \rst This template provides operations for formatting and writing data into