public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4267] libstdc++: Define deleted wchar_t overloads unconditionally [PR 98725]
@ 2021-10-09 0:15 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-10-09 0:15 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:9a89281c4005a51eeed058ca66bcce8df1dd1b24
commit r12-4267-g9a89281c4005a51eeed058ca66bcce8df1dd1b24
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Oct 8 14:26:09 2021 +0100
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.
Diff:
---
libstdc++-v3/include/std/ostream | 4 ----
1 file changed, 4 deletions(-)
diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream
index 7d39c5706d5..4d7b9b4ef0b 100644
--- a/libstdc++-v3/include/std/ostream
+++ b/libstdc++-v3/include/std/ostream
@@ -533,11 +533,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>
@@ -629,11 +627,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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-09 0:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-09 0:15 [gcc r12-4267] libstdc++: Define deleted wchar_t overloads unconditionally [PR 98725] Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).