diff options
Diffstat (limited to 'Tests/CompileFeatures/cxx_reference_qualified_functions.cpp')
-rw-r--r-- | Tests/CompileFeatures/cxx_reference_qualified_functions.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp b/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp index 83a2361..2fd36e0 100644 --- a/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp +++ b/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp @@ -1,11 +1,13 @@ -struct test{ - void f() & { } - void f() && { } +struct test +{ + void f() & {} + void f() && {} }; -void someFunc(){ +void someFunc() +{ test t; - t.f(); // lvalue + t.f(); // lvalue test().f(); // rvalue } |