Skip to content

Commit

Permalink
Disable Wmisatched-tags for clang compiler in std::tuple helpers spec…
Browse files Browse the repository at this point in the history
…ialization

Fixes tcbrindle#10

Signed-off-by: Herve Martin <[email protected]>
  • Loading branch information
herv committed Apr 18, 2019
1 parent e9cf080 commit 1c72f53
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/tcb/span.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,10 @@ constexpr auto get(span<E, S> s) -> decltype(s[N])

namespace std {

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmismatched-tags"
#endif
template <typename E, ptrdiff_t S>
class tuple_size<TCB_SPAN_NAMESPACE_NAME::span<E, S>> : public integral_constant<size_t, S> {};

Expand All @@ -764,6 +768,9 @@ class tuple_element<N, TCB_SPAN_NAMESPACE_NAME::span<E, S>> {
public:
using type = E;
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif

} // end namespace std

Expand Down

0 comments on commit 1c72f53

Please sign in to comment.