diff options
author | ylavic <ylavic.dev@gmail.com> | 2019-04-28 01:51:20 +0300 |
---|---|---|
committer | ylavic <ylavic.dev@gmail.com> | 2019-05-09 14:37:49 +0300 |
commit | b4538b53637b7caf41cd8ce993514d1d54b2d1fb (patch) | |
tree | 79eb5f96d31e8a4890b2afdefab2b902cef0b6ae /example | |
parent | 01950eb7acec78818d68b762efc869bba2420d82 (diff) |
Fix compilation of sortkeys.cpp with MSVC 2013 (hopefully).
Diffstat (limited to 'example')
-rw-r--r-- | example/sortkeys/sortkeys.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/example/sortkeys/sortkeys.cpp b/example/sortkeys/sortkeys.cpp index c4737849..7ede9fb9 100644 --- a/example/sortkeys/sortkeys.cpp +++ b/example/sortkeys/sortkeys.cpp @@ -45,9 +45,8 @@ int main() { // 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. // 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()); -#endif printIt(d); @@ -59,4 +58,5 @@ int main() { "zeta": false } */ +#endif } |