At 11:30 AM 1/18/2003, Gennaro Prota wrote: >On Sat, 18 Jan 2003 13:13:45 -0500, David Abrahams ><[EMAIL PROTECTED]> wrote: > >>Gennaro Prota <[EMAIL PROTECTED]> writes: >>> Unfortunately >>> the committee seems on the road of prohibiting this and other similar >>> (and potentially more useful) uses of string literals in constant >>> expressions: >>> >>> http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#366 >> >>Huh? They're already prohibited. > >I meant that they (you ;-)) want to prohibit any use of string >literals in constant expressions. Where is it stated that this is >already prohibited?
Other places in the standard make it clear that strings literals are not *integral* constant expressions. The issue you linked to just proposes make this even more clear. At a meeting years ago I proposed to make string literals more useful as constant expressions, but we decided against that. As I recall part of the problem is that linkers are free to map the same literal string to different addresses in different compilation units. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost