File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 8383// managable and fixes a set of common hard-to-find bugs.
8484#if __cplusplus >= 201103L
8585# define JSONCPP_OVERRIDE override
86- #elif defined(_MSC_VER) && _MSC_VER > 1600
86+ # define JSONCPP_NOEXCEPT noexcept
87+ #elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900
8788# define JSONCPP_OVERRIDE override
89+ # define JSONCPP_NOEXCEPT throw ()
90+ #elif defined(_MSC_VER) && _MSC_VER >= 1900
91+ # define JSONCPP_OVERRIDE override
92+ # define JSONCPP_NOEXCEPT noexcept
8893#else
8994# define JSONCPP_OVERRIDE
95+ # define JSONCPP_NOEXCEPT throw ()
9096#endif
9197
9298#ifndef JSON_HAS_RVALUE_REFERENCES
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ namespace Json {
5353class JSON_API Exception : public std::exception {
5454public:
5555 Exception (JSONCPP_STRING const & msg);
56- ~Exception () throw () JSONCPP_OVERRIDE;
57- char const * what () const throw() JSONCPP_OVERRIDE;
56+ ~Exception () JSONCPP_NOEXCEPT JSONCPP_OVERRIDE;
57+ char const * what () const JSONCPP_NOEXCEPT JSONCPP_OVERRIDE;
5858protected:
5959 JSONCPP_STRING msg_;
6060};
Original file line number Diff line number Diff line change @@ -193,9 +193,9 @@ namespace Json {
193193Exception::Exception (JSONCPP_STRING const & msg)
194194 : msg_(msg)
195195{}
196- Exception::~Exception () throw ()
196+ Exception::~Exception () JSONCPP_NOEXCEPT
197197{}
198- char const * Exception::what () const throw()
198+ char const * Exception::what () const JSONCPP_NOEXCEPT
199199{
200200 return msg_.c_str ();
201201}
You can’t perform that action at this time.
0 commit comments