From 723449168911161282
X-Google-Thread: 7894ca11fe,b8f03ff37c64f88c
X-Google-Attributes: gid7894ca11fe,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.alt.net!frodo.cs.rpi.edu!not-for-mail
From: Ed Smith-Rowland <3dw4rd@verizon.net>
Newsgroups: comp.std.c++
Subject: Re: No cbegin/cend for std::initializer_list?
Date: Thu,  3 Sep 2009 13:09:03 CST
Organization: http://groups.google.com
Lines: 17
Sender: cppmods@cs.rpi.edu
Approved: austern@google.com
Message-ID: <05f3c0da-8b37-4137-b5f7-a42dbed6c0cb@j39g2000yqh.googlegroups.com>
References: <7.0.0.16.2.20090901101108.063e9c28@aristeia.com>
 <1b8b2c5d-7f06-46c5-b403-50aad13632cf@o36g2000vbl.googlegroups.com>
 <0081c572-9bbe-457e-9f54-b97da4ebfae0@v36g2000yqv.googlegroups.com>
 <2e617b47-bbb5-4768-b1d6-bc786cbb8fae@c37g2000yqi.googlegroups.com>
NNTP-Posting-Host: netlab.cs.rpi.edu
Content-Type: text/plain; charset=ISO-8859-1
To: (Usenet)
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
X-Original-Date: Thu, 3 Sep 2009 04:58:16 -0700 (PDT)
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Xref: g2news2.google.com comp.std.c++:1340

While it is true that initializer_list is not really a container there
is a consistency of access issue.  There is something to be said for
minimizing surprises especially for novices.

I thought the original rationale for cbegin, etc. was to help type
deduction with auto.  While it certainly is not the best generic
programming practice to loop through an initializer list explicitly I
would say - "never say never".

Ed

--
[ 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                      ]



