]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/test/common_type_sfinae_test.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / type_traits / test / common_type_sfinae_test.cpp
1
2 // Copyright Peter Dimov 2015
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.tt.org/LICENSE_1_0.txt)
6
7 #include "test.hpp"
8 #include "check_type.hpp"
9 #ifdef TEST_STD
10 # include <type_traits>
11 #else
12 # include <boost/type_traits/common_type.hpp>
13 #endif
14 #include <iostream>
15
16 struct X {};
17 struct Y {};
18
19 TT_TEST_BEGIN(common_type_sfinae)
20 {
21 #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
22
23 {
24 tt::common_type<int, void*> tmp;
25 (void)tmp;
26 }
27
28 {
29 tt::common_type<X, Y> tmp;
30 (void)tmp;
31 }
32
33 {
34 tt::common_type<X&, int const*> tmp;
35 (void)tmp;
36 }
37
38 {
39 tt::common_type<X, Y, int, void*> tmp;
40 (void)tmp;
41 }
42
43 #endif
44 }
45 TT_TEST_END