public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r11-9295] libstdc++: Define deleted wchar_t overloads unconditionally [PR 98725]
Date: Wed, 24 Nov 2021 11:51:48 +0000 (GMT)	[thread overview]
Message-ID: <20211124115148.E15733857C6C@sourceware.org> (raw)

https://gcc.gnu.org/g:ecc43c92151141e3e862a344f753516dc6d5d967

commit r11-9295-gecc43c92151141e3e862a344f753516dc6d5d967
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.
    
    (cherry picked from commit 9a89281c4005a51eeed058ca66bcce8df1dd1b24)

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 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>


                 reply	other threads:[~2021-11-24 11:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211124115148.E15733857C6C@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).