diff --git a/include/boost/locale/numpunct.hpp b/include/boost/locale/numpunct.hpp index 19e4f391..84af076e 100644 --- a/include/boost/locale/numpunct.hpp +++ b/include/boost/locale/numpunct.hpp @@ -11,6 +11,7 @@ #define BOOST_LOCALE_NUMPUNCT_HPP_INCLUDED #include +#include #include #include @@ -29,11 +30,13 @@ namespace boost { namespace locale { /// - Some backends may provide single char replacements of the encoded separators instead of falling back to the /// "C" locale. template - class numpunct_base : public std::numpunct { + class numpunct : public std::numpunct { + BOOST_LOCALE_ASSERT_IS_SUPPORTED(CharType); + public: using string_type = std::numpunct::string_type; - numpunct_base(size_t refs = 0) : std::numpunct(refs) {} + numpunct(size_t refs = 0) : std::numpunct(refs) {} /// Provides the character to use as decimal point possibly encoded into multiple code units string_type decimal_point_str() const { return do_decimal_point_str(); } @@ -79,32 +82,6 @@ namespace boost { namespace locale { return string_type(t, t + sizeof(t) - 1); } }; - - template - struct numpunct; - - template<> - struct numpunct : numpunct_base { - numpunct(size_t refs = 0) : numpunct_base(refs) {} - }; - - template<> - struct numpunct : numpunct_base { - numpunct(size_t refs = 0) : numpunct_base(refs) {} - }; - -#ifdef BOOST_LOCALE_ENABLE_CHAR16_T - template<> - struct numpunct : numpunct_base { - numpunct(size_t refs = 0) : numpunct_base(refs) {} - }; -#endif -#ifdef BOOST_LOCALE_ENABLE_CHAR32_T - template<> - struct numpunct : numpunct_base { - numpunct(size_t refs = 0) : numpunct_base(refs) {} - }; -#endif }} // namespace boost::locale #endif \ No newline at end of file