Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 6 years ago

Language

C++

Compiler

gcc HEAD 9.0.1 20190421 (experimental)

Options
Warnings
Optimization
Don't Use Boost
C++2a
no pedantic
Raw compiler options
-pedantic -pthread

Author

anonymous

about 6 years ago

$ g++ prog.cc -Wall -Wextra -O2 -march=native -std=c++2a -pedantic -pthread
prog.cc:16:2: error: expected ';' after class definition
   16 | }
      |  ^
      |  ;
prog.cc:21:2: error: expected ';' after class definition
   21 | }
      |  ^
      |  ;
prog.cc:26:2: error: expected ';' after class definition
   26 | }
      |  ^
      |  ;
prog.cc:28:21: error: 'T' was not declared in this scope
   28 | template <class_A A<T>> // ???
      |                     ^
prog.cc:28:21: error: 'T' was not declared in this scope
prog.cc:28:21: error: 'T' was not declared in this scope
prog.cc:28:20: error: expected '>' before '<' token
   28 | template <class_A A<T>> // ???
      |                    ^
prog.cc:29:43: error: expected unqualified-id before '{' token
   29 | void generalized_function(class_A<T> arg) {
      |                                           ^
prog.cc: In function 'int main()':
prog.cc:35:23: error: no matching function for call to 'class_B::class_B(int)'
   35 |  class_B B = class_B(5);
      |                       ^
prog.cc:18:7: note: candidate: 'constexpr class_B::class_B(const class_B&)'
   18 | class class_B : class_A<int> {
      |       ^~~~~~~
prog.cc:18:7: note:   no known conversion for argument 1 from 'int' to 'const class_B&'
prog.cc:18:7: note: candidate: 'constexpr class_B::class_B(class_B&&)'
prog.cc:18:7: note:   no known conversion for argument 1 from 'int' to 'class_B&&'
prog.cc:36:25: error: no matching function for call to 'class_C::class_C(double)'
   36 |  class_C C = class_C(0.5);
      |                         ^
prog.cc:23:7: note: candidate: 'constexpr class_C::class_C(const class_C&)'
   23 | class class_C : class_A<double> {
      |       ^~~~~~~
prog.cc:23:7: note:   no known conversion for argument 1 from 'double' to 'const class_C&'
prog.cc:23:7: note: candidate: 'constexpr class_C::class_C(class_C&&)'
prog.cc:23:7: note:   no known conversion for argument 1 from 'double' to 'class_C&&'
prog.cc:37:2: error: 'generalized_function' was not declared in this scope
   37 |  generalized_function(B);
      |  ^~~~~~~~~~~~~~~~~~~~
Exit Code:
1