summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-04 07:25:46 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-08 09:05:55 (GMT)
commitb1c5bd531417b74ddb2cb4365c49f0723c7a8e75 (patch)
tree620469902ddb8409680c00707230962a67678539 /Tests/CompileFeatures/cxx_reference_qualified_functions.cpp
parentea9c445f066589067992694cb6abc0d70ad97dd7 (diff)
downloadCMake-b1c5bd531417b74ddb2cb4365c49f0723c7a8e75.zip
CMake-b1c5bd531417b74ddb2cb4365c49f0723c7a8e75.tar.gz
CMake-b1c5bd531417b74ddb2cb4365c49f0723c7a8e75.tar.bz2
Features: Add cxx_reference_qualified_functions.
Diffstat (limited to 'Tests/CompileFeatures/cxx_reference_qualified_functions.cpp')
-rw-r--r--Tests/CompileFeatures/cxx_reference_qualified_functions.cpp11
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
+}