ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
disjunction.hpp
Go to the documentation of this file.
1/*
2Copyright Barrett Adair 2015-2017
3
4Distributed under the Boost Software License, Version 1.0.
5(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
6
7*/
8
9#ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_DISJUNCTION_HPP
10#define BOOST_CLBL_TRTS_DETAIL_POLYFILLS_DISJUNCTION_HPP
11
12#undef BOOST_CLBL_TRTS_DISJUNCTION
13#define BOOST_CLBL_TRTS_DISJUNCTION(...) \
14 ::boost::callable_traits::detail::disjunction<__VA_ARGS__>
15
16namespace boost { namespace callable_traits { namespace detail {
17
18//polyfill for C++17 std::disjunction
19template<typename...>
20struct disjunction : std::false_type {};
21
22template<typename T>
23struct disjunction<T> : T {};
24
25template<typename T, typename... Ts>
26struct disjunction<T, Ts...>
27 : std::conditional<T::value != false, T, disjunction<Ts...>>::type {};
28
29}}} // namespace boost::callable_traits::detail
30
31#endif // #ifndef BOOST_CLBL_TRTS_DETAIL_POLYFILLS_DISJUNCTION_HPP