diff options
Diffstat (limited to 'Tests/CompileFeatures/cxx_reference_qualified_functions.cpp')
-rw-r--r-- | Tests/CompileFeatures/cxx_reference_qualified_functions.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp b/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp new file mode 100644 index 0000000..83a2361 --- /dev/null +++ b/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp @@ -0,0 +1,11 @@ + +struct test{ + void f() & { } + void f() && { } +}; + +void someFunc(){ + test t; + t.f(); // lvalue + test().f(); // rvalue +} |