From d10b73f9f178ea99e447d6e854fa110948eaa0a0 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Fri, 6 Nov 2015 18:05:35 +0000 Subject: [PATCH] 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. --- include/internal/catch_matchers.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/internal/catch_matchers.hpp b/include/internal/catch_matchers.hpp index 14249ebf..27878612 100644 --- a/include/internal/catch_matchers.hpp +++ b/include/internal/catch_matchers.hpp @@ -43,7 +43,8 @@ namespace Matchers { namespace Generic { template - struct Not : public MatcherImpl, ExpressionT> { + class Not : public MatcherImpl, ExpressionT> { + public: explicit Not( Matcher const& matcher ) : m_matcher(matcher.clone()) {} Not( Not const& other ) : m_matcher( other.m_matcher ) {} @@ -54,7 +55,7 @@ namespace Matchers { virtual std::string toString() const CATCH_OVERRIDE { return "not " + m_matcher->toString(); } - + private: Ptr< Matcher > m_matcher; };