Closed perlippens closed 9 months ago
json json;
How can you expect this code to be compiled?
just like
int int;
The json json;
code is technically valid, though I would say bad style. int int;
won't compile because int
is a reserved keyword.
Description
The small example compiles with g++ but not with clang++-9.0.1/gcc-9.2.0 or later
The compile error is caused by the operator== declaration for unrelated class A objects where class A is forward declared. Not sure whether this is a clang issue or a json issue.
Reproduction steps
Compile the minimal code example using clang++ version 9.0.1 or later
Expected vs. actual results
Expecting no compile errors.
Minimal code example
Error messages
Compiler and operating system
clang++-9.0.1 (clang901_gcc920)
Library version
3.11.2 (single header)
Validation
develop
branch is used.