prog.cpp: In member function ‘void X::validate(int)’:
prog.cpp:6:36: error: invalid operands of types ‘int’ and ‘<unresolved overloaded function type>’ to binary ‘operator<=’
void validate(int x) { if (0<x && x<=max) a=x; else throw Bad_X(x); }
~^~~~~
prog.cpp:6:66: error: ‘Bad_X’ was not declared in this scope
void validate(int x) { if (0<x && x<=max) a=x; else throw Bad_X(x); }
^
prog.cpp: In constructor ‘X::X(std::__cxx11::string)’:
prog.cpp:10:23: error: ‘to’ was not declared in this scope
X(string s) { int x = to<int>(s); validate(x); } // §25.2.5.1
^~
prog.cpp:10:26: error: expected primary-expression before ‘int’
X(string s) { int x = to<int>(s); validate(x); } // §25.2.5.1
^~~