It is not required that codecvt facet be supported by the locale, nor is it added as part of the default locale. This can lead to dangerous behaviour when static_cast. libstdc++-v3/ChangeLog: * include/bits/locale_classes.tcc: Remove check. --- libstdc++-v3/include/bits/locale_classes.tcc | 3 --- 1 file changed, 3 deletions(-) diff --git a/libstdc++-v3/include/bits/locale_classes.tcc b/libstdc++-v3/include/bits/locale_classes.tcc index 94838cd7796..2351dd5bcfb 100644 --- a/libstdc++-v3/include/bits/locale_classes.tcc +++ b/libstdc++-v3/include/bits/locale_classes.tcc @@ -129,9 +129,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_STD_FACET(time_put); _GLIBCXX_STD_FACET(messages); #endif -#ifdef _GLIBCXX_USE_CHAR8_T - _GLIBCXX_STD_FACET(codecvt); -#endif #if __cplusplus >= 201103L _GLIBCXX_STD_FACET(codecvt); _GLIBCXX_STD_FACET(codecvt); -- 2.34.1