Skip to content

Commit

Permalink
json/config.h: Generalize setting of JSONCPP_OVERRIDE to all compilers
Browse files Browse the repository at this point in the history
This commit has been adapted from InsightSoftwareConsortium/ITK@1c86090
  • Loading branch information
jcfr committed Apr 25, 2016
1 parent 980cdf0 commit ba6fa48
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions include/json/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@

#endif // defined(_MSC_VER)

#if defined(_MSC_VER) && _MSC_VER <= 1600 // MSVC <= 2010
# define JSONCPP_OVERRIDE
#else
// In c++11 the override keyword allows you to explicity define that a function
// is intended to override the base-class version. This makes the code more
// managable and fixes a set of common hard-to-find bugs.
#if __cplusplus >= 201103L
# define JSONCPP_OVERRIDE override
#endif // MSVC <= 2010

#else
# define JSONCPP_OVERRIDE
#endif

#ifndef JSON_HAS_RVALUE_REFERENCES

Expand Down

0 comments on commit ba6fa48

Please sign in to comment.