Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPhil Nash2015-11-06 18:05:35 +0000
committerPhil Nash2015-11-06 18:07:29 +0000
commitd10b73f9f178ea99e447d6e854fa110948eaa0a0 (patch)
treece246ad3072d872187e33a8a1f4e013ac9020e0d /include
parent71fd2c2fdf3297b785fee4f3dead7b7412a2eac2 (diff)
downloadcatch3-d10b73f9f178ea99e447d6e854fa110948eaa0a0.tar.gz
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.
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_matchers.hpp5
1 files 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<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()) {}
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<ExpressionT> > m_matcher;
};