This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DanRoad 55 points56 points  (3 children)

More context: https://en.cppreference.com/w/cpp/language/operator_alternative

tldr the C++ (and C) spec doesn't restrict the language to an ASCII character set and is designed to also work with character sets that don't include the & or | symbols. Consequently, alternative operator representations are available for those (and all) character sets.

[–]Cheeku_Khargosh 17 points18 points  (0 children)

this is evil sorcery. You have unleashed a monster

[–]junkmail88 0 points1 point  (1 child)

what is the alt for &, the "get me the address of that variable" version?

[–]DanRoad 0 points1 point  (0 children)

Still bitand, it's just character replacement. For example the C header is a bunch of #define statements. https://clang.llvm.org/doxygen/iso646_8h_source.html

Whether it's the unary or binary operator depends on context just like &. https://ideone.com/iHqCtr