BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslmf_switch.h
Go to the documentation of this file.
1/// @file bslmf_switch.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslmf_switch.h -*-C++-*-
8#ifndef INCLUDED_BSLMF_SWITCH
9#define INCLUDED_BSLMF_SWITCH
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup bslmf_switch bslmf_switch
15/// @brief Provide a compile-time `switch` meta-function.
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslmf
19/// @{
20/// @addtogroup bslmf_switch
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslmf_switch-purpose"> Purpose</a>
25/// * <a href="#bslmf_switch-classes"> Classes </a>
26/// * <a href="#bslmf_switch-description"> Description </a>
27/// * <a href="#bslmf_switch-usage"> Usage </a>
28///
29/// # Purpose {#bslmf_switch-purpose}
30/// Provide a compile-time `switch` meta-function.
31///
32/// # Classes {#bslmf_switch-classes}
33///
34/// - bslmf::Switch: `switch` meta-function (variable number of types)
35/// - bslmf::Switch2: `switch` meta-function (among two types)
36/// - bslmf::Switch3: `switch` meta-function (among three types)
37/// - bslmf::Switch4: `switch` meta-function (among four types)
38/// - bslmf::Switch5: `switch` meta-function (among five types)
39/// - bslmf::Switch6: `switch` meta-function (among six types)
40/// - bslmf::Switch7: `switch` meta-function (among seven types)
41/// - bslmf::Switch8: `switch` meta-function (among eight types)
42/// - bslmf::Switch9: `switch` meta-function (among nine types)
43///
44/// @see bslmf_typelist
45///
46/// # Description {#bslmf_switch-description}
47/// This component provides a compile-time `switch` meta-function.
48/// Its main class, `bslmf::Switch`, parameterized by an integral
49/// `t_SWITCH_SELECTOR` and a variable number `N` of types, `t_T0` up to
50/// `T{N - 1}`, contains a single type named `Type`, which is the result of the
51/// meta-function and is an alias to `T{t_SWITCH_SELECTOR}` or to `bslmf::Nil`
52/// if `t_SWITCH_SELECTOR` is outside the range `[ 0 .. N - 1 ]`. The analogy
53/// between the following "meta-code" and its valid C++ version using
54/// `bslmf::Switch` may serve as a useful mental picture to understand and
55/// memorize the usage of this component.
56/// @code
57/// "Meta-code" (not C++) Valid C++ using 'bslmf::Switch'
58/// --------------------- ------------------------------
59/// typedef typedef typename
60/// switch (t_SWITCH_SELECTOR) { bslmf::Switch<t_SWITCH_SELECTOR,
61/// case 0: t_T0; t_T0,
62/// case 1: t_T1; t_T1,
63/// // . . . // . . .
64/// case N - 1: T{N - 1}; T{N - 1}
65/// default: bslmf::Nil; >
66/// } ::
67/// Type; Type;
68/// @endcode
69/// Note the use of the keyword `typename`, necessary *only* if one or more of
70/// the `t_SWITCH_SELECTOR` or `t_T0` up to `T{N - 1}` is dependent on a
71/// template parameter of the local context (i.e., that of the block using
72/// `bslmf::Switch`). In particular, it should be omitted if the
73/// `bslmf::Switch` is not used within a class or function template, as in the
74/// usage example below.
75///
76/// For most situations, the number `N` of template type arguments is known and
77/// the `bslmf::SwitchN` meta-functions, which take exactly the indicated number
78/// of arguments, should be preferred. Their usage leads to shorter mangled
79/// symbol names in object files (e.g., no extra defaulted template type
80/// arguments are included in the name), and shorter compilation times, as well.
81///
82/// ## Usage {#bslmf_switch-usage}
83///
84///
85/// Assume an external server API for storing and retrieving data:
86/// @code
87/// class data_Server {
88/// // Dummy implementation of data server
89///
90/// int d_data;
91///
92/// public:
93/// void store(char data) { d_data = data | 0Xefface00; }
94/// void store(short data) { d_data = data | 0Xdead0000; }
95/// void store(int data) { d_data = data; }
96///
97/// void retrieve(char *data) {
98/// *data = static_cast<char>(d_data & 0x000000ff);
99/// }
100/// void retrieve(short *data) {
101/// *data = static_cast<short>(d_data & 0x0000ffff);
102/// }
103/// void retrieve(int *data) { *data = d_data; }
104/// };
105/// @endcode
106/// In our application, we need some very small (1, 2, and 4-byte),
107/// special-purpose string types, so we create the following `ShortString` class
108/// template:
109/// @code
110/// template <int LEN>
111/// class ShortString {
112/// // Store a short, fixed-length string.
113///
114/// char d_buffer[LEN];
115///
116/// public:
117/// ShortString(const char *s = "") { std::strncpy(d_buffer, s, LEN); }
118/// // Construct a 'ShortString' from a NTCS.
119///
120/// void retrieve(data_Server *server);
121/// // Retrieve this string from a data server.
122///
123/// void store(data_Server *server) const;
124/// // Store this string to a data server.
125///
126/// char operator[](int n) const { return d_buffer[n]; }
127/// // Return the nth byte in this string.
128/// };
129///
130/// template <int LEN>
131/// bool operator==(const ShortString<LEN>& lhs, const ShortString<LEN>& rhs)
132/// // Return true if a 'lhs' is equal to 'rhs'
133/// {
134/// return 0 == std::memcmp(&lhs, &rhs, LEN);
135/// }
136///
137/// template <int LEN>
138/// bool operator==(const ShortString<LEN>& lhs, const char *rhs)
139/// // Return true if a 'ShortString' 'lhs' is equal to a NTCS 'rhs'.
140/// {
141/// int i;
142/// for (i = 0; LEN > i && lhs[i]; ++i) {
143/// if (lhs[i] != rhs[i]) {
144/// return false;
145/// }
146/// }
147///
148/// return ('\0' == rhs[i]);
149/// }
150/// @endcode
151/// We would like to store our short strings in the data server, but the data
152/// server only handles `char`, `short` and `int` types. Since our strings fit
153/// into these simple types, we can transform `ShortString` into these integral
154/// types when calling `store` and `retrieve`, using `bslmf::Switch` to choose
155/// which integral type to use for each `ShortString` type:
156/// @code
157/// template <int LEN>
158/// void ShortString<LEN>::retrieve(data_Server *server)
159/// {
160/// // 'transferType will be 'char' if 'LEN' is 1, 'short' if 'LEN' is 2,
161/// // and 'int' if 'LEN' 4. Will choose 'void' and thus not compile if
162/// // 'LEN' is 0 or 3.
163///
164/// typedef typename
165/// bslmf::Switch<LEN, void, char, short, void, int>::Type transferType;
166///
167/// transferType x = 0;
168/// server->retrieve(&x);
169/// std::memcpy(d_buffer, &x, LEN);
170/// }
171///
172/// template <int LEN>
173/// void ShortString<LEN>::store(data_Server *server) const
174/// {
175/// // 'transferType will be 'char' if 'LEN' is 1, 'short' if 'LEN' is 2,
176/// // and 'int' if 'LEN' 4. Will choose 'void' and thus not compile if
177/// // 'LEN' is 0 or 3.
178/// typedef typename
179/// bslmf::Switch<LEN, void, char, short, void, int>::Type transferType;
180///
181/// transferType x = 0;
182/// std::memcpy(&x, d_buffer, LEN);
183/// server->store(x);
184/// }
185/// @endcode
186/// In our main program, we first assert our basic assumptions, then we store
187/// and retrieve strings using our `ShortString` template.
188/// @code
189/// int main()
190/// {
191/// assert(2 == sizeof(short));
192/// assert(4 == sizeof(int));
193///
194/// data_Server server;
195///
196/// ShortString<1> a("A");
197/// ShortString<1> b("B");
198/// assert(a == "A");
199/// assert(b == "B");
200/// assert(! (a == b));
201///
202/// a.store(&server);
203/// b.retrieve(&server);
204/// assert(a == "A");
205/// assert(b == "A");
206/// assert(a == b);
207///
208/// ShortString<2> cd("CD");
209/// ShortString<2> ef("EF");
210/// assert(cd == "CD");
211/// assert(ef == "EF");
212/// assert(! (cd == ef));
213///
214/// cd.store(&server);
215/// ef.retrieve(&server);
216/// assert(cd == "CD");
217/// assert(ef == "CD");
218/// assert(cd == ef);
219///
220/// ShortString<4> ghij("GHIJ");
221/// ShortString<4> klmn("KLMN");
222/// assert(ghij == "GHIJ");
223/// assert(klmn == "KLMN");
224/// assert(! (ghij == klmn));
225///
226/// ghij.store(&server);
227/// klmn.retrieve(&server);
228/// assert(ghij == "GHIJ");
229/// assert(klmn == "GHIJ");
230/// assert(ghij == klmn);
231///
232/// return 0;
233/// }
234/// @endcode
235/// @}
236/** @} */
237/** @} */
238
239/** @addtogroup bsl
240 * @{
241 */
242/** @addtogroup bslmf
243 * @{
244 */
245/** @addtogroup bslmf_switch
246 * @{
247 */
248
249#include <bslscm_version.h>
250
251#include <bslmf_nil.h>
252
254
255#include <stddef.h>
256
257
258#if defined(BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES) \
259 && defined(BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES)
260/// This macro indicates that we have all the needed features for an
261/// implementation of the type-switch facility that is source-compatible
262/// with the pre-existing C++03 facility. The main change is that the
263/// numbered classes Switch0-Switch9 are no longer distinct classes, but
264/// aliases of specific instantiations of the primary Switch template.
265/// Eventually these partial template specializations will be eliminated,
266/// when the individually named members are no longer used throughout the
267/// whole of the Bloomberg codebase.
268#define BSLMF_SWITCH_USING_VARIADIC_TEMPLATES
269#endif
270
271
272
273namespace bslmf {
274
275#if defined(BSLMF_SWITCH_USING_VARIADIC_TEMPLATES)
276/// This meta-function, parameterized by an integral `t_SWITCH_SELECTOR` and
277/// types `t_T0` up to `t_T9`, provides a single type alias, `Type`, which
278/// resolves, through specialization for a particular value `N` of
279/// `t_SWITCH_SELECTOR`, to the type `TN`, or to `Nil` if
280/// `t_SWITCH_SELECTOR` is negative or larger than the number of template
281/// arguments provided for the types.
282template <size_t t_SWITCH_SELECTOR, class... t_TYPES>
283struct Switch {
284
285 /// This `Type` is an alias to the parameterized `TN`, where `N` is the
286 /// integral value of the parameterized `t_SWITCH_SELECTOR`. Note that
287 /// the first type in the list corresponds to `t_T0`, not `t_T1`.
288 typedef Nil Type;
289};
290
291// SPECIALIZATIONS
292template <class t_T0, class... t_TYPES>
293struct Switch<0u, t_T0, t_TYPES...> {
294 typedef t_T0 Type;
295};
296
297template <class t_T0, class t_T1, class... t_TYPES>
298struct Switch<1u, t_T0, t_T1, t_TYPES...> {
299 typedef t_T1 Type;
300};
301
302template <class t_T0, class t_T1, class t_T2, class... t_TYPES>
303struct Switch<2u, t_T0, t_T1, t_T2, t_TYPES...> {
304 typedef t_T2 Type;
305};
306
307template <class t_T0, class t_T1, class t_T2, class t_T3, class... t_TYPES>
308struct Switch<3u, t_T0, t_T1, t_T2, t_T3, t_TYPES...> {
309 typedef t_T3 Type;
310};
311
312template <class t_T0,
313 class t_T1,
314 class t_T2,
315 class t_T3,
316 class t_T4,
317 class... t_TYPES>
318struct Switch<4u, t_T0, t_T1, t_T2, t_T3, t_T4, t_TYPES...> {
319 typedef t_T4 Type;
320};
321
322template <class t_T0,
323 class t_T1,
324 class t_T2,
325 class t_T3,
326 class t_T4,
327 class t_T5,
328 class... t_TYPES>
329struct Switch<5u, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_TYPES...> {
330 typedef t_T5 Type;
331};
332
333template <class t_T0,
334 class t_T1,
335 class t_T2,
336 class t_T3,
337 class t_T4,
338 class t_T5,
339 class t_T6,
340 class... t_TYPES>
341struct Switch<6u, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_TYPES...> {
342 typedef t_T6 Type;
343};
344
345template <class t_T0,
346 class t_T1,
347 class t_T2,
348 class t_T3,
349 class t_T4,
350 class t_T5,
351 class t_T6,
352 class t_T7,
353 class... t_TYPES>
354struct Switch<7u, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_TYPES...> {
355 typedef t_T7 Type;
356};
357
358template <class t_T0,
359 class t_T1,
360 class t_T2,
361 class t_T3,
362 class t_T4,
363 class t_T5,
364 class t_T6,
365 class t_T7,
366 class t_T8,
367 class... t_TYPES>
368struct Switch<8u,
369 t_T0,
370 t_T1,
371 t_T2,
372 t_T3,
373 t_T4,
374 t_T5,
375 t_T6,
376 t_T7,
377 t_T8,
378 t_TYPES...> {
379 typedef t_T8 Type;
380};
381
382template <class t_T0,
383 class t_T1,
384 class t_T2,
385 class t_T3,
386 class t_T4,
387 class t_T5,
388 class t_T6,
389 class t_T7,
390 class t_T8,
391 class t_T9,
392 class... t_TYPES>
393struct Switch<9u,
394 t_T0,
395 t_T1,
396 t_T2,
397 t_T3,
398 t_T4,
399 t_T5,
400 t_T6,
401 t_T7,
402 t_T8,
403 t_T9,
404 t_TYPES...> {
405 typedef t_T9 Type;
406};
407
408template <size_t t_SWITCH_SELECTOR,
409 class t_T0,
410 class t_T1,
411 class t_T2,
412 class t_T3,
413 class t_T4,
414 class t_T5,
415 class t_T6,
416 class t_T7,
417 class t_T8,
418 class t_T9,
419 class t_T10,
420 class... t_TYPES>
421struct Switch<t_SWITCH_SELECTOR,
422 t_T0,
423 t_T1,
424 t_T2,
425 t_T3,
426 t_T4,
427 t_T5,
428 t_T6,
429 t_T7,
430 t_T8,
431 t_T9,
432 t_T10,
433 t_TYPES...> {
434 typedef
435 typename Switch<t_SWITCH_SELECTOR - 10, t_T10, t_TYPES...>::Type Type;
436};
437
438#ifndef BDE_OMIT_INTERNAL_DEPRECATED
439template <size_t t_SWITCH_SELECTOR, class t_T0, class t_T1>
440using Switch2 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1>;
441
442template <size_t t_SWITCH_SELECTOR, class t_T0, class t_T1, class t_T2>
443using Switch3 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2>;
444
445template <size_t t_SWITCH_SELECTOR,
446 class t_T0,
447 class t_T1,
448 class t_T2,
449 class t_T3>
450using Switch4 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3>;
451
452template <size_t t_SWITCH_SELECTOR,
453 class t_T0,
454 class t_T1,
455 class t_T2,
456 class t_T3,
457 class t_T4>
458using Switch5 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4>;
459
460template <size_t t_SWITCH_SELECTOR,
461 class t_T0,
462 class t_T1,
463 class t_T2,
464 class t_T3,
465 class t_T4,
466 class t_T5>
467using Switch6 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5>;
468
469template <size_t t_SWITCH_SELECTOR,
470 class t_T0,
471 class t_T1,
472 class t_T2,
473 class t_T3,
474 class t_T4,
475 class t_T5,
476 class t_T6>
477using Switch7 =
478 Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6>;
479
480template <size_t t_SWITCH_SELECTOR,
481 class t_T0,
482 class t_T1,
483 class t_T2,
484 class t_T3,
485 class t_T4,
486 class t_T5,
487 class t_T6,
488 class t_T7>
489using Switch8 =
490 Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7>;
491
492template <size_t t_SWITCH_SELECTOR,
493 class t_T0,
494 class t_T1,
495 class t_T2,
496 class t_T3,
497 class t_T4,
498 class t_T5,
499 class t_T6,
500 class t_T7,
501 class t_T8>
502using Switch9 = Switch<t_SWITCH_SELECTOR,
503 t_T0,
504 t_T1,
505 t_T2,
506 t_T3,
507 t_T4,
508 t_T5,
509 t_T6,
510 t_T7,
511 t_T8>;
512#endif // BDE_OMIT_INTERNAL_DEPRECATED
513
514#else
515
516 // =============
517 // struct Switch
518 // =============
519
520/// This meta-function, parameterized by an integral `t_SWITCH_SELECTOR` and
521/// types `t_T0` up to `t_T9`, provides a single type alias, `Type`, which
522/// resolves, through specialization for a particular value `N` of
523/// `t_SWITCH_SELECTOR`, to the type `TN`, or to `Nil` if
524/// `t_SWITCH_SELECTOR` is negative or larger than the number of template
525/// arguments provided for the types.
526template <size_t t_SWITCH_SELECTOR,
527 class t_T0,
528 class t_T1 = Nil,
529 class t_T2 = Nil,
530 class t_T3 = Nil,
531 class t_T4 = Nil,
532 class t_T5 = Nil,
533 class t_T6 = Nil,
534 class t_T7 = Nil,
535 class t_T8 = Nil,
536 class t_T9 = Nil>
537struct Switch {
538
539 /// This `Type` is an alias to the parameterized `TN`, where `N` is the
540 /// integral value of the parameterized `t_SWITCH_SELECTOR`. Note that
541 /// the first type in the list corresponds to `t_T0`, not `t_T1`.
542 typedef Nil Type;
543};
544
545// SPECIALIZATIONS
546
547/// This specialization of `Switch` for a value of 0 of the parameterized
548/// `t_SWITCH_SELECTOR` selects the parameterized `t_T0` as `Type`.
549template <class t_T0,
550 class t_T1,
551 class t_T2,
552 class t_T3,
553 class t_T4,
554 class t_T5,
555 class t_T6,
556 class t_T7,
557 class t_T8,
558 class t_T9>
559struct Switch<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
560
561 typedef t_T0 Type;
562};
563
564/// This specialization of `Switch` for a value of 1 of the parameterized
565/// `t_SWITCH_SELECTOR` selects the parameterized `t_T1` as `Type`.
566template <class t_T0,
567 class t_T1,
568 class t_T2,
569 class t_T3,
570 class t_T4,
571 class t_T5,
572 class t_T6,
573 class t_T7,
574 class t_T8,
575 class t_T9>
576struct Switch<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
577
578 typedef t_T1 Type;
579};
580
581/// This specialization of `Switch` for a value of 2 of the parameterized
582/// `t_SWITCH_SELECTOR` selects the parameterized `t_T2` as `Type`.
583template <class t_T0,
584 class t_T1,
585 class t_T2,
586 class t_T3,
587 class t_T4,
588 class t_T5,
589 class t_T6,
590 class t_T7,
591 class t_T8,
592 class t_T9>
593struct Switch<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
594
595 typedef t_T2 Type;
596};
597
598/// This specialization of `Switch` for a value of 3 of the parameterized
599/// `t_SWITCH_SELECTOR` selects the parameterized `t_T3` as `Type`.
600template <class t_T0,
601 class t_T1,
602 class t_T2,
603 class t_T3,
604 class t_T4,
605 class t_T5,
606 class t_T6,
607 class t_T7,
608 class t_T8,
609 class t_T9>
610struct Switch<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
611
612 typedef t_T3 Type;
613};
614
615/// This specialization of `Switch` for a value of 4 of the parameterized
616/// `t_SWITCH_SELECTOR` selects the parameterized `t_T4` as `Type`.
617template <class t_T0,
618 class t_T1,
619 class t_T2,
620 class t_T3,
621 class t_T4,
622 class t_T5,
623 class t_T6,
624 class t_T7,
625 class t_T8,
626 class t_T9>
627struct Switch<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
628
629 typedef t_T4 Type;
630};
631
632/// This specialization of `Switch` for a value of 5 of the parameterized
633/// `t_SWITCH_SELECTOR` selects the parameterized `t_T5` as `Type`.
634template <class t_T0,
635 class t_T1,
636 class t_T2,
637 class t_T3,
638 class t_T4,
639 class t_T5,
640 class t_T6,
641 class t_T7,
642 class t_T8,
643 class t_T9>
644struct Switch<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
645
646 typedef t_T5 Type;
647};
648
649/// This specialization of `Switch` for a value of 6 of the parameterized
650/// `t_SWITCH_SELECTOR` selects the parameterized `t_T6` as `Type`.
651template <class t_T0,
652 class t_T1,
653 class t_T2,
654 class t_T3,
655 class t_T4,
656 class t_T5,
657 class t_T6,
658 class t_T7,
659 class t_T8,
660 class t_T9>
661struct Switch<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
662
663 typedef t_T6 Type;
664};
665
666/// This specialization of `Switch` for a value of 7 of the parameterized
667/// `t_SWITCH_SELECTOR` selects the parameterized `t_T7` as `Type`.
668template <class t_T0,
669 class t_T1,
670 class t_T2,
671 class t_T3,
672 class t_T4,
673 class t_T5,
674 class t_T6,
675 class t_T7,
676 class t_T8,
677 class t_T9>
678struct Switch<7, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
679
680 typedef t_T7 Type;
681};
682
683/// This specialization of `Switch` for a value of 8 of the parameterized
684/// `t_SWITCH_SELECTOR` selects the parameterized `t_T8` as `Type`.
685template <class t_T0,
686 class t_T1,
687 class t_T2,
688 class t_T3,
689 class t_T4,
690 class t_T5,
691 class t_T6,
692 class t_T7,
693 class t_T8,
694 class t_T9>
695struct Switch<8, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
696
697 typedef t_T8 Type;
698};
699
700/// This specialization of `Switch` for a value of 9 of the parameterized
701/// `t_SWITCH_SELECTOR` selects the parameterized `t_T9` as `Type`.
702template <class t_T0,
703 class t_T1,
704 class t_T2,
705 class t_T3,
706 class t_T4,
707 class t_T5,
708 class t_T6,
709 class t_T7,
710 class t_T8,
711 class t_T9>
712struct Switch<9, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
713
714 typedef t_T9 Type;
715};
716
717 // ==============
718 // struct Switch2
719 // ==============
720
721/// This meta-function, parameterized by an integral `t_SWITCH_SELECTOR` and
722/// exactly two types `t_T0` and `t_T1`, offers functionality identical to
723/// `Switch<t_SWITCH_SELECTOR, t_T0, t_T1>`.
724template <size_t t_SWITCH_SELECTOR, class t_T0, class t_T1>
725struct Switch2 {
726
727 typedef Nil Type;
728};
729
730// SPECIALIZATIONS
731
732/// This specialization of `Switch2` for a value of 0 of the parameterized
733/// `t_SWITCH_SELECTOR` selects the parameterized `t_T0` as `Type`.
734template <class t_T0, class t_T1>
735struct Switch2<0, t_T0, t_T1> {
736
737 typedef t_T0 Type;
738};
739
740/// This specialization of `Switch2` for a value of 1 of the parameterized
741/// `t_SWITCH_SELECTOR` selects the parameterized `t_T1` as `Type`.
742template <class t_T0, class t_T1>
743struct Switch2<1, t_T0, t_T1> {
744
745 typedef t_T1 Type;
746};
747
748 // ==============
749 // struct Switch3
750 // ==============
751
752/// This meta-function, parameterized by an integral `t_SWITCH_SELECTOR` and
753/// exactly three types `t_T0` up to `t_T2`, offers functionality identical
754/// to `Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2>`.
755template <size_t t_SWITCH_SELECTOR, class t_T0, class t_T1, class t_T2>
756struct Switch3 {
757
758 typedef Nil Type;
759};
760
761// SPECIALIZATIONS
762
763/// This specialization of `Switch3` for a value of 0 of the parameterized
764/// `t_SWITCH_SELECTOR` selects the parameterized `t_T0` as `Type`.
765template <class t_T0, class t_T1, class t_T2>
766struct Switch3<0, t_T0, t_T1, t_T2> {
767
768 typedef t_T0 Type;
769};
770
771/// This specialization of `Switch3` for a value of 1 of the parameterized
772/// `t_SWITCH_SELECTOR` selects the parameterized `t_T1` as `Type`.
773template <class t_T0, class t_T1, class t_T2>
774struct Switch3<1, t_T0, t_T1, t_T2> {
775
776 typedef t_T1 Type;
777};
778
779/// This specialization of `Switch3` for a value of 2 of the parameterized
780/// `t_SWITCH_SELECTOR` selects the parameterized `t_T2` as `Type`.
781template <class t_T0, class t_T1, class t_T2>
782struct Switch3<2, t_T0, t_T1, t_T2> {
783
784 typedef t_T2 Type;
785};
786
787 // ==============
788 // struct Switch4
789 // ==============
790
791/// This meta-function, parameterized by an integral `t_SWITCH_SELECTOR` and
792/// exactly four types `t_T0` up to `t_T3`, offers functionality identical
793/// to `Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3>`.
794template <size_t t_SWITCH_SELECTOR,
795 class t_T0,
796 class t_T1,
797 class t_T2,
798 class t_T3>
799struct Switch4 {
800
801 typedef Nil Type;
802};
803
804// SPECIALIZATIONS
805
806/// This specialization of `Switch4` for a value of 0 of the parameterized
807/// `t_SWITCH_SELECTOR` selects the parameterized `t_T0` as `Type`.
808template <class t_T0, class t_T1, class t_T2, class t_T3>
809struct Switch4<0, t_T0, t_T1, t_T2, t_T3> {
810
811 typedef t_T0 Type;
812};
813
814/// This specialization of `Switch4` for a value of 1 of the parameterized
815/// `t_SWITCH_SELECTOR` selects the parameterized `t_T1` as `Type`.
816template <class t_T0, class t_T1, class t_T2, class t_T3>
817struct Switch4<1, t_T0, t_T1, t_T2, t_T3> {
818
819 typedef t_T1 Type;
820};
821
822/// This specialization of `Switch4` for a value of 2 of the parameterized
823/// `t_SWITCH_SELECTOR` selects the parameterized `t_T2` as `Type`.
824template <class t_T0, class t_T1, class t_T2, class t_T3>
825struct Switch4<2, t_T0, t_T1, t_T2, t_T3> {
826
827 typedef t_T2 Type;
828};
829
830/// This specialization of `Switch4` for a value of 3 of the parameterized
831/// `t_SWITCH_SELECTOR` selects the parameterized `t_T3` as `Type`.
832template <class t_T0, class t_T1, class t_T2, class t_T3>
833struct Switch4<3, t_T0, t_T1, t_T2, t_T3> {
834
835 typedef t_T3 Type;
836};
837
838 // ==============
839 // struct Switch5
840 // ==============
841
842/// This meta-function, parameterized by an integral `t_SWITCH_SELECTOR` and
843/// exactly five types `t_T0` up to `t_T4`, offers functionality identical
844/// to `Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4>`.
845template <size_t t_SWITCH_SELECTOR,
846 class t_T0,
847 class t_T1,
848 class t_T2,
849 class t_T3,
850 class t_T4>
851struct Switch5 {
852
853 typedef Nil Type;
854};
855
856// SPECIALIZATIONS
857
858/// This specialization of `Switch5` for a value of 0 of the parameterized
859/// `t_SWITCH_SELECTOR` selects the parameterized `t_T0` as `Type`.
860template <class t_T0, class t_T1, class t_T2, class t_T3, class t_T4>
861struct Switch5<0, t_T0, t_T1, t_T2, t_T3, t_T4> {
862
863 typedef t_T0 Type;
864};
865
866/// This specialization of `Switch5` for a value of 1 of the parameterized
867/// `t_SWITCH_SELECTOR` selects the parameterized `t_T1` as `Type`.
868template <class t_T0, class t_T1, class t_T2, class t_T3, class t_T4>
869struct Switch5<1, t_T0, t_T1, t_T2, t_T3, t_T4> {
870
871 typedef t_T1 Type;
872};
873
874/// This specialization of `Switch5` for a value of 2 of the parameterized
875/// `t_SWITCH_SELECTOR` selects the parameterized `t_T2` as `Type`.
876template <class t_T0, class t_T1, class t_T2, class t_T3, class t_T4>
877struct Switch5<2, t_T0, t_T1, t_T2, t_T3, t_T4> {
878
879 typedef t_T2 Type;
880};
881
882/// This specialization of `Switch5` for a value of 3 of the parameterized
883/// `t_SWITCH_SELECTOR` selects the parameterized `t_T3` as `Type`.
884template <class t_T0, class t_T1, class t_T2, class t_T3, class t_T4>
885struct Switch5<3, t_T0, t_T1, t_T2, t_T3, t_T4> {
886
887 typedef t_T3 Type;
888};
889
890/// This specialization of `Switch5` for a value of 4 of the parameterized
891/// `t_SWITCH_SELECTOR` selects the parameterized `t_T4` as `Type`.
892template <class t_T0, class t_T1, class t_T2, class t_T3, class t_T4>
893struct Switch5<4, t_T0, t_T1, t_T2, t_T3, t_T4> {
894
895 typedef t_T4 Type;
896};
897
898 // ==============
899 // struct Switch6
900 // ==============
901
902/// This meta-function, parameterized by an integral `t_SWITCH_SELECTOR` and
903/// exactly six types `t_T0` up to `t_T5`, offers functionality identical to
904/// `Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5>`.
905template <size_t t_SWITCH_SELECTOR,
906 class t_T0,
907 class t_T1,
908 class t_T2,
909 class t_T3,
910 class t_T4,
911 class t_T5>
912struct Switch6 {
913
914 typedef Nil Type;
915};
916
917// SPECIALIZATIONS
918
919/// This specialization of `Switch6` for a value of 0 of the parameterized
920/// `t_SWITCH_SELECTOR` selects the parameterized `t_T0` as `Type`.
921template <class t_T0,
922 class t_T1,
923 class t_T2,
924 class t_T3,
925 class t_T4,
926 class t_T5>
927struct Switch6<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
928
929 typedef t_T0 Type;
930};
931
932/// This specialization of `Switch6` for a value of 1 of the parameterized
933/// `t_SWITCH_SELECTOR` selects the parameterized `t_T1` as `Type`.
934template <class t_T0,
935 class t_T1,
936 class t_T2,
937 class t_T3,
938 class t_T4,
939 class t_T5>
940struct Switch6<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
941
942 typedef t_T1 Type;
943};
944
945/// This specialization of `Switch6` for a value of 2 of the parameterized
946/// `t_SWITCH_SELECTOR` selects the parameterized `t_T2` as `Type`.
947template <class t_T0,
948 class t_T1,
949 class t_T2,
950 class t_T3,
951 class t_T4,
952 class t_T5>
953struct Switch6<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
954
955 typedef t_T2 Type;
956};
957
958/// This specialization of `Switch6` for a value of 3 of the parameterized
959/// `t_SWITCH_SELECTOR` selects the parameterized `t_T3` as `Type`.
960template <class t_T0,
961 class t_T1,
962 class t_T2,
963 class t_T3,
964 class t_T4,
965 class t_T5>
966struct Switch6<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
967
968 typedef t_T3 Type;
969};
970
971/// This specialization of `Switch6` for a value of 4 of the parameterized
972/// `t_SWITCH_SELECTOR` selects the parameterized `t_T4` as `Type`.
973template <class t_T0,
974 class t_T1,
975 class t_T2,
976 class t_T3,
977 class t_T4,
978 class t_T5>
979struct Switch6<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
980
981 typedef t_T4 Type;
982};
983
984/// This specialization of `Switch6` for a value of 5 of the parameterized
985/// `t_SWITCH_SELECTOR` selects the parameterized `t_T5` as `Type`.
986template <class t_T0,
987 class t_T1,
988 class t_T2,
989 class t_T3,
990 class t_T4,
991 class t_T5>
992struct Switch6<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
993
994 typedef t_T5 Type;
995};
996
997 // ==============
998 // struct Switch7
999 // ==============
1000
1001/// This meta-function, parameterized by an integral `t_SWITCH_SELECTOR` and
1002/// exactly seven types `t_T0` up to `t_T6`, offers functionality identical
1003/// to
1004/// `Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6>`.
1005template <size_t t_SWITCH_SELECTOR,
1006 class t_T0,
1007 class t_T1,
1008 class t_T2,
1009 class t_T3,
1010 class t_T4,
1011 class t_T5,
1012 class t_T6>
1013struct Switch7 {
1014
1015 typedef Nil Type;
1016};
1017
1018// SPECIALIZATIONS
1019
1020/// This specialization of `Switch7` for a value of 0 of the parameterized
1021/// `t_SWITCH_SELECTOR` selects the parameterized `t_T0` as `Type`.
1022template <class t_T0,
1023 class t_T1,
1024 class t_T2,
1025 class t_T3,
1026 class t_T4,
1027 class t_T5,
1028 class t_T6>
1029struct Switch7<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1030
1031 typedef t_T0 Type;
1032};
1033
1034/// This specialization of `Switch7` for a value of 1 of the parameterized
1035/// `t_SWITCH_SELECTOR` selects the parameterized `t_T1` as `Type`.
1036template <class t_T0,
1037 class t_T1,
1038 class t_T2,
1039 class t_T3,
1040 class t_T4,
1041 class t_T5,
1042 class t_T6>
1043struct Switch7<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1044
1045 typedef t_T1 Type;
1046};
1047
1048/// This specialization of `Switch7` for a value of 2 of the parameterized
1049/// `t_SWITCH_SELECTOR` selects the parameterized `t_T2` as `Type`.
1050template <class t_T0,
1051 class t_T1,
1052 class t_T2,
1053 class t_T3,
1054 class t_T4,
1055 class t_T5,
1056 class t_T6>
1057struct Switch7<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1058
1059 typedef t_T2 Type;
1060};
1061
1062/// This specialization of `Switch7` for a value of 3 of the parameterized
1063/// `t_SWITCH_SELECTOR` selects the parameterized `t_T3` as `Type`.
1064template <class t_T0,
1065 class t_T1,
1066 class t_T2,
1067 class t_T3,
1068 class t_T4,
1069 class t_T5,
1070 class t_T6>
1071struct Switch7<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1072
1073 typedef t_T3 Type;
1074};
1075
1076/// This specialization of `Switch7` for a value of 4 of the parameterized
1077/// `t_SWITCH_SELECTOR` selects the parameterized `t_T4` as `Type`.
1078template <class t_T0,
1079 class t_T1,
1080 class t_T2,
1081 class t_T3,
1082 class t_T4,
1083 class t_T5,
1084 class t_T6>
1085struct Switch7<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1086
1087 typedef t_T4 Type;
1088};
1089
1090/// This specialization of `Switch7` for a value of 5 of the parameterized
1091/// `t_SWITCH_SELECTOR` selects the parameterized `t_T5` as `Type`.
1092template <class t_T0,
1093 class t_T1,
1094 class t_T2,
1095 class t_T3,
1096 class t_T4,
1097 class t_T5,
1098 class t_T6>
1099struct Switch7<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1100
1101 typedef t_T5 Type;
1102};
1103
1104/// This specialization of `Switch7` for a value of 6 of the parameterized
1105/// `t_SWITCH_SELECTOR` selects the parameterized `t_T6` as `Type`.
1106template <class t_T0,
1107 class t_T1,
1108 class t_T2,
1109 class t_T3,
1110 class t_T4,
1111 class t_T5,
1112 class t_T6>
1113struct Switch7<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1114
1115 typedef t_T6 Type;
1116};
1117
1118 // ==============
1119 // struct Switch8
1120 // ==============
1121
1122/// This meta-function, parameterized by an integral `t_SWITCH_SELECTOR` and
1123/// exactly eight types `t_T0` up to `t_T7`, offers functionality identical
1124/// to
1125/// 'Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4,
1126/// t_T5, t_T6, t_T7>'.
1127template <size_t t_SWITCH_SELECTOR,
1128 class t_T0,
1129 class t_T1,
1130 class t_T2,
1131 class t_T3,
1132 class t_T4,
1133 class t_T5,
1134 class t_T6,
1135 class t_T7>
1136struct Switch8 {
1137
1138 typedef Nil Type;
1139};
1140
1141// SPECIALIZATIONS
1142
1143/// This specialization of `Switch8` for a value of 0 of the parameterized
1144/// `t_SWITCH_SELECTOR` selects the parameterized `t_T0` as `Type`.
1145template <class t_T0,
1146 class t_T1,
1147 class t_T2,
1148 class t_T3,
1149 class t_T4,
1150 class t_T5,
1151 class t_T6,
1152 class t_T7>
1153struct Switch8<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1154
1155 typedef t_T0 Type;
1156};
1157
1158/// This specialization of `Switch8` for a value of 1 of the parameterized
1159/// `t_SWITCH_SELECTOR` selects the parameterized `t_T1` as `Type`.
1160template <class t_T0,
1161 class t_T1,
1162 class t_T2,
1163 class t_T3,
1164 class t_T4,
1165 class t_T5,
1166 class t_T6,
1167 class t_T7>
1168struct Switch8<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1169
1170 typedef t_T1 Type;
1171};
1172
1173/// This specialization of `Switch8` for a value of 2 of the parameterized
1174/// `t_SWITCH_SELECTOR` selects the parameterized `t_T2` as `Type`.
1175template <class t_T0,
1176 class t_T1,
1177 class t_T2,
1178 class t_T3,
1179 class t_T4,
1180 class t_T5,
1181 class t_T6,
1182 class t_T7>
1183struct Switch8<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1184
1185 typedef t_T2 Type;
1186};
1187
1188/// This specialization of `Switch8` for a value of 3 of the parameterized
1189/// `t_SWITCH_SELECTOR` selects the parameterized `t_T3` as `Type`.
1190template <class t_T0,
1191 class t_T1,
1192 class t_T2,
1193 class t_T3,
1194 class t_T4,
1195 class t_T5,
1196 class t_T6,
1197 class t_T7>
1198struct Switch8<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1199
1200 typedef t_T3 Type;
1201};
1202
1203/// This specialization of `Switch8` for a value of 4 of the parameterized
1204/// `t_SWITCH_SELECTOR` selects the parameterized `t_T4` as `Type`.
1205template <class t_T0,
1206 class t_T1,
1207 class t_T2,
1208 class t_T3,
1209 class t_T4,
1210 class t_T5,
1211 class t_T6,
1212 class t_T7>
1213struct Switch8<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1214
1215 typedef t_T4 Type;
1216};
1217
1218/// This specialization of `Switch8` for a value of 5 of the parameterized
1219/// `t_SWITCH_SELECTOR` selects the parameterized `t_T5` as `Type`.
1220template <class t_T0,
1221 class t_T1,
1222 class t_T2,
1223 class t_T3,
1224 class t_T4,
1225 class t_T5,
1226 class t_T6,
1227 class t_T7>
1228struct Switch8<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1229
1230 typedef t_T5 Type;
1231};
1232
1233/// This specialization of `Switch8` for a value of 6 of the parameterized
1234/// `t_SWITCH_SELECTOR` selects the parameterized `t_T6` as `Type`.
1235template <class t_T0,
1236 class t_T1,
1237 class t_T2,
1238 class t_T3,
1239 class t_T4,
1240 class t_T5,
1241 class t_T6,
1242 class t_T7>
1243struct Switch8<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1244
1245 typedef t_T6 Type;
1246};
1247
1248/// This specialization of `Switch8` for a value of 7 of the parameterized
1249/// `t_SWITCH_SELECTOR` selects the parameterized `t_T7` as `Type`.
1250template <class t_T0,
1251 class t_T1,
1252 class t_T2,
1253 class t_T3,
1254 class t_T4,
1255 class t_T5,
1256 class t_T6,
1257 class t_T7>
1258struct Switch8<7, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1259
1260 typedef t_T7 Type;
1261};
1262
1263 // ==============
1264 // struct Switch9
1265 // ==============
1266
1267/// This meta-function, parameterized by an integral `t_SWITCH_SELECTOR` and
1268/// exactly nine types `t_T0` up to `t_T8`, offers functionality identical
1269/// to
1270/// 'Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4,
1271/// t_T5, t_T6, t_T7, t_T8>'.
1272template <size_t t_SWITCH_SELECTOR,
1273 class t_T0,
1274 class t_T1,
1275 class t_T2,
1276 class t_T3,
1277 class t_T4,
1278 class t_T5,
1279 class t_T6,
1280 class t_T7,
1281 class t_T8>
1282struct Switch9 {
1283
1284 typedef Nil Type;
1285};
1286
1287// SPECIALIZATIONS
1288
1289/// This specialization of `Switch9` for a value of 0 of the parameterized
1290/// `t_SWITCH_SELECTOR` selects the parameterized `t_T0` as `Type`.
1291template <class t_T0,
1292 class t_T1,
1293 class t_T2,
1294 class t_T3,
1295 class t_T4,
1296 class t_T5,
1297 class t_T6,
1298 class t_T7,
1299 class t_T8>
1300struct Switch9<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1301
1302 typedef t_T0 Type;
1303};
1304
1305/// This specialization of `Switch9` for a value of 1 of the parameterized
1306/// `t_SWITCH_SELECTOR` selects the parameterized `t_T1` as `Type`.
1307template <class t_T0,
1308 class t_T1,
1309 class t_T2,
1310 class t_T3,
1311 class t_T4,
1312 class t_T5,
1313 class t_T6,
1314 class t_T7,
1315 class t_T8>
1316struct Switch9<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1317
1318 typedef t_T1 Type;
1319};
1320
1321/// This specialization of `Switch9` for a value of 2 of the parameterized
1322/// `t_SWITCH_SELECTOR` selects the parameterized `t_T2` as `Type`.
1323template <class t_T0,
1324 class t_T1,
1325 class t_T2,
1326 class t_T3,
1327 class t_T4,
1328 class t_T5,
1329 class t_T6,
1330 class t_T7,
1331 class t_T8>
1332struct Switch9<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1333
1334 typedef t_T2 Type;
1335};
1336
1337/// This specialization of `Switch9` for a value of 3 of the parameterized
1338/// `t_SWITCH_SELECTOR` selects the parameterized `t_T3` as `Type`.
1339template <class t_T0,
1340 class t_T1,
1341 class t_T2,
1342 class t_T3,
1343 class t_T4,
1344 class t_T5,
1345 class t_T6,
1346 class t_T7,
1347 class t_T8>
1348struct Switch9<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1349
1350 typedef t_T3 Type;
1351};
1352
1353/// This specialization of `Switch9` for a value of 4 of the parameterized
1354/// `t_SWITCH_SELECTOR` selects the parameterized `t_T4` as `Type`.
1355template <class t_T0,
1356 class t_T1,
1357 class t_T2,
1358 class t_T3,
1359 class t_T4,
1360 class t_T5,
1361 class t_T6,
1362 class t_T7,
1363 class t_T8>
1364struct Switch9<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1365
1366 typedef t_T4 Type;
1367};
1368
1369/// This specialization of `Switch9` for a value of 5 of the parameterized
1370/// `t_SWITCH_SELECTOR` selects the parameterized `t_T5` as `Type`.
1371template <class t_T0,
1372 class t_T1,
1373 class t_T2,
1374 class t_T3,
1375 class t_T4,
1376 class t_T5,
1377 class t_T6,
1378 class t_T7,
1379 class t_T8>
1380struct Switch9<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1381
1382 typedef t_T5 Type;
1383};
1384
1385/// This specialization of `Switch9` for a value of 6 of the parameterized
1386/// `t_SWITCH_SELECTOR` selects the parameterized `t_T6` as `Type`.
1387template <class t_T0,
1388 class t_T1,
1389 class t_T2,
1390 class t_T3,
1391 class t_T4,
1392 class t_T5,
1393 class t_T6,
1394 class t_T7,
1395 class t_T8>
1396struct Switch9<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1397
1398 typedef t_T6 Type;
1399};
1400
1401/// This specialization of `Switch9` for a value of 7 of the parameterized
1402/// `t_SWITCH_SELECTOR` selects the parameterized `t_T7` as `Type`.
1403template <class t_T0,
1404 class t_T1,
1405 class t_T2,
1406 class t_T3,
1407 class t_T4,
1408 class t_T5,
1409 class t_T6,
1410 class t_T7,
1411 class t_T8>
1412struct Switch9<7, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1413
1414 typedef t_T7 Type;
1415};
1416
1417/// This specialization of `Switch9` for a value of 8 of the parameterized
1418/// `t_SWITCH_SELECTOR` selects the parameterized `t_T8` as `Type`.
1419template <class t_T0,
1420 class t_T1,
1421 class t_T2,
1422 class t_T3,
1423 class t_T4,
1424 class t_T5,
1425 class t_T6,
1426 class t_T7,
1427 class t_T8>
1428struct Switch9<8, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1429
1430 typedef t_T8 Type;
1431};
1432#endif
1433
1434} // close package namespace
1435
1436
1437#ifndef BDE_OPENSOURCE_PUBLICATION // BACKWARD_COMPATIBILITY
1438
1439// ============================================================================
1440// BACKWARD COMPATIBILITY
1441// ============================================================================
1442
1443#ifdef bslmf_Switch
1444#undef bslmf_Switch
1445#endif
1446/// This alias is defined for backward compatibility.
1447#define bslmf_Switch bslmf::Switch
1448
1449#ifdef bslmf_Switch2
1450#undef bslmf_Switch2
1451#endif
1452/// This alias is defined for backward compatibility.
1453#define bslmf_Switch2 bslmf::Switch2
1454
1455#ifdef bslmf_Switch3
1456#undef bslmf_Switch3
1457#endif
1458/// This alias is defined for backward compatibility.
1459#define bslmf_Switch3 bslmf::Switch3
1460
1461#ifdef bslmf_Switch4
1462#undef bslmf_Switch4
1463#endif
1464/// This alias is defined for backward compatibility.
1465#define bslmf_Switch4 bslmf::Switch4
1466
1467#ifdef bslmf_Switch5
1468#undef bslmf_Switch5
1469#endif
1470/// This alias is defined for backward compatibility.
1471#define bslmf_Switch5 bslmf::Switch5
1472
1473#ifdef bslmf_Switch6
1474#undef bslmf_Switch6
1475#endif
1476/// This alias is defined for backward compatibility.
1477#define bslmf_Switch6 bslmf::Switch6
1478
1479#ifdef bslmf_Switch7
1480#undef bslmf_Switch7
1481#endif
1482/// This alias is defined for backward compatibility.
1483#define bslmf_Switch7 bslmf::Switch7
1484
1485#ifdef bslmf_Switch8
1486#undef bslmf_Switch8
1487#endif
1488/// This alias is defined for backward compatibility.
1489#define bslmf_Switch8 bslmf::Switch8
1490
1491#ifdef bslmf_Switch9
1492#undef bslmf_Switch9
1493#endif
1494/// This alias is defined for backward compatibility.
1495#define bslmf_Switch9 bslmf::Switch9
1496#endif // BDE_OPENSOURCE_PUBLICATION -- BACKWARD_COMPATIBILITY
1497
1498
1499
1500#endif
1501
1502// ----------------------------------------------------------------------------
1503// Copyright 2013 Bloomberg Finance L.P.
1504//
1505// Licensed under the Apache License, Version 2.0 (the "License");
1506// you may not use this file except in compliance with the License.
1507// You may obtain a copy of the License at
1508//
1509// http://www.apache.org/licenses/LICENSE-2.0
1510//
1511// Unless required by applicable law or agreed to in writing, software
1512// distributed under the License is distributed on an "AS IS" BASIS,
1513// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1514// See the License for the specific language governing permissions and
1515// limitations under the License.
1516// ----------------------------- END-OF-FILE ----------------------------------
1517
1518/** @} */
1519/** @} */
1520/** @} */
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlbb_blob.h:576
This struct is empty and represents a nil type.
Definition bslmf_nil.h:131
t_T0 Type
Definition bslmf_switch.h:737
t_T1 Type
Definition bslmf_switch.h:745
Definition bslmf_switch.h:725
Nil Type
Definition bslmf_switch.h:727
t_T0 Type
Definition bslmf_switch.h:768
t_T1 Type
Definition bslmf_switch.h:776
t_T2 Type
Definition bslmf_switch.h:784
Definition bslmf_switch.h:756
Nil Type
Definition bslmf_switch.h:758
t_T0 Type
Definition bslmf_switch.h:811
t_T1 Type
Definition bslmf_switch.h:819
t_T2 Type
Definition bslmf_switch.h:827
t_T3 Type
Definition bslmf_switch.h:835
Definition bslmf_switch.h:799
Nil Type
Definition bslmf_switch.h:801
t_T0 Type
Definition bslmf_switch.h:863
t_T1 Type
Definition bslmf_switch.h:871
t_T2 Type
Definition bslmf_switch.h:879
t_T3 Type
Definition bslmf_switch.h:887
t_T4 Type
Definition bslmf_switch.h:895
Definition bslmf_switch.h:851
Nil Type
Definition bslmf_switch.h:853
Definition bslmf_switch.h:912
Nil Type
Definition bslmf_switch.h:914
Definition bslmf_switch.h:1013
Nil Type
Definition bslmf_switch.h:1015
Definition bslmf_switch.h:1136
Nil Type
Definition bslmf_switch.h:1138
Definition bslmf_switch.h:1282
Nil Type
Definition bslmf_switch.h:1284
Definition bslmf_switch.h:537
Nil Type
Definition bslmf_switch.h:542