Conditionally removes usage of deprecated features

-add macros to test for C++ version and features
to catch_compiler_capabilities.hpp
- replaces dynamic exception specifications (deprecated)
with noexcept in C++ Version >= 11
- defines defaulted copy constructor/move constructors/assignment
in C++ Version >= 11 since their implicit generation is deprecated
under some circumstances.
- fixes #259
This commit is contained in:
gnzlbg 2014-03-20 12:48:19 +01:00
parent ba13f3f098
commit ce6598599b
13 changed files with 103 additions and 10 deletions

View file

@ -14,14 +14,21 @@
namespace Catch {
// Wraps the LHS of an expression and captures the operator and RHS (if any) - wrapping them all
// in an ExpressionResultBuilder object
// Wraps the LHS of an expression and captures the operator and RHS (if any) -
// wrapping them all in an ExpressionResultBuilder object
template<typename T>
class ExpressionLhs {
void operator = ( ExpressionLhs const& );
ExpressionLhs& operator = ( ExpressionLhs const& );
# ifdef CATCH_CPP11_OR_GREATER
ExpressionLhs& operator = ( ExpressionLhs && ) = delete;
# endif
public:
ExpressionLhs( T lhs ) : m_lhs( lhs ) {}
# ifdef CATCH_CPP11_OR_GREATER
ExpressionLhs( ExpressionLhs const& ) = default;
ExpressionLhs( ExpressionLhs && ) = default;
# endif
template<typename RhsT>
ExpressionResultBuilder& operator == ( RhsT const& rhs ) {