We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 316e0bd commit ab5db0cCopy full SHA for ab5db0c
section2/auto.cpp
@@ -4,12 +4,16 @@
4
// g++ auto.cpp -std=c++14 -o a.out;./a.out
5
// g++ auto.cpp -std=c++14 -I../common -o a.out;./a.out
6
7
+#include <cassert>
8
+
9
#include <iostream>
10
#include <string>
11
#include <vector>
12
#include <set>
13
#include <map>
14
15
+#include <type_traits>
16
17
#include <signal.h>
18
19
void case1()
@@ -97,6 +101,10 @@ void case6()
97
101
decltype(auto) x1 = (x);
98
102
decltype(auto) x2 = &x;
99
103
decltype(auto) x3 = x1;
104
105
+ assert(std::is_lvalue_reference<decltype(x1)>::value);
106
+ assert(std::is_pointer<decltype(x2)>::value);
107
+ assert(std::is_lvalue_reference<decltype(x3)>::value);
100
108
}
109
110
auto get_a_set()
0 commit comments