]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/typeof/test/function_binding.cpp
1 // Copyright (C) 2006 Arkadiy Vertleyb
2 // Use, modification and distribution is subject to the Boost Software
3 // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
5 #include <boost/typeof/typeof.hpp>
6 #include <boost/type_traits/is_same.hpp>
7 #include <boost/type_traits/is_same.hpp>
8 #include <boost/static_assert.hpp>
13 typedef int(&FREF1
)(double);
14 typedef int(&FREF2
)(...);
15 typedef int(&FREF3
)(int, ...);
20 BOOST_STATIC_ASSERT((boost::is_same
<BOOST_TYPEOF(fref1
), int(double)>::value
));
21 BOOST_STATIC_ASSERT((boost::is_same
<BOOST_TYPEOF(fref2
), int(...)>::value
));
22 BOOST_STATIC_ASSERT((boost::is_same
<BOOST_TYPEOF(fref3
), int(int,...)>::value
));