Skip to content

-Wmismatched-tags in 3.5.0? #1401

@past-due

Description

@past-due

While I'm aware of the workarounds, I thought you might find the following interesting.

  • What is the issue you have?

-Wmismatched-tags using Clang v6.0 on Ubuntu 18.04:

json.hpp:1799:1: error: 'tuple_size' defined as a class template here but previously declared as a struct template [-Werror,-Wmismatched-tags]
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
^
/usr/include/c++/7.3.0/utility:84:5: note: did you mean class here?
    struct tuple_size;
    ^
[...]
json.hpp:1803:1: error: 'tuple_element' defined as a class template here but previously declared as a struct template [-Werror,-Wmismatched-tags]
class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
^
/usr/include/c++/7.3.0/utility:129:5: note: did you mean class here?
    struct tuple_element;
    ^
2 errors generated.
  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?

Attempted to update Warzone 2100 from nlohmann/json 3.4.0 to 3.5.0.
(Compilation succeeds with 3.4.0. CI treats many warnings as errors. -std=gnu++11)

  • What is the expected behavior?

Compilation succeeds without error / warnings.

  • And what is the actual behavior instead?

[-Wmismatched-tags] is triggered

The CXX compiler identification is Clang 6.0.0
on Ubuntu 18.04

  • Did you use a released version of the library or the version from the develop branch?

3.5.0 release

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions