220 15158 <6695414.K4RlN6vp9O@tjmaciei-mobl4> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Inline variables - superior of templates and constexpr.
Date: Thu, 18 Dec 2014 17:53:23 -0800
Lines: 30
Approved: news@gmane.org
Message-ID: <6695414.K4RlN6vp9O@tjmaciei-mobl4>
References: <84da1bdc-3356-4c40-a29a-bdd4c0b058b4@isocpp.org> <dc397beb-021e-4d52-9dca-f65704622985@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 1418954014 24433 80.91.229.3 (19 Dec 2014 01:53:34 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 19 Dec 2014 01:53:34 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBFUKZ2SAKGQEIGOVOFA@isocpp.org Fri Dec 19 02:53:29 2014
Return-path: <std-proposals+bncBCB4TK757YBRBFUKZ2SAKGQEIGOVOFA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f200.google.com ([209.85.212.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBFUKZ2SAKGQEIGOVOFA@isocpp.org>)
	id 1Y1mkx-0003ht-GW
	for gclcip-std-proposals@m.gmane.org; Fri, 19 Dec 2014 02:53:27 +0100
Original-Received: by mail-wi0-f200.google.com with SMTP id ex7sf103276wid.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 18 Dec 2014 17:53:26 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version: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=/qiVWEVgqDUupbq5v2hYtGpUSm0pOOFStHUCw57M0U0=;
        b=PVY7pNw/3cWw7YTl24QkGwIk9uCFXAZdcu/B/RzkreCiMR4T983+hRZbyivFRpz4Oz
         3Rxg+WvemJ/ktRiBuvbfmgI84ApVWGBdLdUWuIuU1fioM3+rcqF9NevKDLcVcun2/LdC
         pQzD6ATEa7bSNAjxIQST1PORvi0lJ78Ujjt6zLcNFw4BktSWoa6sjf3epQg4lO+H0tBS
         S9NS7/b18TuB+h9NbOR9+PB+jU/Wr8FNWHmU9j1H5DyftXlFILWT/aPxuTm/vOLeL7rF
         yFkn++aAv9KFhlIIKQCLTPtn1KkB+zJViazJPjjqjLUeI7hRJSM7ABveWf8bnKF594Ox
         JNiQ==
X-Gm-Message-State: ALoCoQl0Og78tqlcwfGaz7y0SDEYRJnFEp1QUe4pDgMgDaamEHtvWrDUQ0hbBFgB6LiWuXsjb1nL
X-Received: by 10.152.5.2 with SMTP id o2mr731185lao.1.1418954006835;
        Thu, 18 Dec 2014 17:53:26 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.103.226 with SMTP id fz2ls34212wib.38.gmail; Thu, 18 Dec
 2014 17:53:25 -0800 (PST)
X-Received: by 10.180.98.138 with SMTP id ei10mr1180235wib.32.1418954005877;
        Thu, 18 Dec 2014 17:53:25 -0800 (PST)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id p15si840451wiv.42.2014.12.18.17.53.25
        for <std-proposals@isocpp.org>;
        Thu, 18 Dec 2014 17:53:25 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl4.localnet (jfdmzpr04-ext.jf.intel.com [134.134.137.73])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 0801411B997
	for <std-proposals@isocpp.org>; Thu, 18 Dec 2014 17:53:25 -0800 (PST)
User-Agent: KMail/4.14.3 (Linux/3.11.10-21-desktop; KDE/4.14.3; x86_64; ; )
In-Reply-To: <dc397beb-021e-4d52-9dca-f65704622985@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mail=thiago@macieira.org
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:15158
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/15158>

On Thursday 18 December 2014 16:18:13 sasho648 wrote:
> constexpr int EvaluateSpecialArrayIndex(int a)
> { return a * sizeof(int); }
> 
> array<int, 5> arr;
>     
> cout << arr[98] << endl; //compiles just fine, and produces undefined 
> behavior

How is that different from the following?

	int arr[5];
	cout << arr[98] << endl;

Both compile just fine and produce UB.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
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/.

.
