Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stiles <johnstiles@gmail.com>2017-03-05 20:50:03 +0300
committerJohn Stiles <johnstiles@gmail.com>2017-03-05 20:50:03 +0300
commitc4e3d6243ce0321b32c9bfc7e3692753b21e46f8 (patch)
tree7bce2b9c7cf44f625d7ff701b6f69a715eadb736 /include/rapidjson/prettywriter.h
parentcdea825a0bc81531d2cd2758362b606106373477 (diff)
Fix msvc x64 compilation issue
Disambiguate by putting the ENABLEIF on the return value instead of in the argument list.
Diffstat (limited to 'include/rapidjson/prettywriter.h')
-rw-r--r--include/rapidjson/prettywriter.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/rapidjson/prettywriter.h b/include/rapidjson/prettywriter.h
index abea4048..a9d0f02a 100644
--- a/include/rapidjson/prettywriter.h
+++ b/include/rapidjson/prettywriter.h
@@ -108,7 +108,7 @@ public:
}
template <typename T>
- bool String(const T* str, SizeType length, bool copy = false, RAPIDJSON_ENABLEIF((internal::IsSame<Ch, T>))) {
+ RAPIDJSON_ENABLEIF_RETURN((internal::IsSame<Ch, T>), (bool)) String(const T* str, SizeType length, bool copy = false) {
RAPIDJSON_ASSERT(str != 0);
(void)copy;
PrettyPrefix(kStringType);
@@ -128,7 +128,7 @@ public:
}
template <typename T>
- bool Key(const T* str, SizeType length, bool copy = false, RAPIDJSON_ENABLEIF((internal::IsSame<Ch, T>))) { return String(str, length, copy); }
+ RAPIDJSON_ENABLEIF_RETURN((internal::IsSame<Ch, T>), (bool)) Key(const T* str, SizeType length, bool copy = false) { return String(str, length, copy); }
#if RAPIDJSON_HAS_STDSTRING
bool Key(const std::basic_string<Ch>& str) {
@@ -187,18 +187,18 @@ public:
//! Simpler but slower overload.
template <typename T>
- bool String(const T* const& str, RAPIDJSON_ENABLEIF((internal::IsSame<Ch, T>))) { return String(str, internal::StrLen(str)); }
+ RAPIDJSON_ENABLEIF_RETURN((internal::IsSame<Ch, T>), (bool)) String(const T* const& str) { return String(str, internal::StrLen(str)); }
template <typename T>
- bool Key(const T* const& str, RAPIDJSON_ENABLEIF((internal::IsSame<Ch, T>))) { return Key(str, internal::StrLen(str)); }
+ RAPIDJSON_ENABLEIF_RETURN((internal::IsSame<Ch, T>), (bool)) Key(const T* const& str) { return Key(str, internal::StrLen(str)); }
//! The compiler can give us the length of quoted strings for free.
template <typename T, size_t N>
- bool String(const T (&str)[N], RAPIDJSON_ENABLEIF((internal::IsSame<Ch, T>))) {
+ RAPIDJSON_ENABLEIF_RETURN((internal::IsSame<Ch, T>), (bool)) String(const T (&str)[N]) {
RAPIDJSON_ASSERT(str[N-1] == '\0'); // you must pass in a null-terminated string (quoted constant strings are always null-terminated)
return String(str, N-1);
}
template <typename T, size_t N>
- bool Key(const T (&str)[N], RAPIDJSON_ENABLEIF((internal::IsSame<Ch, T>))) {
+ RAPIDJSON_ENABLEIF_RETURN((internal::IsSame<Ch, T>), (bool)) Key(const T (&str)[N]) {
RAPIDJSON_ASSERT(str[N-1] == '\0'); // you must pass in a null-terminated string (quoted constant strings are always null-terminated)
return Key(str, N-1);
}