mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 07:14:45 +02:00
COMP: Use C++11 override directly
The override support in C++11 is required so avoid aliasing this feature. Compilers that do not support the override keyword are no longer supported.
This commit is contained in:

committed by
Hans Johnson

parent
8b31c6f0fd
commit
2853b1cdac
@@ -89,12 +89,11 @@
|
||||
// In c++11 the override keyword allows you to explicitly define that a function
|
||||
// is intended to override the base-class version. This makes the code more
|
||||
// manageable and fixes a set of common hard-to-find bugs.
|
||||
#define JSONCPP_OVERRIDE override // Define maintained for backwards compatibility of external tools. C++11 should be used directly in JSONCPP
|
||||
#if __cplusplus >= 201103L
|
||||
#define JSONCPP_OVERRIDE override
|
||||
#define JSONCPP_NOEXCEPT noexcept
|
||||
#define JSONCPP_OP_EXPLICIT explicit
|
||||
#elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900
|
||||
#define JSONCPP_OVERRIDE override
|
||||
#define JSONCPP_NOEXCEPT throw()
|
||||
#if _MSC_VER >= 1800 // MSVC 2013
|
||||
#define JSONCPP_OP_EXPLICIT explicit
|
||||
@@ -102,11 +101,9 @@
|
||||
#define JSONCPP_OP_EXPLICIT
|
||||
#endif
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1900
|
||||
#define JSONCPP_OVERRIDE override
|
||||
#define JSONCPP_NOEXCEPT noexcept
|
||||
#define JSONCPP_OP_EXPLICIT explicit
|
||||
#else
|
||||
#define JSONCPP_OVERRIDE
|
||||
#define JSONCPP_NOEXCEPT throw()
|
||||
#define JSONCPP_OP_EXPLICIT
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user