]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/functional/factory/test/value_factory.cpp
1 /*=============================================================================
2 Copyright (c) 2007 Tobias Schwinger
4 Use modification and distribution are subject to the Boost Software
5 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt).
7 ==============================================================================*/
9 #include <boost/functional/value_factory.hpp>
10 #include <boost/core/lightweight_test.hpp>
16 sum(int a
, int b
) : val_sum(a
+ b
) { }
17 operator int() const { return this->val_sum
; }
24 sum
instance( boost::value_factory
< sum
>()(one
,two
) );
25 BOOST_TEST(instance
== 3);
27 return boost::report_errors();