--- title: "type_select" --- Compile time mapping of id to type. When etl::type_lookup is OTT. Type ids must be sequential from zero. This file is generated from `type_select_generator.h` and can be created by running `generate_type_select.bat`. ## type_select Creates a class for compile time id to type. ```cpp etl::type_select ``` The number of types that can be handled is determined by the generator. The class contains a nested template. ### select Gets the type from the id. ```cpp select ``` **Defines** `type` The associated type. **C++14 and above** ```cpp template using select_t = typename select::type; ``` ## Examples ```cpp enum { INT32 = 0, STRING = 1, UINT8 = 2, OTHER = 3 }; // Type from Id. typedef etl::type_select Types; // int32_t typename Types::select_t // uint8_t typename Types::select_t // std::string typename Types::select_t // Compile error typename Types::select_t ```