Language
C++
Compiler
gcc HEAD 10.0.0 20190605 (experimental)
Options
Warnings
Boost 1.70.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-head/include -std=gnu++2a
Exit Code:
1
Author
anonymous
almost 6 years ago
C++
gcc HEAD 10.0.0 20190605 (experimental)
Author
anonymous
almost 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-head/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:12:19: error: 'x' declared as reference but not initialized
12 | decltype((a)) x; // what is the type of x?
| ^
prog.cc:13:19: error: 'y' declared as reference but not initialized
13 | decltype((b)) y; // what is the type of y?
| ^
prog.cc:14:19: error: 'z' declared as reference but not initialized
14 | decltype((c)) z; // what is the type of z?
| ^
prog.cc:16:21: error: aggregate 'TD<int&> td1' has incomplete type and cannot be defined
16 | TD<decltype(x)> td1;
| ^~~
prog.cc:17:21: error: aggregate 'TD<int&> td2' has incomplete type and cannot be defined
17 | TD<decltype(y)> td2;
| ^~~
prog.cc:18:21: error: aggregate 'TD<int&> td3' has incomplete type and cannot be defined
18 | TD<decltype(z)> td3;
| ^~~