C++ - Operators
pis a pointer to an
*p: dereference operator, "use the value a pointer points to"
ris an alias of some
&r: address-of operator, "get the address of a variable"
Indicates the parameter is an rvalue reference. Unlike an ordinary reference, it only binds to objects that are no longer needed, e.g. temporaries, or using
scope resolution operator (
::) which is used to define a method outside of a class and to access a global variable within from the scope where a local variable also exists with the same name.
#define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
Without the leading double-colon, C++ will first check if there is a namespace of that name within the current 'active' namespace. If there isn't then it will check for a namespace of the name at the top level.
With the leading double-colon, C++ will skip the first check and only look for a top-level namespace.
auto X::operator<=>(const Y&) const = default;
Compiler will generate 6 comparison operators to compare X with Y