Checks linked resources
while(!ss.eof()){ ss >> token;
p >> x; if(!p.fail() && p.eof()){
struct stack_empty_error: public std::exception{ const char\* what() const throw(){
return " ==> Error: stack empty." ; } }; auto x = _stack.back(); _stack.pop_back(); return x;
Also, when I press Ctrl-D, I get an endless loop printing "EXPR+> stack". Typical C++ program...
Checks linked resources
Can cause an endless loop (with finite input stream; for example in case of a read error). This way of error checking is correct for C++ but not nice (it or part of it can be forgotten with no warning--see below for an instance of it :P). Missing "override" annotation here. Can easily fuck it up since overloads are allowed. Correct in C++ but incredibly weird--typical for lowlevel languages that are far away from the user.Also, when I press Ctrl-D, I get an endless loop printing "EXPR+> stack". Typical C++ program...