@@ -108,7 +108,7 @@ class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding,
108
108
}
109
109
110
110
template <typename T>
111
- bool String (const T* str, SizeType length, bool copy = false , RAPIDJSON_ENABLEIF((internal::IsSame<Ch, T>)) ) {
111
+ RAPIDJSON_ENABLEIF_RETURN ((internal::IsSame<Ch, T>), ( bool )) String(const T* str, SizeType length, bool copy = false ) {
112
112
RAPIDJSON_ASSERT (str != 0 );
113
113
(void )copy;
114
114
PrettyPrefix (kStringType );
@@ -128,7 +128,7 @@ class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding,
128
128
}
129
129
130
130
template <typename T>
131
- bool Key (const T* str, SizeType length, bool copy = false , RAPIDJSON_ENABLEIF((internal::IsSame<Ch, T>)) ) { return String (str, length, copy); }
131
+ RAPIDJSON_ENABLEIF_RETURN ((internal::IsSame<Ch, T>), ( bool )) Key(const T* str, SizeType length, bool copy = false ) { return String (str, length, copy); }
132
132
133
133
#if RAPIDJSON_HAS_STDSTRING
134
134
bool Key (const std::basic_string<Ch>& str) {
@@ -187,18 +187,18 @@ class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding,
187
187
188
188
// ! Simpler but slower overload.
189
189
template <typename T>
190
- bool String ( const T* const & str, RAPIDJSON_ENABLEIF(( internal::IsSame<Ch, T>)) ) { return String (str, internal::StrLen (str)); }
190
+ RAPIDJSON_ENABLEIF_RETURN (( internal::IsSame<Ch, T>), ( bool )) String( const T* const & str ) { return String (str, internal::StrLen (str)); }
191
191
template <typename T>
192
- bool Key ( const T* const & str, RAPIDJSON_ENABLEIF(( internal::IsSame<Ch, T>)) ) { return Key (str, internal::StrLen (str)); }
192
+ RAPIDJSON_ENABLEIF_RETURN (( internal::IsSame<Ch, T>), ( bool )) Key( const T* const & str ) { return Key (str, internal::StrLen (str)); }
193
193
194
194
// ! The compiler can give us the length of quoted strings for free.
195
195
template <typename T, size_t N>
196
- bool String (const T (&str)[N], RAPIDJSON_ENABLEIF((internal::IsSame<Ch, T>)) ) {
196
+ RAPIDJSON_ENABLEIF_RETURN ((internal::IsSame<Ch, T>), ( bool )) String(const T (&str)[N]) {
197
197
RAPIDJSON_ASSERT (str[N-1 ] == ' \0 ' ); // you must pass in a null-terminated string (quoted constant strings are always null-terminated)
198
198
return String (str, N-1 );
199
199
}
200
200
template <typename T, size_t N>
201
- bool Key (const T (&str)[N], RAPIDJSON_ENABLEIF((internal::IsSame<Ch, T>)) ) {
201
+ RAPIDJSON_ENABLEIF_RETURN ((internal::IsSame<Ch, T>), ( bool )) Key(const T (&str)[N]) {
202
202
RAPIDJSON_ASSERT (str[N-1 ] == ' \0 ' ); // you must pass in a null-terminated string (quoted constant strings are always null-terminated)
203
203
return Key (str, N-1 );
204
204
}
0 commit comments