VCCC
2024.05
VisualCamp Common C++ library
disjunction.hpp
Go to the documentation of this file.
1
#
/*
2
# * Created by YongGyu Lee on 2021/09/03.
3
# */
4
#
5
# ifndef VCCC_TYPE_TRAITS_DISJUNCTION_HPP
6
# define VCCC_TYPE_TRAITS_DISJUNCTION_HPP
7
#
8
# include <type_traits>
9
10
namespace
vccc
{
11
16
21
template
<
typename
...B>
22
struct
disjunction
;
23
26
27
template
<>
28
struct
disjunction
<> : std::false_type {};
29
30
template
<
typename
B1>
31
struct
disjunction
<B1> : B1 {};
32
33
template
<
typename
B1,
typename
...BN>
34
struct
disjunction
<B1, BN...> : std::conditional_t<bool(B1::value), B1, disjunction<BN...>> {};
35
36
37
}
// namespace vccc
38
39
# endif
// VCCC_TYPE_TRAITS_DISJUNCTION_HPP
vccc
Definition:
directory.h:12
vccc::disjunction
Definition:
disjunction.hpp:22
include
vccc
__type_traits
disjunction.hpp
Generated by
1.9.1