From -5260909982954529816
X-Google-Thread: 7894ca11fe,8390690191732735,start
X-Google-Attributes: gid7894ca11fe,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news2.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 18 Dec 2009 15:10:08 -0600
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
To: (Usenet)
From: Scott Meyers <NeverRead@aristeia.com>
Newsgroups: comp.std.c++
Subject: Why is std::array an aggregate?
Organization: albasani.net
Sender: cppmods@cs.rpi.edu
Approved: stephen.clamage@sun.com
Message-ID: <hgf8r0$7ta$1@news.albasani.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Original-Date: Thu, 17 Dec 2009 22:52:14 -0800
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Date: Fri, 18 Dec 2009 15:00:50 CST
Lines: 16
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-xvFMsXRYkvOB4RsJc99QVgcGwB5XruyXqtTaJPnRIMFAboF9aFl86vbObjzxcgflLnAdT7JJOK6lZBd!4OeKFvpRrFLvUOFgdpmmFt6MAbD29Q3FUMQ6UFk0sUUgB0P+JdvtHwo3
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Xref: g2news1.google.com comp.std.c++:1933

In TR1, std::tr1::array needed to be an aggregate so that it could be
brace-initialized.  To offer the same capability for C++0x's std::array, the
class could simply declare a constructor taking a std::initializer_list.  So why
is std::array an aggregate?  Making it a non-aggregate would permit e.g., giving
it a constructor taking a pair of iterators.

Thanks for all illumination.

Scott

-- 
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



