mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-24 03:53:29 +01:00
2a9d8d9e36
- Brought older code up to current convention (with the help of a Python script)
32 lines
901 B
C++
32 lines
901 B
C++
/*
|
|
* 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 {
|
|
|
|
// Captures the LHS of the expression and wraps it in an Expression Lhs object
|
|
class ExpressionDecomposer {
|
|
public:
|
|
|
|
template<typename T>
|
|
ExpressionLhs<T const&> operator->* ( T const& operand ) {
|
|
return ExpressionLhs<T const&>( operand );
|
|
}
|
|
|
|
ExpressionLhs<bool> operator->* ( bool value ) {
|
|
return ExpressionLhs<bool>( value );
|
|
}
|
|
};
|
|
|
|
} // end namespace Catch
|
|
|
|
#endif // TWOBLUECUBES_CATCH_EXPRESSION_DECOMPOSER_HPP_INCLUDED
|