220 16917 <CAGsORuCZG7aWp9XE1xuDy0WLYjxW+0CuBWTdrpJAsjbPr5zmHw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Zhihao Yuan <zy@miator.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Size deduction for std::array from initializer:
 Comments on n3824 std::make_array
Date: Mon, 9 Mar 2015 17:41:01 -0400
Lines: 56
Approved: news@gmane.org
Message-ID: <CAGsORuCZG7aWp9XE1xuDy0WLYjxW+0CuBWTdrpJAsjbPr5zmHw@mail.gmail.com>
References: <7a747557-95d6-4484-a7d8-f18fcb05ee59@isocpp.org>	<CAGsORuCBX1agar_iHvieDGfO6HH30gGP3_cp=m1K89+068DYOA@mail.gmail.com>	<6e1bae2e-8173-4437-a45b-63cddab072e5@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 1425937320 29811 80.91.229.3 (9 Mar 2015 21:42:00 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 9 Mar 2015 21:42:00 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBHVH7CTQKGQE3RJFDTI@isocpp.org Mon Mar 09 22:41:53 2015
Return-path: <std-proposals+bncBCSKRWMD4EHBBHVH7CTQKGQE3RJFDTI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f200.google.com ([209.85.214.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBHVH7CTQKGQE3RJFDTI@isocpp.org>)
	id 1YV5Qu-0006Xb-BB
	for gclcip-std-proposals@m.gmane.org; Mon, 09 Mar 2015 22:41:52 +0100
Original-Received: by obcuz6 with SMTP id uz6sf9097928obc.3
        for <gclcip-std-proposals@m.gmane.org>; Mon, 09 Mar 2015 14:41:51 -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:content-type:sender: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=OAipZZx2D3D4wWDNZG7cTLCR4rWg6GXXrtQP/szvMAU=;
        b=DdfbywZARGXGMEPrQ2c5CeUn6y1xZ0P/XBf2LXjjA0vgW6DgeBtUAiZrLahek8jnp1
         75hN7+IT2t3O8CgL2o0cuBUH++yO0g3yuM2NC3M7JBXpyKge9X53efVTFvkSQwC9q5He
         8V0g/yXdThGalMZ5F8Dx3tDXZzfxaw5omGGJuBkbmjc26X0DSODoQ1ym73yyuI8dPARY
         PcNJ9OWAXee0UMjgGlNzcPfzgk6q3oi3/u9dDOsVGUkgQxpBOwijd8J6s5mBGGY+hoRX
         CGYfYE38bjXje/JtwdfgADYA3zn23S+U2XlOt5ATX4PVU/xhdXgOVo7Sn9Bq0iXKtsXd
         /5mg==
X-Gm-Message-State: ALoCoQk9IzugK4UF2cOfiTQqH974NMOnKG35854YlQHIuA6sEhhpdtfjVZk/TMZbSMsduDL0/qjt
X-Received: by 10.42.89.73 with SMTP id f9mr3008867icm.31.1425937311367;
        Mon, 09 Mar 2015 14:41:51 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.40.164 with SMTP id x33ls1744500qgx.77.gmail; Mon, 09 Mar
 2015 14:41:50 -0700 (PDT)
X-Received: by 10.52.94.113 with SMTP id db17mr22710888vdb.40.1425937310235;
        Mon, 09 Mar 2015 14:41:50 -0700 (PDT)
Original-Received: from mail-s68.mailgun.info (mail-s68.mailgun.info. [184.173.153.196])
        by mx.google.com with ESMTPS id ug3si10400602vcb.93.2015.03.09.14.41.50
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 09 Mar 2015 14:41:50 -0700 (PDT)
Received-SPF: pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) client-ip=184.173.153.196;
Original-Received: from mail-la0-f50.google.com (mail-la0-f50.google.com
 [209.85.215.50]) by mxa.mailgun.org with ESMTP id
 54fe136f.7fd1f90db4f0-in1; Mon, 09 Mar 2015 21:41:03 -0000 (UTC)
Original-Received: by labgd6 with SMTP id gd6so26990181lab.6 for
 <std-proposals@isocpp.org>; Mon, 09 Mar 2015 14:41:01 -0700 (PDT)
X-Received: by 10.152.28.233 with SMTP id e9mr27676157lah.3.1425937261945;
 Mon, 09 Mar 2015 14:41:01 -0700 (PDT)
Original-Received: by 10.112.40.114 with HTTP; Mon, 9 Mar 2015 14:41:01 -0700 (PDT)
In-Reply-To: <6e1bae2e-8173-4437-a45b-63cddab072e5@isocpp.org>
X-Mailgun-Sid: WyI3MTBkYiIsICJzdGQtcHJvcG9zYWxzQGlzb2NwcC5vcmciLCAiNjkxMTAiXQ==
Original-Sender: zy@miator.net
X-Original-Sender: zy@miator.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates
 184.173.153.196 as permitted sender) smtp.mail=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net;
       dkim=pass header.i=@miator.net
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:16917
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/16917>

On Mon, Mar 9, 2015 at 4:42 PM, Matthew Fioravante
<fmatthew5876@gmail.com> wrote:
>
> Accepting make_array() is assuming that this problem will either be solved
> in the future or that its good enough having to live with it never being
> solved.

Nope.  It simply means the new addition solves the problem
it's trying to solve.

> Or is the standards committee ok with something now that might be
> obsoleted in the future should a better solution be found?
>

No either, because make_array has its unique use cases.
For example, a language level solution cannot produce a
common type out of a braced-init:

  std::array<auto,[]> a = { 'a', 10 };  // boom
  auto a = make_array('a', 10);

>
> I'm concerned that we may be taking the wrong direction. If a language
> feature is invented to initialize std::array (and other similar templates)
> then make_array() may not be needed at all.

It's committee's job to decide direction.  I think we have
done with the technical issues here.

> The make_array() approach means having to write a new make_X()
> method for each template class which might need it.

Short, flexible, and works for me.

> Looking at your example
> implementation, writing ones own make_X() is non-trivial with all of the
> edge cases covered by type_traits.
>

You might want to take a closer look.  They are "features"
which cannot be provided with language extensions.

-- 
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://bit.ly/blog4bsd

-- 

--- 
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/.

.
