mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
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.
This commit is contained in:
parent
0ac9f44985
commit
153965a655
@ -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 {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user