Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // pick from two types based on a switch type
- template<typename C0, typename C1, typename V0, typename V1> struct _select
- {
- template<typename S> struct _switch {};
- template<> struct _switch<C0> { typedef V0 result; };
- template<> struct _switch<C1> { typedef V1 result; };
- };
- //example
- typedef typename _select<RowMajor, ColMajor, row_array, col_array>
- ::_switch<ElementLayout>::result storage_array;
- storage_array m;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement