Topic: [N2134] Editorial: Missing Cross-Reference in Constant Expressions


Author: Pete Becker <pete@versatilecoding.com>
Date: Wed, 21 Mar 2007 08:28:19 CST
Raw View
Greg Herlihy wrote:
>    5.19/1 enumerates where C++ requires a constant expression:
>
> "In several places, C++ requires expressions that evaluate to an integral or
> enumeration constant: as array bounds (8.3.4, 5.3.4), as case expressions
> (6.4.2), as bit-field lengths (9.6), as enumerator initializers (7.2), as
> static member initializers (9.4.2), and as integral or enumeration non-type
> template arguments (14.3)."
>
> To this list should be added: "as a static_assert (7.0)."
>

Editorial.

--

 -- Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com)
Author of "The Standard C++ Library Extensions: a Tutorial and
Reference." (www.petebecker.com/tr1book)

---
[ 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.comeaucomputing.com/csc/faq.html                      ]





Author: gennaro.prota@yahoo.com (Gennaro Prota)
Date: Wed, 21 Mar 2007 16:57:51 GMT
Raw View
On Wed, 21 Mar 2007 08:28:19 CST, Pete Becker wrote:

>Greg Herlihy wrote:
>> =A75.19/1 enumerates where C++ requires a constant expression:
>>=20
>> "In several places, C++ requires expressions that evaluate to an integ=
ral or
>> enumeration constant: as array bounds (8.3.4, 5.3.4), as case expressi=
ons
>> (6.4.2), as bit-field lengths (9.6), as enumerator initializers (7.2),=
 as
>> static member initializers (9.4.2), and as integral or enumeration non=
-type
>> template arguments (14.3)."
>> =20
>> To this list should be added: "as a static_assert (7.0)."
>>=20
>
>Editorial.

Hmm, so is the list meant to be exhaustive?
--=20
Genny

---
[ 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.comeaucomputing.com/csc/faq.html                      ]





Author: Greg Herlihy <greghe@pacbell.net>
Date: Tue, 20 Mar 2007 23:27:58 CST
Raw View
   5.19/1 enumerates where C++ requires a constant expression:

"In several places, C++ requires expressions that evaluate to an integral or
enumeration constant: as array bounds (8.3.4, 5.3.4), as case expressions
(6.4.2), as bit-field lengths (9.6), as enumerator initializers (7.2), as
static member initializers (9.4.2), and as integral or enumeration non-type
template arguments (14.3)."

To this list should be added: "as a static_assert (7.0)."

Greg

---
[ 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.comeaucomputing.com/csc/faq.html                      ]