From caa165ece89136a4ef6bde87df865d4288ff94cf Mon Sep 17 00:00:00 2001 From: andot Date: Wed, 23 Jul 2014 14:39:05 +0800 Subject: Fixed compatibility issue with VS2013 --- include/base.h | 8 ++++---- include/exception.h | 4 ++++ include/ini.h | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/base.h b/include/base.h index 87c7483..f5ebed1 100644 --- a/include/base.h +++ b/include/base.h @@ -87,7 +87,7 @@ public: */ Value operator[](const char *name) const { - return Value(this)[name]; + return Value(this).get(name); } /** @@ -97,7 +97,7 @@ public: */ Value operator[](const std::string &name) const { - return Value(this)[name]; + return Value(this).get(name); } /** @@ -107,7 +107,7 @@ public: */ Value property(const char *name) const { - return Value(this)[name]; + return Value(this).get(name); } /** @@ -117,7 +117,7 @@ public: */ Value property(const std::string &name) const { - return Value(this)[name]; + return Value(this).get(name); } /** diff --git a/include/exception.h b/include/exception.h index aff0afc..94aaa85 100644 --- a/include/exception.h +++ b/include/exception.h @@ -52,7 +52,11 @@ public: * Overridden what method * @return const char * */ +#ifdef _NOEXCEPT + virtual const char *what() const _NOEXCEPT override +#else virtual const char *what() const noexcept override +#endif { return _message.c_str(); } diff --git a/include/ini.h b/include/ini.h index 1d881e9..69137a2 100644 --- a/include/ini.h +++ b/include/ini.h @@ -125,7 +125,11 @@ private: * @param value * @return string */ +#ifdef _MSC_VER + static const char* bool2str(const bool value) +#else static constexpr const char* bool2str(const bool value) +#endif { // cast to a string return ( static_cast(value) ? "On" : "Off"); -- cgit v1.2.3