I\'m trying to create a custom exception that derives from std::exception
and overrides what()
. At first, I wrote it like this:
class U
The other way to go around is create header file and include it if necessary in your source code that should be compile by gcc, vc,or clang.
#ifndef no_except_work_around_H
#define no_except_work_around_H
#if (_MSC_VER <= 1800)
#include
#define noexcept
#endif
#endif //no_except_work_around_H
=====================================================
P.S> doesn't cover case noexcept(false) but works fine for VC2010,2012,2013, gcc 4.9