8#ifndef INCLUDED_BSLMF_SWITCH
9#define INCLUDED_BSLMF_SWITCH
249#include <bslscm_version.h>
258#if defined(BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES) \
259 && defined(BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES)
268#define BSLMF_SWITCH_USING_VARIADIC_TEMPLATES
275#if defined(BSLMF_SWITCH_USING_VARIADIC_TEMPLATES)
284template <
size_t t_SWITCH_SELECTOR,
class... t_TYPES>
295template <
class t_T0,
class... t_TYPES>
296struct Switch<0u, t_T0, t_TYPES...> {
300template <
class t_T0,
class t_T1,
class... t_TYPES>
301struct Switch<1u, t_T0, t_T1, t_TYPES...> {
305template <
class t_T0,
class t_T1,
class t_T2,
class... t_TYPES>
306struct Switch<2u, t_T0, t_T1, t_T2, t_TYPES...> {
310template <
class t_T0,
class t_T1,
class t_T2,
class t_T3,
class... t_TYPES>
311struct Switch<3u, t_T0, t_T1, t_T2, t_T3, t_TYPES...> {
321struct Switch<4u, t_T0, t_T1, t_T2, t_T3, t_T4, t_TYPES...> {
332struct Switch<5u, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_TYPES...> {
344struct Switch<6u, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_TYPES...> {
357struct Switch<7u, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_TYPES...> {
411template <
size_t t_SWITCH_SELECTOR,
424struct Switch<t_SWITCH_SELECTOR,
438 typename Switch<t_SWITCH_SELECTOR - 10, t_T10, t_TYPES...>
::Type Type;
441#ifndef BDE_OMIT_INTERNAL_DEPRECATED
442template <
size_t t_SWITCH_
SELECTOR,
class t_T0,
class t_T1>
443using Switch2 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1>;
445template <
size_t t_SWITCH_
SELECTOR,
class t_T0,
class t_T1,
class t_T2>
446using Switch3 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2>;
448template <
size_t t_SWITCH_SELECTOR,
453using Switch4 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3>;
455template <
size_t t_SWITCH_SELECTOR,
461using Switch5 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4>;
463template <
size_t t_SWITCH_SELECTOR,
470using Switch6 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5>;
472template <
size_t t_SWITCH_SELECTOR,
481 Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6>;
483template <
size_t t_SWITCH_SELECTOR,
493 Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7>;
495template <
size_t t_SWITCH_SELECTOR,
505using Switch9 = Switch<t_SWITCH_SELECTOR,
531template <
size_t t_SWITCH_SELECTOR,
565struct Switch<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
582struct Switch<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
599struct Switch<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
616struct Switch<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
633struct Switch<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
650struct Switch<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
667struct Switch<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
684struct Switch<7, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
701struct Switch<8, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
718struct Switch<9, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9> {
732template <
size_t t_SWITCH_
SELECTOR,
class t_T0,
class t_T1>
742template <
class t_T0,
class t_T1>
750template <
class t_T0,
class t_T1>
765template <
size_t t_SWITCH_
SELECTOR,
class t_T0,
class t_T1,
class t_T2>
775template <
class t_T0,
class t_T1,
class t_T2>
783template <
class t_T0,
class t_T1,
class t_T2>
791template <
class t_T0,
class t_T1,
class t_T2>
806template <
size_t t_SWITCH_SELECTOR,
820template <
class t_T0,
class t_T1,
class t_T2,
class t_T3>
828template <
class t_T0,
class t_T1,
class t_T2,
class t_T3>
836template <
class t_T0,
class t_T1,
class t_T2,
class t_T3>
844template <
class t_T0,
class t_T1,
class t_T2,
class t_T3>
859template <
size_t t_SWITCH_SELECTOR,
874template <
class t_T0,
class t_T1,
class t_T2,
class t_T3,
class t_T4>
875struct Switch5<0, t_T0, t_T1, t_T2, t_T3, t_T4> {
882template <
class t_T0,
class t_T1,
class t_T2,
class t_T3,
class t_T4>
883struct Switch5<1, t_T0, t_T1, t_T2, t_T3, t_T4> {
890template <
class t_T0,
class t_T1,
class t_T2,
class t_T3,
class t_T4>
891struct Switch5<2, t_T0, t_T1, t_T2, t_T3, t_T4> {
898template <
class t_T0,
class t_T1,
class t_T2,
class t_T3,
class t_T4>
899struct Switch5<3, t_T0, t_T1, t_T2, t_T3, t_T4> {
906template <
class t_T0,
class t_T1,
class t_T2,
class t_T3,
class t_T4>
907struct Switch5<4, t_T0, t_T1, t_T2, t_T3, t_T4> {
921template <
size_t t_SWITCH_SELECTOR,
943struct Switch6<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
956struct Switch6<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
969struct Switch6<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
982struct Switch6<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
995struct Switch6<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
1002template <
class t_T0,
1008struct Switch6<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
1023template <
size_t t_SWITCH_SELECTOR,
1040template <
class t_T0,
1047struct Switch7<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1054template <
class t_T0,
1061struct Switch7<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1068template <
class t_T0,
1075struct Switch7<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1082template <
class t_T0,
1089struct Switch7<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1096template <
class t_T0,
1103struct Switch7<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1110template <
class t_T0,
1117struct Switch7<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1124template <
class t_T0,
1131struct Switch7<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1147template <
size_t t_SWITCH_SELECTOR,
1165template <
class t_T0,
1173struct Switch8<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1180template <
class t_T0,
1188struct Switch8<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1195template <
class t_T0,
1203struct Switch8<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1210template <
class t_T0,
1218struct Switch8<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1225template <
class t_T0,
1233struct Switch8<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1240template <
class t_T0,
1248struct Switch8<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1255template <
class t_T0,
1263struct Switch8<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1270template <
class t_T0,
1278struct Switch8<7, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1294template <
size_t t_SWITCH_SELECTOR,
1313template <
class t_T0,
1322struct Switch9<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1329template <
class t_T0,
1338struct Switch9<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1345template <
class t_T0,
1354struct Switch9<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1361template <
class t_T0,
1370struct Switch9<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1377template <
class t_T0,
1386struct Switch9<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1393template <
class t_T0,
1402struct Switch9<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1409template <
class t_T0,
1418struct Switch9<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1425template <
class t_T0,
1434struct Switch9<7, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1441template <
class t_T0,
1450struct Switch9<8, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1459#ifndef BDE_OPENSOURCE_PUBLICATION
1469#define bslmf_Switch bslmf::Switch
1475#define bslmf_Switch2 bslmf::Switch2
1481#define bslmf_Switch3 bslmf::Switch3
1487#define bslmf_Switch4 bslmf::Switch4
1493#define bslmf_Switch5 bslmf::Switch5
1499#define bslmf_Switch6 bslmf::Switch6
1505#define bslmf_Switch7 bslmf::Switch7
1511#define bslmf_Switch8 bslmf::Switch8
1517#define bslmf_Switch9 bslmf::Switch9
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlbb_blob.h:579
Definition bslmf_nil.h:133
t_T0 Type
Definition bslmf_switch.h:745
t_T1 Type
Definition bslmf_switch.h:753
Definition bslmf_switch.h:733
Nil Type
Definition bslmf_switch.h:735
t_T0 Type
Definition bslmf_switch.h:778
t_T1 Type
Definition bslmf_switch.h:786
t_T2 Type
Definition bslmf_switch.h:794
Definition bslmf_switch.h:766
Nil Type
Definition bslmf_switch.h:768
t_T0 Type
Definition bslmf_switch.h:823
t_T1 Type
Definition bslmf_switch.h:831
t_T2 Type
Definition bslmf_switch.h:839
t_T3 Type
Definition bslmf_switch.h:847
Definition bslmf_switch.h:811
Nil Type
Definition bslmf_switch.h:813
t_T0 Type
Definition bslmf_switch.h:877
t_T1 Type
Definition bslmf_switch.h:885
t_T2 Type
Definition bslmf_switch.h:893
t_T3 Type
Definition bslmf_switch.h:901
t_T4 Type
Definition bslmf_switch.h:909
Definition bslmf_switch.h:865
Nil Type
Definition bslmf_switch.h:867
t_T0 Type
Definition bslmf_switch.h:945
t_T1 Type
Definition bslmf_switch.h:958
t_T2 Type
Definition bslmf_switch.h:971
t_T3 Type
Definition bslmf_switch.h:984
t_T4 Type
Definition bslmf_switch.h:997
t_T5 Type
Definition bslmf_switch.h:1010
Definition bslmf_switch.h:928
Nil Type
Definition bslmf_switch.h:930
t_T0 Type
Definition bslmf_switch.h:1049
t_T1 Type
Definition bslmf_switch.h:1063
t_T2 Type
Definition bslmf_switch.h:1077
t_T3 Type
Definition bslmf_switch.h:1091
t_T4 Type
Definition bslmf_switch.h:1105
t_T5 Type
Definition bslmf_switch.h:1119
t_T6 Type
Definition bslmf_switch.h:1133
Definition bslmf_switch.h:1031
Nil Type
Definition bslmf_switch.h:1033
t_T0 Type
Definition bslmf_switch.h:1175
t_T1 Type
Definition bslmf_switch.h:1190
t_T2 Type
Definition bslmf_switch.h:1205
t_T3 Type
Definition bslmf_switch.h:1220
t_T4 Type
Definition bslmf_switch.h:1235
t_T5 Type
Definition bslmf_switch.h:1250
t_T6 Type
Definition bslmf_switch.h:1265
t_T7 Type
Definition bslmf_switch.h:1280
Definition bslmf_switch.h:1156
Nil Type
Definition bslmf_switch.h:1158
t_T0 Type
Definition bslmf_switch.h:1324
t_T1 Type
Definition bslmf_switch.h:1340
t_T2 Type
Definition bslmf_switch.h:1356
t_T3 Type
Definition bslmf_switch.h:1372
t_T4 Type
Definition bslmf_switch.h:1388
t_T5 Type
Definition bslmf_switch.h:1404
t_T6 Type
Definition bslmf_switch.h:1420
t_T7 Type
Definition bslmf_switch.h:1436
t_T8 Type
Definition bslmf_switch.h:1452
Definition bslmf_switch.h:1304
Nil Type
Definition bslmf_switch.h:1306
bslmf::Switch< 0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9 >::Type t_T0 Type
Definition bslmf_switch.h:567
bslmf::Switch< 1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9 >::Type t_T1 Type
Definition bslmf_switch.h:584
bslmf::Switch< 2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9 >::Type t_T2 Type
Definition bslmf_switch.h:601
bslmf::Switch< 3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9 >::Type t_T3 Type
Definition bslmf_switch.h:618
bslmf::Switch< 4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9 >::Type t_T4 Type
Definition bslmf_switch.h:635
bslmf::Switch< 5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9 >::Type t_T5 Type
Definition bslmf_switch.h:652
bslmf::Switch< 6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9 >::Type t_T6 Type
Definition bslmf_switch.h:669
bslmf::Switch< 7, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9 >::Type t_T7 Type
Definition bslmf_switch.h:686
bslmf::Switch< 8, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9 >::Type t_T8 Type
Definition bslmf_switch.h:703
bslmf::Switch< 9, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, t_T9 >::Type t_T9 Type
Definition bslmf_switch.h:720
Definition bslmf_switch.h:542
Nil Type
Definition bslmf_switch.h:548