Topic: C99 braci init in C++0x


Author: "Balog Pal" <pasa@lib.hu>
Date: Mon, 3 May 2010 13:08:35 CST
Raw View
C99 has the advanced form of brace init with that

[index] =
.member =

syntax in the initializer list. Was it left out of C++0x or I just missed
the relevant section?



--
[ 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<std-c%2B%2B@netlab.cs.rpi.edu>
]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: Faisal Vali <faisalv@gmail.com>
Date: Wed, 5 May 2010 18:53:48 CST
Raw View
On May 3, 2:08 pm, "Balog Pal" <p...@lib.hu> wrote:
> C99 has the advanced form of brace init with that
> [index] =  , .member =
> syntax in the initializer list. Was it left out of C++0x or I just missed
> the relevant section?

C99 Designated initializers will not be in C++0x - for details, i'll
refer you to a previous post on this topic.
http://groups.google.com/group/comp.std.c++/msg/7f9c6cb7a80408dc?hl=en&dmode=source

Designated initializers would be quite useful in C++ (as they are in
C99) - perhaps we can get a proposal going for the next revision of C+
+.

regards,
Faisal Vali
Radiation Oncology
Loyola


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





Author: Sean Hunt <rideau3@gmail.com>
Date: Sat, 8 May 2010 07:28:18 CST
Raw View
On May 5, 6:53 pm, Faisal Vali <fais...@gmail.com> wrote:
> On May 3, 2:08 pm, "Balog Pal" <p...@lib.hu> wrote:
>
> > C99 has the advanced form of brace init with that
> > [index] =  , .member =
> > syntax in the initializer list. Was it left out of C++0x or I just missed
> > the relevant section?
>
> C99 Designated initializers will not be in C++0x - for details, i'll
> refer you to a previous post on this topic.http://groups.google.com/group/comp.std.c++/msg/7f9c6cb7a80408dc?hl=e...
>
> Designated initializers would be quite useful in C++ (as they are in
> C99) - perhaps we can get a proposal going for the next revision of C+
> +.

Named arguments would be better since most C++ classes use
constructors. Designated initializers for arrays would be good,
though.

Sean


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