]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/functional/overloaded_function/test/make_decl.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / functional / overloaded_function / test / make_decl.cpp
1
2 // Copyright (C) 2009-2012 Lorenzo Caminiti
3 // Distributed under the Boost Software License, Version 1.0
4 // (see accompanying file LICENSE_1_0.txt or a copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 // Home at http://www.boost.org/libs/functional/overloaded_function
7
8 #include "identity.hpp"
9 #include <boost/functional/overloaded_function.hpp>
10 #include <boost/typeof/typeof.hpp>
11 #include <boost/detail/lightweight_test.hpp>
12
13 int main() {
14 //[identity_make_decl
15 BOOST_AUTO(identity, boost::make_overloaded_function(
16 identity_s, identity_i, identity_d));
17
18 BOOST_TEST(identity("abc") == "abc");
19 BOOST_TEST(identity(123) == 123);
20 BOOST_TEST(identity(1.23) == 1.23);
21 //]
22 return boost::report_errors();
23 }
24