xieite::type_list<Ts...>::apply()

Defined in header <xieite/meta/type_list.hpp>

Invokes a functor with Ts passed as template arguments.


Declaration

static constexpr auto apply(auto&& fn, auto&&... args) XIEITE_ARROW(
	XIEITE_FWD(fn).template operator()<Ts...>(XIEITE_FWD(args)...)
)


Example

int main() {
	using List = xieite::type_list<int, char, float, double>;

	List::apply([]<typename... Ts> {
		xieite::dump(xieite::type_name<Ts>...);
	});
}
Possible output:
int char float double
[View in Compiler Explorer]