summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorandot <mabingyao@gmail.com>2014-07-23 14:39:05 +0800
committerandot <mabingyao@gmail.com>2014-07-23 14:39:05 +0800
commitcaa165ece89136a4ef6bde87df865d4288ff94cf (patch)
tree5994fc7695a79668a32c78999a3376c3cdb3edd8 /include
parent2abffa80e10a9e0c4203310f0fa5b3f6949062e1 (diff)
Fixed compatibility issue with VS2013
Diffstat (limited to 'include')
-rw-r--r--include/base.h8
-rw-r--r--include/exception.h4
-rw-r--r--include/ini.h4
3 files changed, 12 insertions, 4 deletions
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<bool>(value) ? "On" : "Off");