1 // (C) Copyright Gennadiy Rozental 2001.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 // See http://www.boost.org/libs/test for the library home page.
10 // Version : $Revision: 74248 $
12 // Description : toolbox implementation details
13 // ***************************************************************************
15 #ifndef BOOST_TEST_TOOLS_DETAIL_EXPRESSION_HOLDER_HPP_012705GER
16 #define BOOST_TEST_TOOLS_DETAIL_EXPRESSION_HOLDER_HPP_012705GER
18 #ifdef BOOST_NO_CXX11_AUTO_DECLARATIONS
20 #include <boost/test/detail/suppress_warnings.hpp>
22 //____________________________________________________________________________//
25 namespace test_tools {
28 // ************************************************************************** //
29 // ************** tt_detail::expression_holder ************** //
30 // ************************************************************************** //
32 class expression_holder {
34 virtual ~expression_holder() {}
35 virtual assertion_result evaluate( bool no_message = false ) const = 0;
38 //____________________________________________________________________________//
41 class expression_holder_t: public expression_holder {
43 explicit expression_holder_t( E const& e ) : m_expr( e ) {}
46 virtual assertion_result evaluate( bool no_message = false ) const { return m_expr.evaluate( no_message ); }
51 //____________________________________________________________________________//
54 expression_holder_t<E>
55 hold_expression( E const& e )
57 return expression_holder_t<E>( e );
60 //____________________________________________________________________________//
62 } // namespace tt_detail
63 } // namespace test_tools
66 #include <boost/test/detail/enable_warnings.hpp>
70 #endif // BOOST_TEST_TOOLS_DETAIL_EXPRESSION_HOLDER_HPP_012705GER