From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106341 invoked by alias); 4 Dec 2017 23:04:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 106322 invoked by uid 89); 4 Dec 2017 23:04:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Dec 2017 23:04:27 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A88EC6A7C1; Mon, 4 Dec 2017 23:04:25 +0000 (UTC) Received: from localhost (unknown [10.33.36.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 401A817C40; Mon, 4 Dec 2017 23:04:25 +0000 (UTC) Date: Mon, 04 Dec 2017 23:04:00 -0000 From: Jonathan Wakely To: Ville Voutilainen Cc: libstdc++ , "gcc-patches@gcc.gnu.org" Subject: Re: [v3 PATCH] Implement LWG 2221, No formatted output operator for nullptr Message-ID: <20171204230424.GA31922@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.1 (2017-09-22) X-SW-Source: 2017-12/txt/msg00176.txt.bz2 On 03/12/17 23:08 +0200, Ville Voutilainen wrote: >Tested on Linux-x64. > >2017-11-14 Ville Voutilainen > > 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.