BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslmf_disjunction_cpp03.h
Go to the documentation of this file.
1/// @file bslmf_disjunction_cpp03.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslmf_disjunction_cpp03.h -*-C++-*-
8
9// Automatically generated file. **DO NOT EDIT**
10
11#ifndef INCLUDED_BSLMF_DISJUNCTION_CPP03
12#define INCLUDED_BSLMF_DISJUNCTION_CPP03
13
14/// @defgroup bslmf_disjunction_cpp03 bslmf_disjunction_cpp03
15/// @brief Provide C++03 implementation for bslmf_disjunction.h
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslmf
19/// @{
20/// @addtogroup bslmf_disjunction_cpp03
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslmf_disjunction_cpp03-purpose"> Purpose</a>
25/// * <a href="#bslmf_disjunction_cpp03-classes"> Classes </a>
26/// * <a href="#bslmf_disjunction_cpp03-description"> Description </a>
27///
28/// # Purpose {#bslmf_disjunction_cpp03-purpose}
29/// Provide C++03 implementation for bslmf_disjunction.h
30///
31/// # Classes {#bslmf_disjunction_cpp03-classes}
32/// See bslmf_disjunction.h for list of classes
33///
34/// @see bslmf_disjunction
35///
36/// # Description {#bslmf_disjunction_cpp03-description}
37/// This component is the C++03 translation of a C++11 component,
38/// generated by the 'sim_cpp11_features.pl' program. If the original header
39/// contains any specially delimited regions of C++11 code, then this generated
40/// file contains the C++03 equivalent, i.e., with variadic templates expanded
41/// and rvalue-references replaced by 'bslmf::MovableRef' objects. The header
42/// code in this file is designed to be '#include'd into the original header
43/// when compiling with a C++03 compiler. If there are no specially delimited
44/// regions of C++11 code, then this header contains no code and is not
45/// '#include'd in the original header.
46///
47/// Generated on Thu Feb 22 04:02:11 2024
48/// Command line: sim_cpp11_features.pl bslmf_disjunction.h
49/// @}
50/** @} */
51/** @} */
52
53/** @addtogroup bsl
54 * @{
55 */
56/** @addtogroup bslmf
57 * @{
58 */
59/** @addtogroup bslmf_disjunction_cpp03
60 * @{
61 */
62
63#ifdef COMPILING_BSLMF_DISJUNCTION_H
64
65namespace bsl {
66
67#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
68
69using std::disjunction;
70using std::disjunction_v;
71
72#else
73
74 // ==================
75 // struct disjunction
76 // ==================
77
78// forward declaration (required for C++03)
79#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
80// {{{ BEGIN GENERATED CODE
81// Command line: sim_cpp11_features.pl bslmf_disjunction.h
82#ifndef BSLMF_DISJUNCTION_VARIADIC_LIMIT
83#define BSLMF_DISJUNCTION_VARIADIC_LIMIT 10
84#endif
85#ifndef BSLMF_DISJUNCTION_VARIADIC_LIMIT_A
86#define BSLMF_DISJUNCTION_VARIADIC_LIMIT_A BSLMF_DISJUNCTION_VARIADIC_LIMIT
87#endif
88template <
89#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 0
90class B_0 = BSLS_COMPILERFEATURES_NILT
91#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 0
92
93#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 1
94 , class B_1 = BSLS_COMPILERFEATURES_NILT
95#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 1
96
97#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 2
98 , class B_2 = BSLS_COMPILERFEATURES_NILT
99#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 2
100
101#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 3
102 , class B_3 = BSLS_COMPILERFEATURES_NILT
103#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 3
104
105#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 4
106 , class B_4 = BSLS_COMPILERFEATURES_NILT
107#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 4
108
109#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 5
110 , class B_5 = BSLS_COMPILERFEATURES_NILT
111#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 5
112
113#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 6
114 , class B_6 = BSLS_COMPILERFEATURES_NILT
115#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 6
116
117#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 7
118 , class B_7 = BSLS_COMPILERFEATURES_NILT
119#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 7
120
121#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 8
122 , class B_8 = BSLS_COMPILERFEATURES_NILT
123#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 8
124
125#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 9
126 , class B_9 = BSLS_COMPILERFEATURES_NILT
127#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_A >= 9
128 , class = BSLS_COMPILERFEATURES_NILT>
129struct disjunction;
130
131#else
132// The generated code below is a workaround for the absence of perfect
133// forwarding in some compilers.
134template <class... B>
135struct disjunction;
136// }}} END GENERATED CODE
137#endif
138
139// 0 args specialization
140#ifdef BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES
141template <class...>
142struct disjunction : false_type {
143};
144#else
145template <>
146struct disjunction<> : false_type {
147};
148#endif
149
150// 1 arg specialization
151template <class B1>
152struct disjunction<B1> : B1 {
153};
154
155// other cases
156#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
157// {{{ BEGIN GENERATED CODE
158// Command line: sim_cpp11_features.pl bslmf_disjunction.h
159#ifndef BSLMF_DISJUNCTION_VARIADIC_LIMIT
160#define BSLMF_DISJUNCTION_VARIADIC_LIMIT 10
161#endif
162#ifndef BSLMF_DISJUNCTION_VARIADIC_LIMIT_B
163#define BSLMF_DISJUNCTION_VARIADIC_LIMIT_B BSLMF_DISJUNCTION_VARIADIC_LIMIT
164#endif
165#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 0
166template <class B1, class B2>
167struct disjunction<B1, B2> :
168 conditional<bool(B1::value), B1, disjunction<B2> >::type {
169};
170#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 0
171
172#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 1
173template <class B1, class B2, class Bn_1>
174struct disjunction<B1, B2, Bn_1> :
175 conditional<bool(B1::value), B1, disjunction<B2, Bn_1> >::type {
176};
177#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 1
178
179#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 2
180template <class B1, class B2, class Bn_1,
181 class Bn_2>
182struct disjunction<B1, B2, Bn_1,
183 Bn_2> :
184 conditional<bool(B1::value), B1, disjunction<B2, Bn_1,
185 Bn_2> >::type {
186};
187#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 2
188
189#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 3
190template <class B1, class B2, class Bn_1,
191 class Bn_2,
192 class Bn_3>
193struct disjunction<B1, B2, Bn_1,
194 Bn_2,
195 Bn_3> :
196 conditional<bool(B1::value), B1, disjunction<B2, Bn_1,
197 Bn_2,
198 Bn_3> >::type {
199};
200#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 3
201
202#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 4
203template <class B1, class B2, class Bn_1,
204 class Bn_2,
205 class Bn_3,
206 class Bn_4>
207struct disjunction<B1, B2, Bn_1,
208 Bn_2,
209 Bn_3,
210 Bn_4> :
211 conditional<bool(B1::value), B1, disjunction<B2, Bn_1,
212 Bn_2,
213 Bn_3,
214 Bn_4> >::type {
215};
216#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 4
217
218#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 5
219template <class B1, class B2, class Bn_1,
220 class Bn_2,
221 class Bn_3,
222 class Bn_4,
223 class Bn_5>
224struct disjunction<B1, B2, Bn_1,
225 Bn_2,
226 Bn_3,
227 Bn_4,
228 Bn_5> :
229 conditional<bool(B1::value), B1, disjunction<B2, Bn_1,
230 Bn_2,
231 Bn_3,
232 Bn_4,
233 Bn_5> >::type {
234};
235#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 5
236
237#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 6
238template <class B1, class B2, class Bn_1,
239 class Bn_2,
240 class Bn_3,
241 class Bn_4,
242 class Bn_5,
243 class Bn_6>
244struct disjunction<B1, B2, Bn_1,
245 Bn_2,
246 Bn_3,
247 Bn_4,
248 Bn_5,
249 Bn_6> :
250 conditional<bool(B1::value), B1, disjunction<B2, Bn_1,
251 Bn_2,
252 Bn_3,
253 Bn_4,
254 Bn_5,
255 Bn_6> >::type {
256};
257#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 6
258
259#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 7
260template <class B1, class B2, class Bn_1,
261 class Bn_2,
262 class Bn_3,
263 class Bn_4,
264 class Bn_5,
265 class Bn_6,
266 class Bn_7>
267struct disjunction<B1, B2, Bn_1,
268 Bn_2,
269 Bn_3,
270 Bn_4,
271 Bn_5,
272 Bn_6,
273 Bn_7> :
274 conditional<bool(B1::value), B1, disjunction<B2, Bn_1,
275 Bn_2,
276 Bn_3,
277 Bn_4,
278 Bn_5,
279 Bn_6,
280 Bn_7> >::type {
281};
282#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 7
283
284#if BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 8
285template <class B1, class B2, class Bn_1,
286 class Bn_2,
287 class Bn_3,
288 class Bn_4,
289 class Bn_5,
290 class Bn_6,
291 class Bn_7,
292 class Bn_8>
293struct disjunction<B1, B2, Bn_1,
294 Bn_2,
295 Bn_3,
296 Bn_4,
297 Bn_5,
298 Bn_6,
299 Bn_7,
300 Bn_8> :
301 conditional<bool(B1::value), B1, disjunction<B2, Bn_1,
302 Bn_2,
303 Bn_3,
304 Bn_4,
305 Bn_5,
306 Bn_6,
307 Bn_7,
308 Bn_8> >::type {
309};
310#endif // BSLMF_DISJUNCTION_VARIADIC_LIMIT_B >= 8
311
312#else
313// The generated code below is a workaround for the absence of perfect
314// forwarding in some compilers.
315template <class B1, class B2, class... Bn>
316struct disjunction<B1, B2, Bn...> :
317 conditional<bool(B1::value), B1, disjunction<B2, Bn...> >::type {
318};
319// }}} END GENERATED CODE
320#endif
321
322#ifdef BSLS_COMPILERFEATURES_SUPPORT_VARIABLE_TEMPLATES
323template <class... B>
325constexpr bool disjunction_v = disjunction<B...>::value;
326#endif
327
328#endif
329
330} // close namespace bsl
331
332#else // if ! defined(DEFINED_BSLMF_DISJUNCTION_H)
333# error Not valid except when included from bslmf_disjunction.h
334#endif // ! defined(COMPILING_BSLMF_DISJUNCTION_H)
335
336#endif // ! defined(INCLUDED_BSLMF_DISJUNCTION_CPP03)
337
338// ----------------------------------------------------------------------------
339// Copyright 2024 Bloomberg Finance L.P.
340//
341// Licensed under the Apache License, Version 2.0 (the "License");
342// you may not use this file except in compliance with the License.
343// You may obtain a copy of the License at
344//
345// http://www.apache.org/licenses/LICENSE-2.0
346//
347// Unless required by applicable law or agreed to in writing, software
348// distributed under the License is distributed on an "AS IS" BASIS,
349// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
350// See the License for the specific language governing permissions and
351// limitations under the License.
352// ----------------------------- END-OF-FILE ----------------------------------
353
354/** @} */
355/** @} */
356/** @} */
#define BSLS_KEYWORD_INLINE_VARIABLE
Definition bsls_keyword.h:623
Definition bdlb_printmethods.h:283
integral_constant< bool, false > false_type
Definition bslmf_integralconstant.h:297