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:
Phil Nash 2015-11-06 18:05:35 +00:00
parent 71fd2c2fdf
commit d10b73f9f1

View File

@ -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;
}; };