Disable -Wmismatched-tags warning on tuple_size / tuple_element
This commit is contained in:
parent
68ec3eb8d6
commit
45819dce54
2 changed files with 18 additions and 1 deletions
|
@ -147,6 +147,11 @@ auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decl
|
||||||
// And see https://github.com/nlohmann/json/pull/1391
|
// And see https://github.com/nlohmann/json/pull/1391
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
|
#if defined(__clang__)
|
||||||
|
// Fix: https://github.com/nlohmann/json/issues/1401
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||||
|
#endif
|
||||||
template <typename IteratorType>
|
template <typename IteratorType>
|
||||||
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
|
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
|
||||||
: public std::integral_constant<std::size_t, 2> {};
|
: public std::integral_constant<std::size_t, 2> {};
|
||||||
|
@ -159,4 +164,7 @@ class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
|
||||||
get<N>(std::declval <
|
get<N>(std::declval <
|
||||||
::nlohmann::detail::iteration_proxy_value<IteratorType >> ()));
|
::nlohmann::detail::iteration_proxy_value<IteratorType >> ()));
|
||||||
};
|
};
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
}
|
}
|
|
@ -1808,6 +1808,11 @@ auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decl
|
||||||
// And see https://github.com/nlohmann/json/pull/1391
|
// And see https://github.com/nlohmann/json/pull/1391
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
|
#if defined(__clang__)
|
||||||
|
// Fix: https://github.com/nlohmann/json/issues/1401
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||||
|
#endif
|
||||||
template <typename IteratorType>
|
template <typename IteratorType>
|
||||||
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
|
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
|
||||||
: public std::integral_constant<std::size_t, 2> {};
|
: public std::integral_constant<std::size_t, 2> {};
|
||||||
|
@ -1820,8 +1825,12 @@ class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
|
||||||
get<N>(std::declval <
|
get<N>(std::declval <
|
||||||
::nlohmann::detail::iteration_proxy_value<IteratorType >> ()));
|
::nlohmann::detail::iteration_proxy_value<IteratorType >> ()));
|
||||||
};
|
};
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace nlohmann
|
namespace nlohmann
|
||||||
{
|
{
|
||||||
namespace detail
|
namespace detail
|
||||||
|
|
Loading…
Reference in a new issue