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
|
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 {
|
class NonCopyable {
|
||||||
#ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS
|
#ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS
|
||||||
NonCopyable( NonCopyable const& ) = delete;
|
NonCopyable( NonCopyable const& ) = delete;
|
||||||
|
@ -39,6 +39,9 @@ namespace Matchers {
|
|||||||
virtual Ptr<Matcher<ExpressionT> > clone() const {
|
virtual Ptr<Matcher<ExpressionT> > clone() const {
|
||||||
return Ptr<Matcher<ExpressionT> >( new DerivedT( static_cast<DerivedT const&>( *this ) ) );
|
return Ptr<Matcher<ExpressionT> >( new DerivedT( static_cast<DerivedT const&>( *this ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MatcherImpl() {};
|
||||||
|
CATCH_CONFIG_CPP11_NON_MOVABLE(MatcherImpl)
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace Generic {
|
namespace Generic {
|
||||||
|
@ -82,6 +82,8 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mutable unsigned int m_rc;
|
mutable unsigned int m_rc;
|
||||||
|
|
||||||
|
CATCH_CONFIG_CPP11_NON_MOVABLE(SharedImpl)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace Catch
|
} // end namespace Catch
|
||||||
|
@ -56,6 +56,10 @@ namespace Catch {
|
|||||||
virtual std::string getDescription() const {
|
virtual std::string getDescription() const {
|
||||||
return T::getDescription();
|
return T::getDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
ReporterFactory() {}
|
||||||
|
CATCH_CONFIG_CPP11_NON_MOVABLE(ReporterFactory)
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -63,6 +67,8 @@ namespace Catch {
|
|||||||
ReporterRegistrar( std::string const& name ) {
|
ReporterRegistrar( std::string const& name ) {
|
||||||
getMutableRegistryHub().registerReporter( name, new ReporterFactory() );
|
getMutableRegistryHub().registerReporter( name, new ReporterFactory() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CATCH_CONFIG_CPP11_NON_MOVABLE(ReporterRegistrar)
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
@ -240,6 +240,8 @@ namespace Catch {
|
|||||||
virtual bool assertionEnded( AssertionStats const& ) CATCH_OVERRIDE {
|
virtual bool assertionEnded( AssertionStats const& ) CATCH_OVERRIDE {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CATCH_CONFIG_CPP11_NON_MOVABLE(TestEventListenerBase)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace Catch
|
} // end namespace Catch
|
||||||
|
@ -123,6 +123,8 @@ public: // IStreamingReporter
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MultipleReporters() {}
|
||||||
|
CATCH_CONFIG_CPP11_NON_MOVABLE(MultipleReporters)
|
||||||
};
|
};
|
||||||
|
|
||||||
Ptr<IStreamingReporter> addReporter( Ptr<IStreamingReporter> const& existingReporter, Ptr<IStreamingReporter> const& additionalReporter ) {
|
Ptr<IStreamingReporter> addReporter( Ptr<IStreamingReporter> const& existingReporter, Ptr<IStreamingReporter> const& additionalReporter ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user