Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

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.
Commit
d10b73f9f178ea99e447d6e854fa110948eaa0a0
Author
Phil Nash ·
Parents
71fd2c2fdf32

Files · Download .tar.gz

Changes

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