11#ifndef INCLUDED_BSLMF_CONJUNCTION_CPP03
12#define INCLUDED_BSLMF_CONJUNCTION_CPP03
63#ifdef COMPILING_BSLMF_CONJUNCTION_H
67#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
69using std::conjunction;
70using std::conjunction_v;
79#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
82#ifndef BSLMF_CONJUNCTION_VARIADIC_LIMIT
83#define BSLMF_CONJUNCTION_VARIADIC_LIMIT 10
85#ifndef BSLMF_CONJUNCTION_VARIADIC_LIMIT_A
86#define BSLMF_CONJUNCTION_VARIADIC_LIMIT_A BSLMF_CONJUNCTION_VARIADIC_LIMIT
89#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_A >= 0
90class B_0 = BSLS_COMPILERFEATURES_NILT
93#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_A >= 1
94 ,
class B_1 = BSLS_COMPILERFEATURES_NILT
97#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_A >= 2
98 ,
class B_2 = BSLS_COMPILERFEATURES_NILT
101#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_A >= 3
102 ,
class B_3 = BSLS_COMPILERFEATURES_NILT
105#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_A >= 4
106 ,
class B_4 = BSLS_COMPILERFEATURES_NILT
109#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_A >= 5
110 ,
class B_5 = BSLS_COMPILERFEATURES_NILT
113#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_A >= 6
114 ,
class B_6 = BSLS_COMPILERFEATURES_NILT
117#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_A >= 7
118 ,
class B_7 = BSLS_COMPILERFEATURES_NILT
121#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_A >= 8
122 ,
class B_8 = BSLS_COMPILERFEATURES_NILT
125#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_A >= 9
126 ,
class B_9 = BSLS_COMPILERFEATURES_NILT
128 ,
class = BSLS_COMPILERFEATURES_NILT>
140#ifdef BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES
152struct conjunction<B1> : B1 {
156#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
159#ifndef BSLMF_CONJUNCTION_VARIADIC_LIMIT
160#define BSLMF_CONJUNCTION_VARIADIC_LIMIT 10
162#ifndef BSLMF_CONJUNCTION_VARIADIC_LIMIT_B
163#define BSLMF_CONJUNCTION_VARIADIC_LIMIT_B BSLMF_CONJUNCTION_VARIADIC_LIMIT
165#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_B >= 0
166template <
class B1,
class B2>
167struct conjunction<B1, B2> :
168 conditional<bool(B1::value), conjunction<B2>, B1>::type {
172#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_B >= 1
173template <
class B1,
class B2,
class Bn_1>
174struct conjunction<B1, B2, Bn_1> :
175 conditional<bool(B1::value), conjunction<B2, Bn_1>, B1>::type {
179#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_B >= 2
180template <
class B1,
class B2,
class Bn_1,
182struct conjunction<B1, B2, Bn_1,
184 conditional<bool(B1::value), conjunction<B2, Bn_1,
189#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_B >= 3
190template <
class B1,
class B2,
class Bn_1,
193struct conjunction<B1, B2, Bn_1,
196 conditional<bool(B1::value), conjunction<B2, Bn_1,
202#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_B >= 4
203template <
class B1,
class B2,
class Bn_1,
207struct conjunction<B1, B2, Bn_1,
211 conditional<bool(B1::value), conjunction<B2, Bn_1,
218#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_B >= 5
219template <
class B1,
class B2,
class Bn_1,
224struct conjunction<B1, B2, Bn_1,
229 conditional<bool(B1::value), conjunction<B2, Bn_1,
237#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_B >= 6
238template <
class B1,
class B2,
class Bn_1,
244struct conjunction<B1, B2, Bn_1,
250 conditional<bool(B1::value), conjunction<B2, Bn_1,
259#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_B >= 7
260template <
class B1,
class B2,
class Bn_1,
267struct conjunction<B1, B2, Bn_1,
274 conditional<bool(B1::value), conjunction<B2, Bn_1,
284#if BSLMF_CONJUNCTION_VARIADIC_LIMIT_B >= 8
285template <
class B1,
class B2,
class Bn_1,
293struct conjunction<B1, B2, Bn_1,
301 conditional<bool(B1::value), conjunction<B2, Bn_1,
315template <
class B1,
class B2,
class... Bn>
316struct conjunction<B1, B2, Bn...> :
317 conditional<bool(B1::value), conjunction<B2, Bn...>, B1>::type {
322#ifdef BSLS_COMPILERFEATURES_SUPPORT_VARIABLE_TEMPLATES
325constexpr bool conjunction_v = conjunction<B...>::value;
333# error Not valid except when included from bslmf_conjunction.h
#define BSLS_KEYWORD_INLINE_VARIABLE
Definition bsls_keyword.h:623
Definition bdlb_printmethods.h:283
integral_constant< bool, true > true_type
Definition bslmf_integralconstant.h:303