Merge pull request #1502 from ylavic/compilation_fixes
Compilation fixes
This commit is contained in:
commit
dfbe1db9da
@ -45,9 +45,8 @@ int main() {
|
|||||||
// C++11 supports std::move() of Value so it always have no problem for std::sort().
|
// C++11 supports std::move() of Value so it always have no problem for std::sort().
|
||||||
// Some C++03 implementations of std::sort() requires copy constructor which causes compilation error.
|
// Some C++03 implementations of std::sort() requires copy constructor which causes compilation error.
|
||||||
// Needs a sorting function only depends on std::swap() instead.
|
// Needs a sorting function only depends on std::swap() instead.
|
||||||
#if __cplusplus >= 201103L || !defined(__GLIBCXX__)
|
#if __cplusplus >= 201103L || (!defined(__GLIBCXX__) && (!defined(_MSC_VER) || _MSC_VER >= 1900))
|
||||||
std::sort(d.MemberBegin(), d.MemberEnd(), NameComparator());
|
std::sort(d.MemberBegin(), d.MemberEnd(), NameComparator());
|
||||||
#endif
|
|
||||||
|
|
||||||
printIt(d);
|
printIt(d);
|
||||||
|
|
||||||
@ -59,4 +58,5 @@ int main() {
|
|||||||
"zeta": false
|
"zeta": false
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -631,7 +631,8 @@ RAPIDJSON_NAMESPACE_END
|
|||||||
#if RAPIDJSON_HAS_CXX11_NOEXCEPT
|
#if RAPIDJSON_HAS_CXX11_NOEXCEPT
|
||||||
#define RAPIDJSON_NOEXCEPT_ASSERT(x)
|
#define RAPIDJSON_NOEXCEPT_ASSERT(x)
|
||||||
#else
|
#else
|
||||||
#define RAPIDJSON_NOEXCEPT_ASSERT(x) RAPIDJSON_ASSERT(x)
|
#include <cassert>
|
||||||
|
#define RAPIDJSON_NOEXCEPT_ASSERT(x) assert(x)
|
||||||
#endif // RAPIDJSON_HAS_CXX11_NOEXCEPT
|
#endif // RAPIDJSON_HAS_CXX11_NOEXCEPT
|
||||||
#else
|
#else
|
||||||
#define RAPIDJSON_NOEXCEPT_ASSERT(x) RAPIDJSON_ASSERT(x)
|
#define RAPIDJSON_NOEXCEPT_ASSERT(x) RAPIDJSON_ASSERT(x)
|
||||||
|
@ -122,6 +122,9 @@ public:
|
|||||||
|
|
||||||
#ifndef RAPIDJSON_ASSERT
|
#ifndef RAPIDJSON_ASSERT
|
||||||
#define RAPIDJSON_ASSERT(x) (!(x) ? throw AssertException(RAPIDJSON_STRINGIFY(x)) : (void)0u)
|
#define RAPIDJSON_ASSERT(x) (!(x) ? throw AssertException(RAPIDJSON_STRINGIFY(x)) : (void)0u)
|
||||||
|
#ifndef RAPIDJSON_ASSERT_THROWS
|
||||||
|
#define RAPIDJSON_ASSERT_THROWS
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class Random {
|
class Random {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user