samedi 28 mai 2016

If `nullptr_t` isn't a keyword, why are `char16_t` and `char32_t`?

As discussed at Why is nullptr_t not a keyword, it is better to avoid introducing new keywords because they can break backward compatibility.

Why then are char16_t and char32_t keywords, when they could just as well have been defined like so?

namespace std {
    typedef decltype(u'q') char16_t;
    typedef decltype(U'q') char32_t;
}

Aucun commentaire:

Enregistrer un commentaire