]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/test/mpl_interop_test2.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / type_traits / test / mpl_interop_test2.cpp
1
2 // (C) Copyright John Maddock 2000.
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7 #include <boost/type_traits/is_void.hpp>
8 #include <boost/mpl/if.hpp>
9 #include <boost/static_assert.hpp>
10
11 template <class T>
12 struct if_test
13 {
14 typedef typename boost::mpl::if_<
15 boost::is_void<T>,
16 int, T>::type type;
17 };
18
19 if_test<void>::type t1 = 0;
20 if_test<double>::type t2 = 0;
21
22 int main()
23 {
24 return (int)(t1 + t2);
25 }