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)
282template <
size_t t_SWITCH_SELECTOR,
class... t_TYPES>
292template <
class t_T0,
class... t_TYPES>
293struct Switch<0u, t_T0, t_TYPES...> {
297template <
class t_T0,
class t_T1,
class... t_TYPES>
298struct Switch<1u, t_T0, t_T1, t_TYPES...> {
302template <
class t_T0,
class t_T1,
class t_T2,
class... t_TYPES>
303struct Switch<2u, t_T0, t_T1, t_T2, t_TYPES...> {
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...> {
318struct Switch<4u, t_T0, t_T1, t_T2, t_T3, t_T4, t_TYPES...> {
329struct Switch<5u, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_TYPES...> {
341struct Switch<6u, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_TYPES...> {
354struct Switch<7u, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_TYPES...> {
408template <
size_t t_SWITCH_SELECTOR,
421struct Switch<t_SWITCH_SELECTOR,
435 typename Switch<t_SWITCH_SELECTOR - 10, t_T10, t_TYPES...>
::Type Type;
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>;
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>;
445template <
size_t t_SWITCH_SELECTOR,
450using Switch4 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3>;
452template <
size_t t_SWITCH_SELECTOR,
458using Switch5 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4>;
460template <
size_t t_SWITCH_SELECTOR,
467using Switch6 = Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5>;
469template <
size_t t_SWITCH_SELECTOR,
478 Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6>;
480template <
size_t t_SWITCH_SELECTOR,
490 Switch<t_SWITCH_SELECTOR, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7>;
492template <
size_t t_SWITCH_SELECTOR,
502using Switch9 = Switch<t_SWITCH_SELECTOR,
526template <
size_t t_SWITCH_SELECTOR,
559struct Switch<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, 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> {
593struct Switch<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, 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> {
627struct Switch<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, 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> {
661struct Switch<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, 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> {
695struct Switch<8, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8, 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> {
724template <
size_t t_SWITCH_
SELECTOR,
class t_T0,
class t_T1>
734template <
class t_T0,
class t_T1>
742template <
class t_T0,
class t_T1>
755template <
size_t t_SWITCH_
SELECTOR,
class t_T0,
class t_T1,
class t_T2>
765template <
class t_T0,
class t_T1,
class t_T2>
773template <
class t_T0,
class t_T1,
class t_T2>
781template <
class t_T0,
class t_T1,
class t_T2>
794template <
size_t t_SWITCH_SELECTOR,
808template <
class t_T0,
class t_T1,
class t_T2,
class t_T3>
816template <
class t_T0,
class t_T1,
class t_T2,
class t_T3>
824template <
class t_T0,
class t_T1,
class t_T2,
class t_T3>
832template <
class t_T0,
class t_T1,
class t_T2,
class t_T3>
845template <
size_t t_SWITCH_SELECTOR,
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> {
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> {
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> {
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> {
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> {
905template <
size_t t_SWITCH_SELECTOR,
927struct Switch6<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
940struct Switch6<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
953struct Switch6<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
966struct Switch6<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
979struct Switch6<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
992struct Switch6<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5> {
1005template <
size_t t_SWITCH_SELECTOR,
1022template <
class t_T0,
1029struct Switch7<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1036template <
class t_T0,
1043struct Switch7<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1050template <
class t_T0,
1057struct Switch7<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1064template <
class t_T0,
1071struct Switch7<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1078template <
class t_T0,
1085struct Switch7<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1092template <
class t_T0,
1099struct Switch7<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1106template <
class t_T0,
1113struct Switch7<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6> {
1127template <
size_t t_SWITCH_SELECTOR,
1145template <
class t_T0,
1153struct Switch8<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1160template <
class t_T0,
1168struct Switch8<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1175template <
class t_T0,
1183struct Switch8<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1190template <
class t_T0,
1198struct Switch8<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1205template <
class t_T0,
1213struct Switch8<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1220template <
class t_T0,
1228struct Switch8<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1235template <
class t_T0,
1243struct Switch8<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1250template <
class t_T0,
1258struct Switch8<7, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7> {
1272template <
size_t t_SWITCH_SELECTOR,
1291template <
class t_T0,
1300struct Switch9<0, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1307template <
class t_T0,
1316struct Switch9<1, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1323template <
class t_T0,
1332struct Switch9<2, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1339template <
class t_T0,
1348struct Switch9<3, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1355template <
class t_T0,
1364struct Switch9<4, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1371template <
class t_T0,
1380struct Switch9<5, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1387template <
class t_T0,
1396struct Switch9<6, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1403template <
class t_T0,
1412struct Switch9<7, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1419template <
class t_T0,
1428struct Switch9<8, t_T0, t_T1, t_T2, t_T3, t_T4, t_T5, t_T6, t_T7, t_T8> {
1437#ifndef BDE_OPENSOURCE_PUBLICATION
1447#define bslmf_Switch bslmf::Switch
1453#define bslmf_Switch2 bslmf::Switch2
1459#define bslmf_Switch3 bslmf::Switch3
1465#define bslmf_Switch4 bslmf::Switch4
1471#define bslmf_Switch5 bslmf::Switch5
1477#define bslmf_Switch6 bslmf::Switch6
1483#define bslmf_Switch7 bslmf::Switch7
1489#define bslmf_Switch8 bslmf::Switch8
1495#define bslmf_Switch9 bslmf::Switch9
#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
t_T0 Type
Definition bslmf_switch.h:929
t_T1 Type
Definition bslmf_switch.h:942
t_T2 Type
Definition bslmf_switch.h:955
t_T3 Type
Definition bslmf_switch.h:968
t_T4 Type
Definition bslmf_switch.h:981
t_T5 Type
Definition bslmf_switch.h:994
Definition bslmf_switch.h:912
Nil Type
Definition bslmf_switch.h:914
t_T0 Type
Definition bslmf_switch.h:1031
t_T1 Type
Definition bslmf_switch.h:1045
t_T2 Type
Definition bslmf_switch.h:1059
t_T3 Type
Definition bslmf_switch.h:1073
t_T4 Type
Definition bslmf_switch.h:1087
t_T5 Type
Definition bslmf_switch.h:1101
t_T6 Type
Definition bslmf_switch.h:1115
Definition bslmf_switch.h:1013
Nil Type
Definition bslmf_switch.h:1015
t_T0 Type
Definition bslmf_switch.h:1155
t_T1 Type
Definition bslmf_switch.h:1170
t_T2 Type
Definition bslmf_switch.h:1185
t_T3 Type
Definition bslmf_switch.h:1200
t_T4 Type
Definition bslmf_switch.h:1215
t_T5 Type
Definition bslmf_switch.h:1230
t_T6 Type
Definition bslmf_switch.h:1245
t_T7 Type
Definition bslmf_switch.h:1260
Definition bslmf_switch.h:1136
Nil Type
Definition bslmf_switch.h:1138
t_T0 Type
Definition bslmf_switch.h:1302
t_T1 Type
Definition bslmf_switch.h:1318
t_T2 Type
Definition bslmf_switch.h:1334
t_T3 Type
Definition bslmf_switch.h:1350
t_T4 Type
Definition bslmf_switch.h:1366
t_T5 Type
Definition bslmf_switch.h:1382
t_T6 Type
Definition bslmf_switch.h:1398
t_T7 Type
Definition bslmf_switch.h:1414
t_T8 Type
Definition bslmf_switch.h:1430
Definition bslmf_switch.h:1282
Nil Type
Definition bslmf_switch.h:1284
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:561
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:578
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:595
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:612
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:629
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:646
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:663
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:680
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:697
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:714
Definition bslmf_switch.h:537
Nil Type
Definition bslmf_switch.h:542