Midge  v3.9.2
Data Processing Framework
typelength.hh
Go to the documentation of this file.
1 #ifndef _midge_typelength_hh_
2 #define _midge_typelength_hh_
3 
4 #include "typerename.hh"
5 
6 #include <type_traits>
7 
8 namespace midge
9 {
11  template< class... x_types > using type_length = std::integral_constant< std::size_t, sizeof...(x_types) >;
12 
14  template< class x_list > using type_size = type_rename< x_list, type_length >;
15 
16 }
17 
18 #endif
Definition: _buffer.hh:11
type_rename< x_list, type_length > type_size
Calculates the number of types in type list x_list; returns it as type_size::value.
Definition: typelength.hh:14
typename type_rename_impl< x_a, x_b >::type type_rename
Replaces type A with type B; e.g. type_rename<type_list<int, float>, std::pair> –> std::pair<int...
Definition: typerename.hh:24
std::integral_constant< std::size_t, sizeof...(x_types) > type_length
Calculates the number of types in template pack x_types; returns it as type_length::value.
Definition: typelength.hh:11