Skip to content

Commit 5a61012

Browse files
committed
remove JSONCPP_NOEXCEPT
This codebase is C++11 now. No need for this macro. Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent 852267a commit 5a61012

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

include/json/config.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,6 @@ extern JSON_API int msvc_pre1900_c99_snprintf(char* outBuf, size_t size,
7474
// C++11 should be used directly in JSONCPP.
7575
#define JSONCPP_OVERRIDE override
7676

77-
#if __cplusplus >= 201103L
78-
#define JSONCPP_NOEXCEPT noexcept
79-
#elif defined(_MSC_VER) && _MSC_VER < 1900
80-
#define JSONCPP_NOEXCEPT throw()
81-
#elif defined(_MSC_VER) && _MSC_VER >= 1900
82-
#define JSONCPP_NOEXCEPT noexcept
83-
#else
84-
#define JSONCPP_NOEXCEPT throw()
85-
#endif
86-
8777
#ifdef __clang__
8878
#if __has_extension(attribute_deprecated_with_message)
8979
#define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message)))

include/json/value.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ namespace Json {
6767
class JSON_API Exception : public std::exception {
6868
public:
6969
Exception(String msg);
70-
~Exception() JSONCPP_NOEXCEPT override;
71-
char const* what() const JSONCPP_NOEXCEPT override;
70+
~Exception() noexcept override;
71+
char const* what() const noexcept override;
7272

7373
protected:
7474
String msg_;

src/lib_json/json_value.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ namespace Json {
200200

201201
#if JSON_USE_EXCEPTION
202202
Exception::Exception(String msg) : msg_(std::move(msg)) {}
203-
Exception::~Exception() JSONCPP_NOEXCEPT = default;
204-
char const* Exception::what() const JSONCPP_NOEXCEPT { return msg_.c_str(); }
203+
Exception::~Exception() noexcept = default;
204+
char const* Exception::what() const noexcept { return msg_.c_str(); }
205205
RuntimeError::RuntimeError(String const& msg) : Exception(msg) {}
206206
LogicError::LogicError(String const& msg) : Exception(msg) {}
207207
JSONCPP_NORETURN void throwRuntimeError(String const& msg) {

0 commit comments

Comments
 (0)