You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest the following handy plural form of find_index:
namespacedetails {
template<typename List, std::size_t I>
structfind_ind_state {
using L = List;
staticconst std::size_t Idx = I;
};
template<typename Type>
structfind_indices {
template<typename State, typename T>
using invoke = find_ind_state<
meta::if_< std::is_same<Type,T> ,
meta::push_back< typename State::L, meta::size_t<State::Idx> >,
typename State::L
>,
State::Idx+1
>;
};
};
/** Returns a list of all indices of types equal to \p T in list \p */template<typename T, typename List>
using find_indices = typename meta::accumulate< List,
details::find_ind_state< meta::list<> , 0 >,
/* accumulate the index list and the current index of the element*/
details::find_indices<T>
>::L;
The text was updated successfully, but these errors were encountered:
I suggest the following handy plural form of
find_index
:The text was updated successfully, but these errors were encountered: