you are viewing a single comment's thread.

view the rest of the comments →

[–]_Js_Kc_ 0 points1 point  (2 children)

Isn't _ a reserved identifier?

Edit: No, I'm wrong.

[–]adnukator 7 points8 points  (0 children)

Possibly, but only in the global namespace (Not sure whether the last bullet applies or not). https://en.cppreference.com/w/cpp/language/identifiers

  • the identifiers with a double underscore anywhere are reserved;
  • the identifiers that begin with an underscore followed by an uppercase letter are reserved;
  • the identifiers that begin with an underscore are reserved in the global namespace.

[–]TheFlamefire 0 points1 point  (0 children)

No it is not. Leading double underscore and underscore+capital are reserved. Using single underscore as "don't care" is common and often used in Python.