The same code is working fine on gcc 4.5.2 but when trying to compile it on gcc 4.1.2, I get the error ‘runtime_error’ was not declared in this scope.
‘runtime_error’ was not declared in this scope
I do
gcc 4.1 is relatively old. 4.5 is more standard compliant. Maybe you triggered a compiler's bug