1/*
2Copyright 2020 Glen Joseph Fernandes
3(glenjofe@gmail.com)
4
5Distributed under the Boost Software License,
6Version 1.0. (See accompanying file LICENSE_1_0.txt
7or copy at http://www.boost.org/LICENSE_1_0.txt)
8*/
9
10#ifndef BOOST_TT_DISJUNCTION_HPP_INCLUDED
11#define BOOST_TT_DISJUNCTION_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
18namespace boost {
19
20#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
21template<class...>
22struct disjunction
23 : false_type { };
24
25template<class T>
26struct disjunction<T>
27 : T { };
28
29template<class T, class... U>
30struct disjunction<T, U...>
31 : conditional<bool(T::value), T, disjunction<U...> >::type { };
32#else
33template<class T, class U>
34struct disjunction
35 : conditional<bool(T::value), T, U>::type { };
36#endif
37
38} /* boost */
39
40#endif
41

source code of include/boost/type_traits/disjunction.hpp