mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Cleanup visibility in generic not matcher
This commit is contained in:
parent
25c5ae240c
commit
d33af93e17
@ -170,6 +170,11 @@ namespace Matchers {
|
|||||||
return "not " + m_matcher.toString();
|
return "not " + m_matcher.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Negating negation can just unwrap and return underlying matcher
|
||||||
|
friend MatcherT const& operator ! (Detail::MatchNotOfGeneric<MatcherT> const& matcher) {
|
||||||
|
return matcher.m_matcher;
|
||||||
|
}
|
||||||
|
private:
|
||||||
MatcherT const& m_matcher;
|
MatcherT const& m_matcher;
|
||||||
};
|
};
|
||||||
} // namespace Detail
|
} // namespace Detail
|
||||||
@ -190,6 +195,7 @@ namespace Matchers {
|
|||||||
return { lhs, rhs };
|
return { lhs, rhs };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Wrap provided generic matcher in generic negator
|
||||||
template<typename MatcherT>
|
template<typename MatcherT>
|
||||||
typename std::enable_if<Detail::is_generic_matcher<MatcherT>::value, Detail::MatchNotOfGeneric<MatcherT>>::type
|
typename std::enable_if<Detail::is_generic_matcher<MatcherT>::value, Detail::MatchNotOfGeneric<MatcherT>>::type
|
||||||
operator ! (MatcherT const& matcher) {
|
operator ! (MatcherT const& matcher) {
|
||||||
@ -260,12 +266,6 @@ namespace Matchers {
|
|||||||
return Detail::MatchAnyOfGeneric<MatcherLHS, MatchersRHS...>{Detail::array_cat(static_cast<void const*>(std::addressof(lhs)), std::move(rhs.m_matchers))};
|
return Detail::MatchAnyOfGeneric<MatcherLHS, MatchersRHS...>{Detail::array_cat(static_cast<void const*>(std::addressof(lhs)), std::move(rhs.m_matchers))};
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename MatcherT>
|
|
||||||
MatcherT const& operator ! (Detail::MatchNotOfGeneric<MatcherT> const& matcher) {
|
|
||||||
return matcher.m_matcher;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Matchers
|
} // namespace Matchers
|
||||||
} // namespace Catch
|
} // namespace Catch
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user