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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-02-19 18:59:51 +0100
committerMartin Hořeňovský2020-02-20 13:03:32 +0100
commit260263b9bfe8bdeaf45d40a0a3dead26149f5d0f (patch)
tree8861b6f420f94297550956b12a1ca2a194deec95
parentcf6575576f1c5b84b9148d47e96027e39915e132 (diff)
downloadcatch3-260263b9bfe8bdeaf45d40a0a3dead26149f5d0f.tar.gz
Combined matchers are now final
-rw-r--r--src/catch2/catch_matchers.h6
-rw-r--r--src/catch2/catch_matchers_templates.hpp6
2 files changed, 6 insertions, 6 deletions
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<typename ArgT>
- struct MatchAllOf : MatcherBase<ArgT> {
+ struct MatchAllOf final : MatcherBase<ArgT> {
MatchAllOf() = default;
MatchAllOf(MatchAllOf const&) = delete;
MatchAllOf& operator=(MatchAllOf const&) = delete;
@@ -112,7 +112,7 @@ namespace Matchers {
MatchAllOf<ArgT> operator&& (MatcherBase<ArgT> const& lhs, MatchAllOf<ArgT> const& rhs) = delete;
template<typename ArgT>
- struct MatchAnyOf : MatcherBase<ArgT> {
+ struct MatchAnyOf final : MatcherBase<ArgT> {
MatchAnyOf() = default;
MatchAnyOf(MatchAnyOf const&) = delete;
MatchAnyOf& operator=(MatchAnyOf const&) = delete;
@@ -165,7 +165,7 @@ namespace Matchers {
MatchAnyOf<ArgT> operator|| (MatcherBase<ArgT> const& lhs, MatchAnyOf<ArgT> const& rhs) = delete;
template<typename ArgT>
- struct MatchNotOf : MatcherBase<ArgT> {
+ struct MatchNotOf final : MatcherBase<ArgT> {
explicit MatchNotOf( MatcherBase<ArgT> 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<typename... MatcherTs>
- struct MatchAllOfGeneric : MatcherGenericBase {
+ struct MatchAllOfGeneric final : MatcherGenericBase {
MatchAllOfGeneric(MatcherTs const&... matchers) : m_matchers{std::addressof(matchers)...} {}
explicit MatchAllOfGeneric(std::array<void const*, sizeof...(MatcherTs)> matchers) : m_matchers{matchers} {}
@@ -125,7 +125,7 @@ namespace Matchers {
template<typename... MatcherTs>
- struct MatchAnyOfGeneric : MatcherGenericBase {
+ struct MatchAnyOfGeneric final : MatcherGenericBase {
MatchAnyOfGeneric(MatcherTs const&... matchers) : m_matchers{std::addressof(matchers)...} {}
explicit MatchAnyOfGeneric(std::array<void const*, sizeof...(MatcherTs)> matchers) : m_matchers{matchers} {}
@@ -143,7 +143,7 @@ namespace Matchers {
template<typename MatcherT>
- struct MatchNotOfGeneric : MatcherGenericBase {
+ struct MatchNotOfGeneric final : MatcherGenericBase {
explicit MatchNotOfGeneric(MatcherT const& matcher) : m_matcher{matcher} {}
template<typename Arg>