Possible Duplicate:
C++11 Feature Checking
I'm particularly interested in the case of noexcept
specifications which seem to have littered the C++11 standard library with the introduction of GCC 4.7. In this case, detecting compiler version is adequate; is that the best mechanism to produce portable code?
#include <system_error>
class server_error_category : public std::error_category
{
public:
virtual const char* name () const { ... }
//
// fails beginning with gcc4.7,
// looser throw specifier ...
// overriding 'virtual const char* std::error_category::name() const noexcept (true)
...
};