Liste des Groupes | Revenir à cl c++ |
I think it became fairly quickly apparent that "throw(...)" specifiers were not as useful in practice as had been hoped, and relatively few programmers used them except in the form "throw()". So "throw(...)" was deprecated in C++11 and has been valid until C++17 (with compilers implementations being free to accept it as a non-standard extension far beyond that).It should be painfully obvious that the right thing to do should've been to merge throw specifications into function signatures, allowing exception handling to be validated at compile-time, i.e. what Java did. Instead of that we have the current state of affairs where the only half-assed solution is to have all exception classes derived from a superclass, i.e. std::exception, and then play musical chairs to catch exceptions.
Les messages affichés proviennent d'usenet.