diff options
Diffstat (limited to 'libstdc++-v3/include/std/format')
-rw-r--r-- | libstdc++-v3/include/std/format | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index 613016d..22dcb5f 100644 --- a/libstdc++-v3/include/std/format +++ b/libstdc++-v3/include/std/format @@ -2478,6 +2478,29 @@ namespace __format }; /// @} +#if defined _GLIBCXX_USE_WCHAR_T && __cpp_lib_format_ranges + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 3944. Formatters converting sequences of char to sequences of wchar_t + + namespace __format { struct __disabled; } + + // std::formatter<__disabled, C> uses the primary template, which is disabled. + template<> + struct formatter<char*, wchar_t> + : private formatter<__format::__disabled, wchar_t> { }; + template<> + struct formatter<const char*, wchar_t> + : private formatter<__format::__disabled, wchar_t> { }; + template<size_t _Nm> + struct formatter<char[_Nm], wchar_t> + : private formatter<__format::__disabled, wchar_t> { }; + template<class _Traits, class _Allocator> + struct formatter<basic_string<char, _Traits, _Allocator>, wchar_t> + : private formatter<__format::__disabled, wchar_t> { }; + template<class _Traits> + struct formatter<basic_string_view<char, _Traits>, wchar_t> + : private formatter<__format::__disabled, wchar_t> { }; +#endif /// @cond undocumented namespace __format |