From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126019 invoked by alias); 13 Nov 2016 21:10:32 -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 125907 invoked by uid 89); 13 Nov 2016 21:10:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Sun, 13 Nov 2016 21:10:28 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7624C6AD0; Sun, 13 Nov 2016 21:10:27 +0000 (UTC) Received: from localhost (ovpn-116-20.ams2.redhat.com [10.36.116.20]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uADLAP66010435; Sun, 13 Nov 2016 16:10:25 -0500 Date: Sun, 13 Nov 2016 21:10:00 -0000 From: Jonathan Wakely To: Ville Voutilainen Cc: "gcc-patches@gcc.gnu.org" , libstdc++ Subject: Re: [v3 PATCH] Implement P0504R0 (Revisiting in-place tag types for any/optional/variant). Message-ID: <20161113211024.GJ21992@redhat.com> References: <20161113210252.GH21992@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20161113210252.GH21992@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.1 (2016-10-04) X-SW-Source: 2016-11/txt/msg01251.txt.bz2 On 13/11/16 21:02 +0000, Jonathan Wakely wrote: >On 12/11/16 21:24 +0200, Ville Voutilainen wrote: >>+ inline in_place_t in_place{}; >>+ >>+ template struct in_place_type_t >>+ { >>+ explicit in_place_type_t() = default; >>+ }; >>+ >>+ template >>+ in_place_type_t<_Tp> in_place_type{}; >>+ >>+ template struct in_place_index_t >>+ { >>+ explicit in_place_index_t() = default; >>+ }; >>+ >>+ template >>+ in_place_index_t<_Idx> in_place_index{}; > >I was told there's a Core issue that says these are not actually >inline variables unless they say "inline". Not sure which issue that >is, but G++ does the right thing and makes them globally unique, >rather than having internal linkage. > >(At LWG's request P0504R0 marked them inline just to be safe.) > >OK for trunk, thanks. Oh, they aren't actually constexpr in your patch, so non-const, and so don't get internal linkage. But they *should* be constexpr, please add that to all three, and add inline to the two variable templates.