mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-06 02:45:02 +02:00
Issue #731: Provide new JSONCPP_OP_EXPLICIT macro to restore VS 2012 support after recent introduction of explicit conversion function in JSON::Value.
This commit is contained in:
parent
edb4bdb7ec
commit
04abe38148
@ -84,15 +84,23 @@
|
|||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
# define JSONCPP_OVERRIDE override
|
# define JSONCPP_OVERRIDE override
|
||||||
# define JSONCPP_NOEXCEPT noexcept
|
# define JSONCPP_NOEXCEPT noexcept
|
||||||
|
# define JSONCPP_OP_EXPLICIT explicit
|
||||||
#elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900
|
#elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900
|
||||||
# define JSONCPP_OVERRIDE override
|
# define JSONCPP_OVERRIDE override
|
||||||
# define JSONCPP_NOEXCEPT throw()
|
# define JSONCPP_NOEXCEPT throw()
|
||||||
|
# if _MSC_VER >= 1800 // MSVC 2013
|
||||||
|
# define JSONCPP_OP_EXPLICIT explicit
|
||||||
|
# else
|
||||||
|
# define JSONCPP_OP_EXPLICIT
|
||||||
|
# endif
|
||||||
#elif defined(_MSC_VER) && _MSC_VER >= 1900
|
#elif defined(_MSC_VER) && _MSC_VER >= 1900
|
||||||
# define JSONCPP_OVERRIDE override
|
# define JSONCPP_OVERRIDE override
|
||||||
# define JSONCPP_NOEXCEPT noexcept
|
# define JSONCPP_NOEXCEPT noexcept
|
||||||
|
# define JSONCPP_OP_EXPLICIT explicit
|
||||||
#else
|
#else
|
||||||
# define JSONCPP_OVERRIDE
|
# define JSONCPP_OVERRIDE
|
||||||
# define JSONCPP_NOEXCEPT throw()
|
# define JSONCPP_NOEXCEPT throw()
|
||||||
|
# define JSONCPP_OP_EXPLICIT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef JSON_HAS_RVALUE_REFERENCES
|
#ifndef JSON_HAS_RVALUE_REFERENCES
|
||||||
|
@ -408,7 +408,7 @@ Json::Value obj_value(Json::objectValue); // {}
|
|||||||
bool empty() const;
|
bool empty() const;
|
||||||
|
|
||||||
/// Return !isNull()
|
/// Return !isNull()
|
||||||
explicit operator bool() const;
|
JSONCPP_OP_EXPLICIT operator bool() const;
|
||||||
|
|
||||||
/// Remove all object members and array elements.
|
/// Remove all object members and array elements.
|
||||||
/// \pre type() is arrayValue, objectValue, or nullValue
|
/// \pre type() is arrayValue, objectValue, or nullValue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user