File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,8 @@ int main() {
45
45
// C++11 supports std::move() of Value so it always have no problem for std::sort().
46
46
// Some C++03 implementations of std::sort() requires copy constructor which causes compilation error.
47
47
// Needs a sorting function only depends on std::swap() instead.
48
- #if __cplusplus >= 201103L || !defined(__GLIBCXX__)
48
+ #if __cplusplus >= 201103L || ( !defined(__GLIBCXX__) && (!defined(_MSC_VER) || _MSC_VER >= 1900) )
49
49
std::sort (d.MemberBegin (), d.MemberEnd (), NameComparator ());
50
- #endif
51
50
52
51
printIt (d);
53
52
@@ -59,4 +58,5 @@ int main() {
59
58
"zeta": false
60
59
}
61
60
*/
61
+ #endif
62
62
}
Original file line number Diff line number Diff line change @@ -631,7 +631,8 @@ RAPIDJSON_NAMESPACE_END
631
631
#if RAPIDJSON_HAS_CXX11_NOEXCEPT
632
632
#define RAPIDJSON_NOEXCEPT_ASSERT (x )
633
633
#else
634
- #define RAPIDJSON_NOEXCEPT_ASSERT (x ) RAPIDJSON_ASSERT(x)
634
+ #include < cassert>
635
+ #define RAPIDJSON_NOEXCEPT_ASSERT (x ) assert(x)
635
636
#endif // RAPIDJSON_HAS_CXX11_NOEXCEPT
636
637
#else
637
638
#define RAPIDJSON_NOEXCEPT_ASSERT (x ) RAPIDJSON_ASSERT(x)
Original file line number Diff line number Diff line change @@ -122,6 +122,9 @@ class AssertException : public std::logic_error {
122
122
123
123
#ifndef RAPIDJSON_ASSERT
124
124
#define RAPIDJSON_ASSERT (x ) (!(x) ? throw AssertException (RAPIDJSON_STRINGIFY(x)) : (void )0u)
125
+ #ifndef RAPIDJSON_ASSERT_THROWS
126
+ #define RAPIDJSON_ASSERT_THROWS
127
+ #endif
125
128
#endif
126
129
127
130
class Random {
You can’t perform that action at this time.
0 commit comments