Author
anonymous
over 3 years ago
Language
C++
Compiler
gcc HEAD 12.0.0 20210721 (experimental)
Options
Warnings
Boost 1.73.0
C++2b(GNU)
no pedantic
Author
anonymous
over 3 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=gnu++2b
prog.cc:13:28: error: 'T' was not declared in this scope
13 | class Binary : public Expr<T> {
| ^
prog.cc:13:29: error: template argument 1 is invalid
13 | class Binary : public Expr<T> {
| ^
prog.cc:15:17: error: 'T' was not declared in this scope
15 | Binary(Expr<T> left, Token oper, Expr<T> right) : left(&left), oper(oper), right(&right) { }
| ^
prog.cc:15:18: error: template argument 1 is invalid
15 | Binary(Expr<T> left, Token oper, Expr<T> right) : left(&left), oper(oper), right(&right) { }
| ^
prog.cc:15:26: error: 'Token' has not been declared
15 | Binary(Expr<T> left, Token oper, Expr<T> right) : left(&left), oper(oper), right(&right) { }
| ^~~~~
prog.cc:15:43: error: 'T' was not declared in this scope
15 | Binary(Expr<T> left, Token oper, Expr<T> right) : left(&left), oper(oper), right(&right) { }
| ^
prog.cc:15:44: error: template argument 1 is invalid
15 | Binary(Expr<T> left, Token oper, Expr<T> right) : left(&left), oper(oper), right(&right) { }
| ^
prog.cc:17:5: error: 'T' does not name a type
17 | T accept(Visitor<T>* visitor) {
| ^
prog.cc:22:10: error: 'T' was not declared in this scope
22 | Expr<T> *left;
| ^
prog.cc:22:11: error: template argument 1 is invalid
22 | Expr<T> *left;
| ^
prog.cc:23:5: error: 'Token' does not name a type
23 | Token oper;
| ^~~~~
prog.cc:24:10: error: 'T' was not declared in this scope
24 | Expr<T> *right;
| ^
prog.cc:24:11: error: template argument 1 is invalid
24 | Expr<T> *right;
| ^
prog.cc: In constructor 'Binary::Binary(int, int, int)':
prog.cc:15:68: error: class 'Binary' does not have any field named 'oper'
15 | Binary(Expr<T> left, Token oper, Expr<T> right) : left(&left), oper(oper), right(&right) { }
| ^~~~
prog.cc: At global scope:
prog.cc:27:39: error: 'T' was not declared in this scope
27 | class LiteralExpression : public Expr<T> {
| ^
prog.cc:27:40: error: template argument 1 is invalid
27 | class LiteralExpression : public Expr<T> {
| ^
prog.cc:29:30: error: expected ')' before 'lit'
29 | LiteralExpression(Literal lit, TokenType type) : lit(lit), type(type) { }
| ~ ^~~~
| )
prog.cc:31:5: error: 'T' does not name a type
31 | T accept(Visitor<T>* visitor) {
| ^
prog.cc:36:5: error: 'Literal' does not name a type
36 | Literal lit;
| ^~~~~~~
prog.cc:37:5: error: 'TokenType' does not name a type
37 | TokenType type;
| ^~~~~~~~~
Exit Code:
1