From: Jonathan Wakely <jwakely@redhat.com>
To: Ville Voutilainen <ville.voutilainen@gmail.com>
Cc: libstdc++ <libstdc++@gcc.gnu.org>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [v3 PATCH] Implement LWG 2221, No formatted output operator for nullptr
Date: Mon, 04 Dec 2017 23:04:00 -0000 [thread overview]
Message-ID: <20171204230424.GA31922@redhat.com> (raw)
In-Reply-To: <CAFk2RUa_FkNpgnu3nJw4ZdNnuDx4+tmcM045vuXFhM3pivLp5g@mail.gmail.com>
On 03/12/17 23:08 +0200, Ville Voutilainen wrote:
>Tested on Linux-x64.
>
>2017-11-14 Ville Voutilainen <ville.voutilainen@gmail.com>
>
> Implement LWG 2221
> * include/std/ostream (operator<<(nullptr_t)): New.
> * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New.
>diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream
>index f7cab03..18011bc 100644
>--- a/libstdc++-v3/include/std/ostream
>+++ b/libstdc++-v3/include/std/ostream
>@@ -245,6 +245,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> operator<<(const void* __p)
> { return _M_insert(__p); }
>
>+#if __cplusplus > 201402L
>+ __ostream_type&
>+ operator<<(nullptr_t)
>+ { return *this << "nullptr"; }
>+#endif
As discussed on IRC, this requires a new symbol to be exported for the
std::ostream and std::wostream explicit instantiations, or the new
test will fail to link at -O0.
That should wait for stage 1.
next prev parent reply other threads:[~2017-12-04 23:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-03 21:08 Ville Voutilainen
2017-12-04 23:04 ` Jonathan Wakely [this message]
2019-01-10 13:15 ` Jonathan Wakely
2019-01-10 21:27 ` Rainer Orth
2019-01-11 0:01 ` Jonathan Wakely
2019-01-11 9:07 ` Rainer Orth
2019-01-11 11:01 ` Jonathan Wakely
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=20171204230424.GA31922@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=ville.voutilainen@gmail.com \
/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).