ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::detail::get_type_pos< T, Ts > Struct Template Reference

Get the position of a type in a template parameter pack. More...

#include <detray/utils/type_traits.hpp>

Static Public Member Functions

template<typename first_t, typename... remaining_types>
static constexpr std::size_t type_pos_back ()
 Unroll a parameter pack without using a tuple to find T.

Static Public Attributes

static constexpr std::size_t value = sizeof...(Ts) - type_pos_back<Ts...>()
 Zero-based position of T in Ts....

Detailed Description

template<typename T, typename... Ts>
struct detray::detail::get_type_pos< T, Ts >

Get the position of a type in a template parameter pack.

Member Function Documentation

◆ type_pos_back()

template<typename T, typename... Ts>
template<typename first_t, typename... remaining_types>
constexpr std::size_t detray::detail::get_type_pos< T, Ts >::type_pos_back ( )
staticconstexpr

Unroll a parameter pack without using a tuple to find T.

Template Parameters
first_tcurrent type being compared
remaining_typestypes still to examine
Returns
one-based position from the back, or the maximum std::size_t if no match is found