2 ms·
The reason they used quote is outlined in the proposal: https://open-std.org/JTC1/SC22/WG14/www/docs/n2626.pdf https://open-std.org/JTC1/SC22/WG14/www/docs/n262
by rwmj 4y ago
The reason they used quote is outlined in the proposal:
https://open-std.org/JTC1/SC22/WG14/www/docs/n2626.pdf https://open-std.org/JTC1/SC22/WG14/www/docs/n2626.pdf
TL;DR is that it's because C++ uses quote. The reason C++ uses quote (they considered underscore) is because of a very obscure feature of C++ called custom literal suffixes which I'd never even heard of, but numbers can be suffixed with a custom identifier, and since single underscore is a valid identifier you can't use that. (https://en.cppreference.com/w/cpp/language/user_literal https://en.cppreference.com/w/cpp/language/user_literal)