]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/type_traits/conjunction.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / type_traits / conjunction.hpp
1 /*
2 Copyright 2020 Glen Joseph Fernandes
3 (glenjofe@gmail.com)
4
5 Distributed under the Boost Software License,
6 Version 1.0. (See accompanying file LICENSE_1_0.txt
7 or copy at http://www.boost.org/LICENSE_1_0.txt)
8 */
9
10 #ifndef BOOST_TT_CONJUNCTION_HPP_INCLUDED
11 #define BOOST_TT_CONJUNCTION_HPP_INCLUDED
12
13 #include <boost/type_traits/conditional.hpp>
14 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
15 #include <boost/type_traits/integral_constant.hpp>
16 #endif
17
18 namespace boost {
19
20 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
21 template<class...>
22 struct conjunction
23 : true_type { };
24
25 template<class T>
26 struct conjunction<T>
27 : T { };
28
29 template<class T, class... U>
30 struct conjunction<T, U...>
31 : conditional<bool(T::value), conjunction<U...>, T>::type { };
32 #else
33 template<class T, class U>
34 struct conjunction
35 : conditional<bool(T::value), U, T>::type { };
36 #endif
37
38 } /* boost */
39
40 #endif