c++ – & after a function declaration in a class
Question: class A { public: void f() &; }; What does & mean after a function declaration? Answer: This means that the function can be called on an lvalue object of class A . Consider the following example #include <iostream> class A { public: void f() & { std::cout << …