Skip to content
Snippets Groups Projects
Commit 3d9b3ddb authored by Joseph Faulls's avatar Joseph Faulls Committed by Jonathan Wakely
Browse files

libstdc++: Do not assume existence of char8_t codecvt facet

It is not required that codecvt<char8_t, char, mbstate_t> 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 for
	codecvt<char8_t, char, mbstate_t> facet.
parent 7e8e071c
No related branches found
No related tags found
No related merge requests found
......@@ -129,9 +129,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_STD_FACET(time_put<wchar_t>);
_GLIBCXX_STD_FACET(messages<wchar_t>);
#endif
#ifdef _GLIBCXX_USE_CHAR8_T
_GLIBCXX_STD_FACET(codecvt<char8_t, char, mbstate_t>);
#endif
#if __cplusplus >= 201103L
_GLIBCXX_STD_FACET(codecvt<char16_t, char, mbstate_t>);
_GLIBCXX_STD_FACET(codecvt<char32_t, char, mbstate_t>);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment