220 10404 <357dd72f-c749-4dc5-aa6d-5ac4528aba5a@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: douglas.boffey@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Generated initializer_list
Date: Mon, 28 Apr 2014 03:32:59 -0700 (PDT)
Lines: 78
Approved: news@gmane.org
Message-ID: <357dd72f-c749-4dc5-aa6d-5ac4528aba5a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_78_15875660.1398681179202"
X-Trace: ger.gmane.org 1398681188 29012 80.91.229.3 (28 Apr 2014 10:33:08 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 28 Apr 2014 10:33:08 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDSIZVXVVUFBBW647CNAKGQE6RZWQDA@isocpp.org Mon Apr 28 12:33:01 2014
Return-path: <std-proposals+bncBDSIZVXVVUFBBW647CNAKGQE6RZWQDA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f70.google.com ([209.85.219.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDSIZVXVVUFBBW647CNAKGQE6RZWQDA@isocpp.org>)
	id 1Weirt-0006kj-8m
	for gclcip-std-proposals@m.gmane.org; Mon, 28 Apr 2014 12:33:01 +0200
Original-Received: by mail-oa0-f70.google.com with SMTP id m1sf40004681oag.1
        for <gclcip-std-proposals@m.gmane.org>; Mon, 28 Apr 2014 03:33:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id: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=KrNOGJS13Br4nMtXuPCb6tLYWWu48HcO3Av/JFmsVQE=;
        b=cKvOBu4FtNURsVIdRhKk6SlnwzEHk8wLHLRFj0ZmRqDmlz0mzDKiE4KEFqu9G3PnkW
         ElUsVE7KuGu1lw7tvjQVsfVwomi835QxtnhckcP4iawUICc6FJMHlP3uh1yUoorGdcTf
         xD1tJYaCxbZSe3G3XZfPbqXo9C6zZ5J5nigxSJn4AVIWfilg/I4NuuQhHPfoiKDuNXIb
         J6jyUpBuGg5GMXbj/BxphDcDPAbTTFQq/NyNL0aaKQ2NJTVxyK9FqPT9N1XyPaEmfqVd
         +qI9aqg8q7QqbCxDVCkhr2EOXPecysWtH0aHj02AVCR/7ZG11e4zMTDLG7XRVk55hVsW
         wSJQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id: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=KrNOGJS13Br4nMtXuPCb6tLYWWu48HcO3Av/JFmsVQE=;
        b=Fz08IPt2dSu4GPvXFNpaRr46KjKZLZ4W/T7mK3FyUXUVqj3sVL4Gn3kCSQDsoULGFP
         8edwoXeSBtweN5ThB+uAdVjBKtaKbuF3uhGl8CL1F8HQEYSm7o3Bksvm2ydDrqStLyww
         l9wVDz++f/RFoNht+ByUmxcS84Zv4OhxzlPa6ZoL4YY5NwcRPBUY7eQBuxMZddgg9w01
         DCl37RllkjXNtXkmoguvMtQxKAKRhd4fieUsZ4pg3aXlgob7qdvy6siWuUGyNBVf9pAB
         jCd/8R2RxZl+qz+d0WzvBid0taZVqZTrfF7m81z9V+3I1pdGyx9TY7RrWbzmahOMTwZk
         iFYA==
X-Gm-Message-State: ALoCoQk9l6M0Tw1c8BAQNltsCZXvWDhtrvV/5CbVHFcTjrlJGK1cTcuFndlpaey8zUQ6yDFO1WaL
X-Received: by 10.182.230.132 with SMTP id sy4mr2387934obc.48.1398681180346;
        Mon, 28 Apr 2014 03:33:00 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.22.6 with SMTP id 6ls327494qgm.50.gmail; Mon, 28 Apr 2014
 03:32:59 -0700 (PDT)
X-Received: by 10.140.91.40 with SMTP id y37mr447qgd.37.1398681179739;
        Mon, 28 Apr 2014 03:32:59 -0700 (PDT)
X-Original-Sender: douglasboffey@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: <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:10404
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/10404>

------=_Part_78_15875660.1398681179202
Content-Type: text/plain; charset=UTF-8

It appears to me that one feature that is missing from most languages is a 
method to compile-time compute a sequence (e.g. an array, etc.)  One way to 
do this is a program (e.g. yacc) that generates a compilation unit.  Surely 
the time is now ripe, with C++11's initializer_lists and C++14's relaxed 
rules for constexprs to be able to directly code the algorithm withing the 
compilation unit.
 
Maybe something along the lines of:
 
*template*<*typename* ValueType, *typename* Object, *typename* Args...>
std::initializer_list<ValueType> make_initializer_list(Object object, 
Args... args) {
  initializer_list<ValueType> result {};
  *while* (object.more())
    result.push_back(object());
  *return* result;
}
 

-- 

--- 
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_78_15875660.1398681179202
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><DIV>It appears to me that one feature that is missing fro=
m most languages is a method to compile-time compute a sequence (e.g. an ar=
ray, etc.)&nbsp; One way to do this is a program (e.g. yacc) that generates=
 a compilation unit.&nbsp; Surely the time is now ripe, with C++11's initia=
lizer_lists and C++14's relaxed rules for constexprs to be able to directly=
 code the algorithm withing the compilation unit.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Maybe something along the lines of:</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#9900ff><STRONG><FONT color=3D#9900ff>template</FONT></S=
TRONG>&lt;<STRONG><FONT color=3D#9900ff>typename</FONT></STRONG> ValueType,=
 <STRONG><FONT color=3D#9900ff>typename</FONT></STRONG> Object, <STRONG><FO=
NT color=3D#9900ff>typename</FONT></STRONG> Args...&gt;</FONT></DIV>
<DIV><FONT color=3D#9900ff>std::initializer_list&lt;ValueType&gt; make_init=
ializer_list(Object object, Args... args) {</FONT></DIV>
<DIV><FONT color=3D#9900ff>&nbsp; initializer_list&lt;ValueType&gt; result =
{};</FONT></DIV>
<DIV><FONT color=3D#9900ff>&nbsp; <STRONG><FONT color=3D#9900ff>while</FONT=
></STRONG> (object.more())</FONT></DIV>
<DIV><FONT color=3D#9900ff>&nbsp;&nbsp;&nbsp; result.push_back(object());</=
FONT></DIV>
<DIV><FONT color=3D#9900ff>&nbsp; <STRONG><FONT color=3D#9900ff>return</FON=
T></STRONG> result;</FONT></DIV>
<DIV><FONT color=3D#9900ff>}</FONT></DIV>
<DIV><FONT color=3D#9900ff></FONT>&nbsp;</DIV></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<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_78_15875660.1398681179202--

.
