mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-17 11:12:25 +01:00
Solved compiler warnings C5026 and C5027 for VS2015.
This commit is contained in:
parent
88732e85b2
commit
f1729d5aff
@ -34,6 +34,14 @@ namespace Catch {
|
||||
No
|
||||
}; };
|
||||
|
||||
#ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS
|
||||
#define CATCH_CONFIG_CPP11_NON_MOVABLE(name) \
|
||||
name(name&&) = delete; \
|
||||
name& operator=(name&&) = delete;
|
||||
#else
|
||||
#define CATCH_CONFIG_CPP11_NON_MOVABLE(name)
|
||||
#endif
|
||||
|
||||
class NonCopyable {
|
||||
#ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS
|
||||
NonCopyable( NonCopyable const& ) = delete;
|
||||
|
@ -39,6 +39,9 @@ namespace Matchers {
|
||||
virtual Ptr<Matcher<ExpressionT> > clone() const {
|
||||
return Ptr<Matcher<ExpressionT> >( new DerivedT( static_cast<DerivedT const&>( *this ) ) );
|
||||
}
|
||||
|
||||
MatcherImpl() {};
|
||||
CATCH_CONFIG_CPP11_NON_MOVABLE(MatcherImpl)
|
||||
};
|
||||
|
||||
namespace Generic {
|
||||
|
@ -82,6 +82,8 @@ namespace Catch {
|
||||
}
|
||||
|
||||
mutable unsigned int m_rc;
|
||||
|
||||
CATCH_CONFIG_CPP11_NON_MOVABLE(SharedImpl)
|
||||
};
|
||||
|
||||
} // end namespace Catch
|
||||
|
@ -56,6 +56,10 @@ namespace Catch {
|
||||
virtual std::string getDescription() const {
|
||||
return T::getDescription();
|
||||
}
|
||||
|
||||
public:
|
||||
ReporterFactory() {}
|
||||
CATCH_CONFIG_CPP11_NON_MOVABLE(ReporterFactory)
|
||||
};
|
||||
|
||||
public:
|
||||
@ -63,6 +67,8 @@ namespace Catch {
|
||||
ReporterRegistrar( std::string const& name ) {
|
||||
getMutableRegistryHub().registerReporter( name, new ReporterFactory() );
|
||||
}
|
||||
|
||||
CATCH_CONFIG_CPP11_NON_MOVABLE(ReporterRegistrar)
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
@ -240,6 +240,8 @@ namespace Catch {
|
||||
virtual bool assertionEnded( AssertionStats const& ) CATCH_OVERRIDE {
|
||||
return false;
|
||||
}
|
||||
|
||||
CATCH_CONFIG_CPP11_NON_MOVABLE(TestEventListenerBase)
|
||||
};
|
||||
|
||||
} // end namespace Catch
|
||||
|
@ -123,6 +123,8 @@ public: // IStreamingReporter
|
||||
return this;
|
||||
}
|
||||
|
||||
MultipleReporters() {}
|
||||
CATCH_CONFIG_CPP11_NON_MOVABLE(MultipleReporters)
|
||||
};
|
||||
|
||||
Ptr<IStreamingReporter> addReporter( Ptr<IStreamingReporter> const& existingReporter, Ptr<IStreamingReporter> const& additionalReporter ) {
|
||||
|
Loading…
Reference in New Issue
Block a user