summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-10-08 14:26:09 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-11-24 11:24:58 +0000
commitecc43c92151141e3e862a344f753516dc6d5d967 (patch)
tree678e50326a99657358f23162bf2fae1c678727bf /libstdc++-v3
parent58752dd237e95d06c080c7669f039a2c7cfac938 (diff)
downloadgcc-ecc43c92151141e3e862a344f753516dc6d5d967.tar.gz
libstdc++: Define deleted wchar_t overloads unconditionally [PR 98725]
We don't need to have <wchar.h> support in order to delete overloads for inserting wide characters into narrow streams. libstdc++-v3/ChangeLog: PR libstdc++/98725 * include/std/ostream (operator<<(basic_ostream<char, Tr>&, wchar_t)) (operator<<(basic_ostream<char, Tr>&, const wchar_t*)): Always define as deleted. Do not check _GLIBCXX_USE_WCHAR_T. (cherry picked from commit 9a89281c4005a51eeed058ca66bcce8df1dd1b24)
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/include/std/ostream4
1 files changed, 0 insertions, 4 deletions
diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream
index 722d4ff61b5..3569ee1a722 100644
--- a/libstdc++-v3/include/std/ostream
+++ b/libstdc++-v3/include/std/ostream
@@ -539,11 +539,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// The following deleted overloads prevent formatting character values as
// numeric values.
-#ifdef _GLIBCXX_USE_WCHAR_T
template<typename _Traits>
basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>&, wchar_t) = delete;
-#endif // _GLIBCXX_USE_WCHAR_T
#ifdef _GLIBCXX_USE_CHAR8_T
template<typename _Traits>
@@ -635,11 +633,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// The following deleted overloads prevent formatting strings as
// pointer values.
-#ifdef _GLIBCXX_USE_WCHAR_T
template<typename _Traits>
basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>&, const wchar_t*) = delete;
-#endif // _GLIBCXX_USE_WCHAR_T
#ifdef _GLIBCXX_USE_CHAR8_T
template<typename _Traits>