220 10405 <CAFk2RUb5cu4nwyMfXQS92vzmgo2piie3tzO+jb=vawdc9p5K1g@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: Generated initializer_list
Date: Mon, 28 Apr 2014 13:35:41 +0300
Lines: 30
Approved: news@gmane.org
Message-ID: <CAFk2RUb5cu4nwyMfXQS92vzmgo2piie3tzO+jb=vawdc9p5K1g@mail.gmail.com>
References: <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: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1398681354 31234 80.91.229.3 (28 Apr 2014 10:35:54 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 28 Apr 2014 10:35:54 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRB7O57CNAKGQEVYK4FRI@isocpp.org Mon Apr 28 12:35:44 2014
Return-path: <std-proposals+bncBC5JHI7A7ALRB7O57CNAKGQEVYK4FRI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f199.google.com ([209.85.214.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRB7O57CNAKGQEVYK4FRI@isocpp.org>)
	id 1WeiuU-0001pU-Ut
	for gclcip-std-proposals@m.gmane.org; Mon, 28 Apr 2014 12:35:43 +0200
Original-Received: by mail-ob0-f199.google.com with SMTP id gq1sf40028247obb.6
        for <gclcip-std-proposals@m.gmane.org>; Mon, 28 Apr 2014 03:35:42 -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:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=SVjvY9wO5vRt4iOtnb/kFtmXMHe89Lmpg47eukWxNGo=;
        b=Jqg3PyH7Cvb4mPyWj9YUYyzG0oSp+HwoCF1YhDUXJEzmWmcaUFslByAa96EpShUIwt
         ZZaduq7zC+PCI+Em9ysdBBP2/vbvpf7+64bHAZJNiV1MQ5Z7FToYMs0Bxz/3AVXZR1Or
         MH33BpgmCjPs9sftAIhJFiL9YlsCCHPw9vxO1gj7/OPD27tYYo5Kd9HVbxaWAGknu/Vq
         lLOzFyX8SrLVniSBMMty6psSUPZU1hxJgRwKC4C4F8INgD1TNlJ8hEcM7UY5WAiHk0x6
         rsr+sd+l9lU0zaQRgqlCYYWUtYNmGdx4vyPx/DgDguy3QA+Tz6w/qOS/lTMK13FGTMPP
         w4pQ==
X-Gm-Message-State: ALoCoQn6jDggazYls1E9IpZvelZxswrGWzTGJQXu7yymIDnoMV002r6bTIk15ei52kUkTTxrNIfb
X-Received: by 10.182.158.135 with SMTP id wu7mr12482361obb.19.1398681342067;
        Mon, 28 Apr 2014 03:35:42 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.82.42 with SMTP id g39ls2538993qgd.25.gmail; Mon, 28 Apr
 2014 03:35:41 -0700 (PDT)
X-Received: by 10.140.51.74 with SMTP id t68mr29958841qga.50.1398681341463;
        Mon, 28 Apr 2014 03:35:41 -0700 (PDT)
Original-Received: from mail-qa0-x22b.google.com (mail-qa0-x22b.google.com [2607:f8b0:400d:c00::22b])
        by mx.google.com with ESMTPS id d5si7529482qab.153.2014.04.28.03.35.41
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 28 Apr 2014 03:35:41 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400d:c00::22b as permitted sender) client-ip=2607:f8b0:400d:c00::22b;
Original-Received: by mail-qa0-f43.google.com with SMTP id ih12so4341166qab.30
        for <std-proposals@isocpp.org>; Mon, 28 Apr 2014 03:35:41 -0700 (PDT)
X-Received: by 10.140.96.51 with SMTP id j48mr30613191qge.24.1398681341337;
 Mon, 28 Apr 2014 03:35:41 -0700 (PDT)
Original-Received: by 10.224.181.5 with HTTP; Mon, 28 Apr 2014 03:35:41 -0700 (PDT)
In-Reply-To: <357dd72f-c749-4dc5-aa6d-5ac4528aba5a@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:400d:c00::22b 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: <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:10405
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/10405>

On 28 April 2014 13:32,  <douglas.boffey@gmail.com> wrote:
> 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;
> }


initializer_list is probably not the right tool, it is by-design immutable.

-- 

--- 
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/.

.
