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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-11-26 00:38:13 +0100
committerMartin Hořeňovský2021-11-26 00:38:13 +0100
commit153965a655fe62841297ed0532edc161d1b3c4aa (patch)
tree7e1e9c42007b5ceb9f00d49b58f26a3280940589 /src/catch2
parent0ac9f44985930227d9cbd886b401e49ea3d70942 (diff)
downloadcatch3-153965a655fe62841297ed0532edc161d1b3c4aa.tar.gz
Delete useless MatcherMethod base class
All of its functionality can be moved into the `MatcherBase` class, simplifying the code a bit and removing a warning about class with virtual member functions but no virtual destructor. Closes #2182 as it is no longer relevant.
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/matchers/catch_matchers.hpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/catch2/matchers/catch_matchers.hpp b/src/catch2/matchers/catch_matchers.hpp
index 86f63bee..7a77a62c 100644
--- a/src/catch2/matchers/catch_matchers.hpp
+++ b/src/catch2/matchers/catch_matchers.hpp
@@ -35,22 +35,11 @@ namespace Matchers {
mutable std::string m_cachedToString;
};
-#ifdef __clang__
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wnon-virtual-dtor"
-#endif
-
- template<typename ObjectT>
- struct MatcherMethod {
- virtual bool match(ObjectT const& arg) const = 0;
- };
-
-#ifdef __clang__
-# pragma clang diagnostic pop
-#endif
template<typename T>
- struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {};
+ struct MatcherBase : MatcherUntypedBase {
+ virtual bool match( T const& arg ) const = 0;
+ };
namespace Detail {