Take the following code:
void DoThrow( const std::exception& e ) { throw e; } int main( int nArgs, char* args[] ) { std::exception e; try { DoThrow( e ); } catch( std::exception& e ) {
I am trying to complete const correctness in my project and inadvertently created the above situation. Be that as it may, in Dev Studio, a catch DOES lock catches an exception, even though it is selected as const and is caught as non-const &.
Question - Should he ?:-)
Grimm the opiner
source share