Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:44

0001 /*
0002 Copyright Barrett Adair 2015-2017
0003 
0004 Distributed under the Boost Software License, Version 1.0.
0005 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
0006 
0007 */
0008 
0009 #ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_DISJUNCTION_HPP
0010 #define BOOST_CLBL_TRTS_DETAIL_POLYFILLS_DISJUNCTION_HPP
0011 
0012 #undef BOOST_CLBL_TRTS_DISJUNCTION
0013 #define BOOST_CLBL_TRTS_DISJUNCTION(...) \
0014     ::boost::callable_traits::detail::disjunction<__VA_ARGS__>
0015 
0016 namespace boost { namespace callable_traits { namespace detail {
0017 
0018 //polyfill for C++17 std::disjunction
0019 template<typename...>
0020 struct disjunction : std::false_type {};
0021 
0022 template<typename T>
0023 struct disjunction<T> : T {};
0024 
0025 template<typename T, typename... Ts>
0026 struct disjunction<T, Ts...>
0027     : std::conditional<T::value != false, T, disjunction<Ts...>>::type {};
0028 
0029 }}} // namespace boost::callable_traits::detail
0030 
0031 #endif // #ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_DISJUNCTION_HPP