Daily bit(e) of C++ | cv- and ref-qualified member functions
Daily bit(e) of C++ ♻️69, Adding const/volatile and reference qualifiers to member functions.
Member functions in C++ can be cv-qualified, which allows the member function to be invoked on an object with corresponding cv-qualifiers.
Member functions can also be ref-qualified to distinguish between being invoked on an lvalue or rvalue object.
Providing a full set of cv-qualified and ref-qualified methods can introduce a lot of duplication, which can be addressed by the C++23 "explicit object parameter" / "deducing this" feature.