You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We totally forgot to implement the comparison operators other than ==
and != for scalar types. Consequently, comparing a JSON value with a
scalar type led to compile errors.
@ajneu I'm afraid it's not so simple, because we don't always have conversions both ways, for instance when the ScalaType is const char *. Then, basic_json(lhs) works, but from_json(lhs, tmp) does not.
I added the missing comparison operators with 90273e9. If Travis and AppVeyor succeed, I shall merge this.
Hi,
try compile the following code with clang:
clang++-3.9 -std=c++14 -o go main.cpp
We get the following compile error:
.
.
.
But in comparision:
operator==
compiles fine:.
.
.
Checking the code we see, that
operator==
, has the following bool operator==(const_reference lhs, const ScalarType rhs)but
operator<=
,operator<
,operator>=
andoperator>
do not have similar functions handling scalar.Ultimately I would like to see the following compile under clang:
The text was updated successfully, but these errors were encountered: