[cfe-dev] [PATCH] C++0x unicode string and character literals now with test cases

Sean Hunt scshunt at csclub.uwaterloo.ca
Mon Jul 25 18:45:21 PDT 2011


On Mon, Jul 25, 2011 at 18:36, Craig Topper <craig.topper at gmail.com> wrote:
> As far as the const conversion for the new string literal types, gcc
> 4.5.2 allows it and throws a warning. Looks like the standard may
> consider these cases to be illegal now instead of deprecated for even
> the old cases.
>
> Google found this page which documents discussion on this topic. Look
> for "693. New string types and deprecated conversion "
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n3007.html
>
> ~Craig

I think we should follow the CWG's direction here. The reason it was
not added, even as a deprecated conversion, was to avoid people
relying on a brand new deprecated conversion which would make it more
difficult to remove later when it could have been nipped in the bud.
So for consistency, the deprecated conversion for char* was removed.
In my opinion, given that the committee decided on this specific
issue, we should follow the committee's direction and reject this
conversion, certainly for the new types but probably char* as well
given the committee's explicit decision in that regard (and update the
compatibility docs).

Sean



More information about the cfe-dev mailing list