Files
Catch2/include/internal/catch_expression_decomposer.hpp
T

31 lines
901 B
C++
Raw Normal View History

2012-10-24 22:09:01 +01:00
/*
* Created by Phil on 11/5/2012.
* Copyright 2012 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef TWOBLUECUBES_CATCH_EXPRESSION_DECOMPOSER_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_EXPRESSION_DECOMPOSER_HPP_INCLUDED
#include "catch_expression_lhs.hpp"
namespace Catch {
2012-10-26 09:05:36 +01:00
// Captures the LHS of the expression and wraps it in an Expression Lhs object
2012-10-24 22:09:01 +01:00
class ExpressionDecomposer {
public:
template<typename T>
2013-04-23 18:58:56 +01:00
ExpressionLhs<T const&> operator->* ( T const& operand ) {
return ExpressionLhs<T const&>( operand );
2012-10-24 22:09:01 +01:00
}
ExpressionLhs<bool> operator->* ( bool value ) {
return ExpressionLhs<bool>( value );
}
};
} // end namespace Catch
#endif // TWOBLUECUBES_CATCH_EXPRESSION_DECOMPOSER_HPP_INCLUDED