diff --git a/src/catch2/catch_matchers.h b/src/catch2/catch_matchers.h index 78f12da9..2d43cb8a 100644 --- a/src/catch2/catch_matchers.h +++ b/src/catch2/catch_matchers.h @@ -58,7 +58,7 @@ namespace Matchers { namespace Detail { template - struct MatchAllOf : MatcherBase { + struct MatchAllOf final : MatcherBase { MatchAllOf() = default; MatchAllOf(MatchAllOf const&) = delete; MatchAllOf& operator=(MatchAllOf const&) = delete; @@ -112,7 +112,7 @@ namespace Matchers { MatchAllOf operator&& (MatcherBase const& lhs, MatchAllOf const& rhs) = delete; template - struct MatchAnyOf : MatcherBase { + struct MatchAnyOf final : MatcherBase { MatchAnyOf() = default; MatchAnyOf(MatchAnyOf const&) = delete; MatchAnyOf& operator=(MatchAnyOf const&) = delete; @@ -165,7 +165,7 @@ namespace Matchers { MatchAnyOf operator|| (MatcherBase const& lhs, MatchAnyOf const& rhs) = delete; template - struct MatchNotOf : MatcherBase { + struct MatchNotOf final : MatcherBase { explicit MatchNotOf( MatcherBase const& underlyingMatcher ): m_underlyingMatcher( underlyingMatcher ) diff --git a/src/catch2/catch_matchers_templates.hpp b/src/catch2/catch_matchers_templates.hpp index d770f25c..43efc5b0 100644 --- a/src/catch2/catch_matchers_templates.hpp +++ b/src/catch2/catch_matchers_templates.hpp @@ -107,7 +107,7 @@ namespace Matchers { template - struct MatchAllOfGeneric : MatcherGenericBase { + struct MatchAllOfGeneric final : MatcherGenericBase { MatchAllOfGeneric(MatcherTs const&... matchers) : m_matchers{std::addressof(matchers)...} {} explicit MatchAllOfGeneric(std::array matchers) : m_matchers{matchers} {} @@ -125,7 +125,7 @@ namespace Matchers { template - struct MatchAnyOfGeneric : MatcherGenericBase { + struct MatchAnyOfGeneric final : MatcherGenericBase { MatchAnyOfGeneric(MatcherTs const&... matchers) : m_matchers{std::addressof(matchers)...} {} explicit MatchAnyOfGeneric(std::array matchers) : m_matchers{matchers} {} @@ -143,7 +143,7 @@ namespace Matchers { template - struct MatchNotOfGeneric : MatcherGenericBase { + struct MatchNotOfGeneric final : MatcherGenericBase { explicit MatchNotOfGeneric(MatcherT const& matcher) : m_matcher{matcher} {} template