]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/local_function/test/operator_seq.cpp
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/local_function
8 #include <boost/local_function.hpp>
9 #include <boost/typeof/typeof.hpp>
10 #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
11 #include <boost/detail/lightweight_test.hpp>
17 BOOST_TYPEOF_REGISTER_TYPE(point
) // Register for `NAME` below.
20 bool BOOST_LOCAL_FUNCTION( (const point
& p
) (const point
& q
) ) {
21 return p
.x
== q
.x
&& p
.y
== q
.y
;
22 } BOOST_LOCAL_FUNCTION_NAME(equal
)
24 point a
; a
.x
= 1; a
.y
= 2;
26 BOOST_TEST(equal(a
, b
));
27 return boost::report_errors();