mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-02 02:03:30 +01:00
changed Not struct to a class.
- it was forward declared as a class, which caused warnings on some compilers. It should really have been a class anyway. - this addresses the same issue as PR #534, albeit from the other angle.
This commit is contained in:
parent
71fd2c2fdf
commit
d10b73f9f1
@ -43,7 +43,8 @@ namespace Matchers {
|
|||||||
|
|
||||||
namespace Generic {
|
namespace Generic {
|
||||||
template<typename ExpressionT>
|
template<typename ExpressionT>
|
||||||
struct Not : public MatcherImpl<Not<ExpressionT>, ExpressionT> {
|
class Not : public MatcherImpl<Not<ExpressionT>, ExpressionT> {
|
||||||
|
public:
|
||||||
explicit Not( Matcher<ExpressionT> const& matcher ) : m_matcher(matcher.clone()) {}
|
explicit Not( Matcher<ExpressionT> const& matcher ) : m_matcher(matcher.clone()) {}
|
||||||
Not( Not const& other ) : m_matcher( other.m_matcher ) {}
|
Not( Not const& other ) : m_matcher( other.m_matcher ) {}
|
||||||
|
|
||||||
@ -54,7 +55,7 @@ namespace Matchers {
|
|||||||
virtual std::string toString() const CATCH_OVERRIDE {
|
virtual std::string toString() const CATCH_OVERRIDE {
|
||||||
return "not " + m_matcher->toString();
|
return "not " + m_matcher->toString();
|
||||||
}
|
}
|
||||||
|
private:
|
||||||
Ptr< Matcher<ExpressionT> > m_matcher;
|
Ptr< Matcher<ExpressionT> > m_matcher;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user