220 6785 <dc22cdeb-f06b-43f4-859f-7689a7329215@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Christian Kaeser <christiankaeser87@googlemail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: enumeration pack and `__enumerator__`
 template variable
Date: Sun, 29 Sep 2013 12:05:24 -0700 (PDT)
Lines: 88
Approved: news@gmane.org
Message-ID: <dc22cdeb-f06b-43f4-859f-7689a7329215@isocpp.org>
References: <fa498a07-e043-4262-aa79-738e18fbd860@isocpp.org> <16581f55-7acb-4b90-8235-2a5384065960@isocpp.org> <3297ee13-15a1-4645-825b-7324f6831864@isocpp.org>
 <4457181.bkIbsFcUUi@tjmaciei-mobl2>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_67_22232760.1380481525878"
X-Trace: ger.gmane.org 1380481526 15244 80.91.229.3 (29 Sep 2013 19:05:26 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 29 Sep 2013 19:05:26 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCMLHAHBU4DRB57TUGJAKGQEOC7QLLY@isocpp.org Sun Sep 29 21:05:32 2013
Return-path: <std-proposals+bncBCMLHAHBU4DRB57TUGJAKGQEOC7QLLY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f199.google.com ([209.85.223.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCMLHAHBU4DRB57TUGJAKGQEOC7QLLY@isocpp.org>)
	id 1VQMJ7-0007MJ-I1
	for gclcip-std-proposals@m.gmane.org; Sun, 29 Sep 2013 21:05:29 +0200
Original-Received: by mail-ie0-f199.google.com with SMTP id e14sf16237914iej.6
        for <gclcip-std-proposals@m.gmane.org>; Sun, 29 Sep 2013 12:05:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=ADcWLSQS6/rYzHooYMNkB4xh9p/RlENNMPckTNsRMaI=;
        b=07bjkPtgMZHolizW8HYhV2FdiojA+ikvf1aCK2qu6z20GFYfR54opEpdXAzd/P7tYN
         USTsTjYdRqk/lZteJlYJiQodZSYyq2TnkxiNvB9QS4G24uRmPp/PNqVC18S9Ax4St6Ci
         1c0UxCcDGnBI+I5v80+Ng5opseLEuKn9W5UOnObfHRKxwTo6f2WOKVX2pWZc08w1DXFX
         fHGqcXYUfp2Y2JZk7eG58gPi/nltMV0OjLbEVr/NuinyDLbGJlV5tLXz7cWCp0y3Zx6Y
         jiBV8M3HmzvVVvaSBMvwS3xwwMndYWmzD91vCYK3oy/IJc0yy4fg2pcg25C/y3VyiLd0
         PWQg==
X-Received: by 10.50.114.66 with SMTP id je2mr9966565igb.5.1380481528241;
        Sun, 29 Sep 2013 12:05:28 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.23.12 with SMTP id i12ls1295718igf.8.canary; Sun, 29 Sep
 2013 12:05:27 -0700 (PDT)
X-Received: by 10.50.138.138 with SMTP id qq10mr367004igb.3.1380481527657;
        Sun, 29 Sep 2013 12:05:27 -0700 (PDT)
In-Reply-To: <4457181.bkIbsFcUUi@tjmaciei-mobl2>
X-Original-Sender: christiankaeser87@googlemail.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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:6785
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/6785>

------=_Part_67_22232760.1380481525878
Content-Type: text/plain; charset=ISO-8859-1

Now I remember once reading a post on your blog about the topic, very 
interesting stuff: 
http://www.macieira.org/blog/2011/07/table-driven-methods-with-no-relocations/

To allow implementations to optimize for fewer relocations, maybe a better 
interface would indeed be to provide functions instead of an array, as just 
suggested by Andrew before.

So  static constexpr const char* name(size_t index);
Or, should string_view be ready in time: static constexpr string_view 
name(size_t index);


On Sunday, 29 September 2013 20:29:41 UTC+2, Thiago Macieira wrote:
>
> On domingo, 29 de setembro de 2013 07:33:30, Andrew Tomazos wrote: 
> >             static constexpr const char* names[]; 
>
> Arrays of pointers implies relocations. You may want to avoid this. 
>
> -- 
> 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/.

------=_Part_67_22232760.1380481525878
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Now I remember once reading a post on your blog about the =
topic, very interesting stuff: http://www.macieira.org/blog/2011/07/table-d=
riven-methods-with-no-relocations/<br><br>To allow implementations to optim=
ize for fewer relocations, maybe a better interface would indeed be to prov=
ide functions instead of an array, as just suggested by Andrew before.<br><=
br>So&nbsp; <span style=3D"font-family:courier new,monospace">static conste=
xpr const char* name(size_t index);<br><span style=3D"font-family: arial,sa=
ns-serif;">Or, should string_view be ready in time: </span></span><span sty=
le=3D"font-family:courier new,monospace">static constexpr string_view name(=
size_t index);</span><br><br><br>On Sunday, 29 September 2013 20:29:41 UTC+=
2, Thiago Macieira  wrote:<blockquote class=3D"gmail_quote" style=3D"margin=
: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On d=
omingo, 29 de setembro de 2013 07:33:30, Andrew Tomazos wrote:
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; static constexpr const c=
har* names[];
<br>
<br>Arrays of pointers implies relocations. You may want to avoid this.
<br>
<br>--=20
<br>Thiago Macieira - thiago (AT) <a href=3D"http://macieira.info" target=
=3D"_blank">macieira.info</a> - thiago (AT) <a href=3D"http://kde.org" targ=
et=3D"_blank">kde.org</a>
<br>&nbsp; &nbsp;Software Architect - Intel Open Source Technology Center
<br>&nbsp; &nbsp; &nbsp; PGP/GPG: 0x6EF45358; fingerprint:
<br>&nbsp; &nbsp; &nbsp; E067 918B B660 DBD1 105C &nbsp;966C 33F5 F005 6EF4=
 5358
<br>
<br></blockquote><br></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_67_22232760.1380481525878--

.
