Talk:cpp/language/identifiers

"All identifiers with a double underscore anywhere are reserved" Where in the standard does it say this? I could only find language relating to identifiers beginning with a double underscore. Legalize (talk) 23:34, 4 July 2014 (PDT)
 * Ah, there is no such language in the C11 standard, but it is in the C++11 standard (17.6.4.3.2 [global.names]) and I was looking at the wrong one :-). Legalize (talk) 23:42, 4 July 2014 (PDT)

Compile Error
void f { float x, &r = x; [=] { decltype(x) y1;            // y1 has type float decltype((x)) y2 = y1;     // y2 has type float const& because this lambda // is not mutable and x is an lvalue decltype(r) r1 = y1;       // r1 has type float& decltype((r)) r2 = y2;     // r2 has type float const& }; }

/mnt/d/source/cpp-learn/identifier_type.cpp:10:24: error: binding reference of type ‘float&’ to ‘const float’ discards qualifiers 10 │    decltype((r)) r2 = y2;      // r2 has type float const& │                       ^~


 * Making the code above testable "locally":


 * MSVC and Intel agree with GCC: and  - looks like clang is outvoted.. or rather, is the only one that implemented it. The standard has this example in expr.prim.id  --Cubbi (talk) 10:46, 8 May 2021 (PDT)

XID_Start and XID_Continue already part of the C++ standard?
I rember vaguely that in the eldern days there was a long list of "allowed Unicode characters" in the Annex. And for C++20 or 23 there came up a proposal to get rid of that arbitrary list and bound the C++ standard to the Unicode standard and using the well-defined Unicode character properties XID_Start and XID_Continue. But AFAIK this proposal is not yet accepted, is it? --Roker (talk) 08:38, 1 November 2021 (PDT)


 * the proposal was p1949 and it was accepted in June 2021 as a DR, meaning it retroactively applies to previous C++ standard revisions. Here's the pull request that removed the table: https://github.com/cplusplus/draft/pull/4663/files Good riddance. --Cubbi (talk) 09:08, 1 November 2021 (PDT)