Created
January 31, 2018 09:16
-
-
Save fortheday/805e54d2d0f80bf464506c9640578e03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CRValue | |
{ | |
public: | |
void f() const && { puts("&&"); } | |
void f() const & { puts("& or inst"); } | |
}; | |
CRValue inst; | |
CRValue &rInst = inst; | |
inst.f(); // & or inst | |
rInst.f(); // & or inst | |
CRValue().f(); // && |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment