Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-18 14:14:37


Gennaro Prota <gennaro_prota_at_[hidden]> writes:

> On Sat, 18 Jan 2003 13:13:45 -0500, David Abrahams
> <dave_at_[hidden]> wrote:
>
>>Gennaro Prota <gennaro_prota_at_[hidden]> 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.

Nobody "wants to".

It's not well-defined in the standard what it means to treat a string
literal as an integral constant expression. Nobody ever intended them
to be integral constant expressions. In standardization, you don't
resolve problems like this by exploiting loopholes, and especially
during this stage of standardization, which is dedicated to closing
them. If you want to enable a new capability, you deal with it
separately and intentionally.

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk