Template Function ctql::foreach_indexed
Defined in File ct_string.inl
Function Documentation
-
template<class ...Ts, class Fn>
constexpr void ctql::foreach_indexed(Fn &&fn) Invoke
fn.template operator()<T, I>()for eachTinTs...with its zero-based indexI.@usage
struct printer { template<class T, std::size_t I> void operator()() const { // use T and I } }; ctql::foreach_indexed<int, double, char>(printer{});
- Template Parameters:
Ts – The type sequence to enumerate.
- Parameters:
fn – A callable whose
operator()is a template taking<T, I>.