Return JsonScope::operator<< overloads for string literals and pointers, because otherwise they are converted to bool.
GitOrigin-RevId: a699415fa15350be1daf9718239b295f272dc3ef
This commit is contained in:
parent
9788681015
commit
5fdb88a8ac
@ -301,6 +301,13 @@ class JsonScope {
|
||||
JsonScope &operator<<(double x) {
|
||||
return *this << JsonFloat(x);
|
||||
}
|
||||
template <size_t N>
|
||||
JsonScope &operator<<(const char (&x)[N]) {
|
||||
return *this << JsonString(Slice(x));
|
||||
}
|
||||
JsonScope &operator<<(const char *x) {
|
||||
return *this << JsonString(Slice(x));
|
||||
}
|
||||
JsonScope &operator<<(Slice x) {
|
||||
return *this << JsonString(x);
|
||||
}
|
||||
|
Reference in New Issue
Block a user