From 8161303684354338548
X-Google-Thread: f78e5,c818ee5949b522b9,start
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 23 Jun 2005 10:30:04 -0500
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Delivered-To: std-c++@ucar.edu
From: "Gianluca" <dishsi@tin.it>
Newsgroups: comp.std.c++
Subject: is iterating over an enum conformant?
Organization: http://groups.google.com
Message-ID: <1119522569.944334.120800@z14g2000cwz.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Complaints-To: groups-abuse@google.com
User-Agent: G2/0.2
Complaints-To: groups-abuse@google.com
Injection-Info: z14g2000cwz.googlegroups.com; posting-host=82.57.248.26;
   posting-account=lKC2WwwAAAAOFLgof0uEWXcUiN_mdDXA
X-Greylisting: NO DELAY (Relay+Sender autoqualified);
	processed by UCSD_GL-v1.2 on mailbox4.ucsd.edu;
	Thu, 23 June 2005 03:29:38 -0700 (PDT)
X-Spamscanner: mailbox4.ucsd.edu  (v1.6 Apr  6 2005 07:48:50, -2.8/5.0 3.0.0)
X-MailScanner: PASSED (v1.2.8 43038 j5NATbeF053596 mailbox4.ucsd.edu)
X-Virus-Scanned: amavisd-new at ucar.edu
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Date: Thu, 23 Jun 2005 10:28:02 CST
Lines: 27
NNTP-Posting-Host: 65.182.171.162
X-Trace: sv3-kgjZbE7RUDDbFbhev3s7M+Wym1t0kEV5blKLyw3n5qR2xbrIwm9xpGXGV+cRH+i/+xvu6PeUSFhgwlp!5faLIjvgHRBZo2DcO8YLvwBeQbqr9+EJTQOSzzLZGKnkpfQ6BDCNXN4RJNyJSatfmSvpdotgSkLu!+hgth3l4z4jDS4+kK5a7CjFs6v5qxSCXTQZ1D+NTwDM=
X-Complaints-To: abuse@speakeasy.net
X-DMCA-Complaints-To: abuse@speakeasy.net
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.32
Xref: g2news1.google.com comp.std.c++:5179


Hi,
A doubt slipped into my mind. I wonder if this piece of code is ok from
the standard point of view (the idea comes from real life, but the
example is totally artificial):

enum eEnum { eE1 = 0, eE2, eE3, eTotal };

int anArray[eTotal] = {};

int main()
{
  for (int i(eE1); i < eTotal; ++i)
  {
     anArray[i] = i;
  }
}

Thanks,
Gianluca

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



