220 15275 <CAFk2RUY+M=HvaqmY46aoS9+4_yQ6MihC1JXqdyHPqkpMxJHuVA@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: Re: Some constexpr changes.
Date: Wed, 24 Dec 2014 11:22:34 +0200
Lines: 31
Approved: news@gmane.org
Message-ID: <CAFk2RUY+M=HvaqmY46aoS9+4_yQ6MihC1JXqdyHPqkpMxJHuVA@mail.gmail.com>
References: <b849d2db-4d2b-4cb4-b31f-436a4f807efd@isocpp.org>
	<d3a9db12-60d0-4606-a6fb-f95b6cabecb3@isocpp.org>
	<CAFk2RUYATBsqaxdH-XDrvAntwSatRcJC2SUD=RMwgkjjUHwUDQ@mail.gmail.com>
	<16df9eb7-5793-40b1-96c5-f98cd6ffcb7f@isocpp.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 1419412963 25253 80.91.229.3 (24 Dec 2014 09:22:43 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 24 Dec 2014 09:22:43 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRBWUL5KSAKGQEMLBKGYY@isocpp.org Wed Dec 24 10:22:37 2014
Return-path: <std-proposals+bncBC5JHI7A7ALRBWUL5KSAKGQEMLBKGYY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f198.google.com ([209.85.223.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBWUL5KSAKGQEMLBKGYY@isocpp.org>)
	id 1Y3i9M-00007S-N6
	for gclcip-std-proposals@m.gmane.org; Wed, 24 Dec 2014 10:22:36 +0100
Original-Received: by mail-ie0-f198.google.com with SMTP id y20sf43209861ier.9
        for <gclcip-std-proposals@m.gmane.org>; Wed, 24 Dec 2014 01:22:35 -0800 (PST)
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:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=Gx+CoFD88ETn0wcbdSmNKxaQDcRm7IJrDPg9wEVNBDo=;
        b=EwRUCTXIrGXjWeFYz+VaXnNZQ+eoTx56TlHWadzmkVGdtNa8xsbNOEVqJcnGwhZTXU
         Ish2ng8XZb8uHsxUfzUPaYtEt6QK9HNKvH0KMC7YZnaUYFRTZN4kuv0zBHo2pZ6QQAh9
         W3r2XtIcn25tupRtBA4gS5wgh2QnC1fk/DmhU8Ildc/XoBSyhVqNVqlL/5dJxYNuR1ow
         NayXHxmHiKofoqhAoGaSnl4EuPvMrSMAmpB8IGs+Ba62gkg9x+fLOZI8WMAaBhQheUcU
         RufX36HYX3g64bP2ijy8t7Px++ogxQO16CJqIrdrlOoOjjpUOt5nmowjd+iKUqy5wn5H
         Ia3Q==
X-Gm-Message-State: ALoCoQk7MOj6uKYn4Z7gBv2RWs3c3sIplNdVMAYpEwu98hRtYVUQL5OCpE7AV8x/qeUwEWeZTKc3
X-Received: by 10.182.110.196 with SMTP id ic4mr24778722obb.41.1419412955312;
        Wed, 24 Dec 2014 01:22:35 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.116.162 with SMTP id jx2ls2473872obb.83.gmail; Wed, 24 Dec
 2014 01:22:34 -0800 (PST)
X-Received: by 10.60.84.196 with SMTP id b4mr19201347oez.49.1419412954753;
        Wed, 24 Dec 2014 01:22:34 -0800 (PST)
Original-Received: from mail-ob0-x236.google.com (mail-ob0-x236.google.com. [2607:f8b0:4003:c01::236])
        by mx.google.com with ESMTPS id e9si14033629obr.50.2014.12.24.01.22.34
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 24 Dec 2014 01:22:34 -0800 (PST)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:4003:c01::236 as permitted sender) client-ip=2607:f8b0:4003:c01::236;
Original-Received: by mail-ob0-f182.google.com with SMTP id wo20so28692310obc.13
        for <std-proposals@isocpp.org>; Wed, 24 Dec 2014 01:22:34 -0800 (PST)
X-Received: by 10.182.50.225 with SMTP id f1mr19031533obo.45.1419412954626;
 Wed, 24 Dec 2014 01:22:34 -0800 (PST)
Original-Received: by 10.76.154.2 with HTTP; Wed, 24 Dec 2014 01:22:34 -0800 (PST)
In-Reply-To: <16df9eb7-5793-40b1-96c5-f98cd6ffcb7f@isocpp.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:4003:c01::236 as
 permitted sender) smtp.mail=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-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:15275
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/15275>

On 23 December 2014 at 20:01, sasho648 <sasho648@mail.bg> wrote:
>> How does this part change anything from the status quo?
> It's different in that evaluating the function at compile-time wouldn't
> produce any run-time code.

Neither does the existing evaluation of a constant expression, if the
target context of that expression is a constexpr variable. I guess
you want to be able to guarantee that target contexts that can be
either constant expression or runtime values, like indexing operator
arguments would benefit from being required to be constant expressions.
There are indirect ways to do that; instead of writing

myArray[getSomeValue()];

one would need

constexpr int foo = getSomeValue();
myArray[foo];

There are, naturally, situations where that is infeasible. For such situations,
perhaps we'd need to allow constexpr lambdas instead of making changes
or additions to constexpr functions?

-- 

--- 
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/.

.
