220 21172 <CAFk2RUZcHzQXXfGaq1W_g5jB5kdBSJEGQHE-vZ9y27+Um3+eZQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: P0007R0: Constant View: A proposal for a
 std::as_const helper function template
Date: Fri, 2 Oct 2015 17:45:51 +0300
Lines: 19
Approved: news@gmane.org
Message-ID: <CAFk2RUZcHzQXXfGaq1W_g5jB5kdBSJEGQHE-vZ9y27+Um3+eZQ@mail.gmail.com>
References: <mum4tp$j5r$1@ger.gmane.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1443797163 26805 80.91.229.3 (2 Oct 2015 14:46:03 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 2 Oct 2015 14:46:03 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRBIFRXKYAKGQEZIBEU3Y@isocpp.org Fri Oct 02 16:45:58 2015
Return-path: <std-proposals+bncBC5JHI7A7ALRBIFRXKYAKGQEZIBEU3Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f197.google.com ([209.85.214.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBIFRXKYAKGQEZIBEU3Y@isocpp.org>)
	id 1Zi1at-0000mq-P4
	for gclcip-std-proposals@m.gmane.org; Fri, 02 Oct 2015 16:45:55 +0200
Original-Received: by obqc1 with SMTP id c1sf142636423obq.2
        for <gclcip-std-proposals@m.gmane.org>; Fri, 02 Oct 2015 07:45:54 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=QtbhECI/M0YszP1pwoG80nY061uH3yl0pdi0A1Dj4DU=;
        b=nLZ5vc2Oht67OaRJR7UrTdfA4XjVACJtW+7CR9W/OS1BXNIeFwdtPA+rKI7Z5tczrj
         lyoQ7SDn8KCK1GdIiev+ouFgtOluzEsJO5aATXMIY5KZNcGui6AePhMSErEAKmX0+bUv
         k8AjsC9uohyiqXnNWyLNz6QPaWVMYsRZSs6EIBVwG0/CGlX8QA7dO3ETCGcuxo9T18kh
         rYmRkRqQmtd0QRLly+21R3kUn55m/z7H/xis+/5diamh6dOOHJgqWcrBmoxoLgCMCMTM
         iV751BRX5Tsw35PAA13+rvxcPIaJTbSyGTO9e8vd8+MFkux6YV+PG+GCmWPNGK2pJl+d
         xMIg==
X-Gm-Message-State: ALoCoQmG+03Z9hoe+YA093qUKYGGCln2BVkKIv1q9gq5i7/gskn/SWPwL34Wgf4bYgiXQ+1jyO+H
X-Received: by 10.50.3.97 with SMTP id b1mr3929740igb.3.1443797154860;
        Fri, 02 Oct 2015 07:45:54 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.107.7 with SMTP id g7ls1650500qgf.98.gmail; Fri, 02 Oct
 2015 07:45:51 -0700 (PDT)
X-Received: by 10.31.131.141 with SMTP id f135mr10650014vkd.37.1443797151844;
        Fri, 02 Oct 2015 07:45:51 -0700 (PDT)
Original-Received: from mail-vk0-x236.google.com (mail-vk0-x236.google.com. [2607:f8b0:400c:c05::236])
        by mx.google.com with ESMTPS id v129si6170455vke.118.2015.10.02.07.45.51
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 02 Oct 2015 07:45:51 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c05::236 as permitted sender) client-ip=2607:f8b0:400c:c05::236;
Original-Received: by vkfp126 with SMTP id p126so61193558vkf.3
        for <std-proposals@isocpp.org>; Fri, 02 Oct 2015 07:45:51 -0700 (PDT)
X-Received: by 10.31.133.141 with SMTP id h135mr10848631vkd.85.1443797151691;
 Fri, 02 Oct 2015 07:45:51 -0700 (PDT)
Original-Received: by 10.103.37.195 with HTTP; Fri, 2 Oct 2015 07:45:51 -0700 (PDT)
In-Reply-To: <mum4tp$j5r$1@ger.gmane.org>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c05::236 as
 permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:21172
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/21172>

On 2 October 2015 at 17:38, Matthew Woehlke <mwoehlke.floss@gmail.com> wrote:
> While it's true that we want lifetime extension anyway, the reality is
> that std::as_const *also* doesn't work without core language changes,
> i.e. as a library-only solution it is incomplete. Moreover, I don't see
> that it cannot be made to work at all for an rvalue of a type that is
> not {copy,move}able without introducing mandatory copy elision. (The

Ah, yes, the rvalue overload is returning by value, which doesn't work for
forwarding cases. Then again, for forwarding cases, one can forward<const T>()
so perhaps that wasn't important.

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
