Solved compiler warnings C5026 and C5027 for VS2015.

This commit is contained in:
RLangendam 2016-10-08 17:38:33 +02:00
parent 88732e85b2
commit f1729d5aff
6 changed files with 23 additions and 0 deletions

View File

@ -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;

View File

@ -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 {

View File

@ -82,6 +82,8 @@ namespace Catch {
}
mutable unsigned int m_rc;
CATCH_CONFIG_CPP11_NON_MOVABLE(SharedImpl)
};
} // end namespace Catch

View File

@ -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>

View File

@ -240,6 +240,8 @@ namespace Catch {
virtual bool assertionEnded( AssertionStats const& ) CATCH_OVERRIDE {
return false;
}
CATCH_CONFIG_CPP11_NON_MOVABLE(TestEventListenerBase)
};
} // end namespace Catch

View File

@ -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 ) {