xieite::type_list<Ts...>::transform<>

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

Instantiates another template with the elements of a xieite::type_list {} as the arguments.


Declaration

template<std::size_t arity, auto fn>
requires(!(sizeof...(Ts) % arity))
using transform = /* xieite::type_list<???> */;


Example

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

	using Bar = Foo::transform<2, []<typename T, typename U> {
		return std::type_identity<std::pair<T, U>>();
	}>;

	xieite::dump(xieite::type_name<Bar>);
}
Possible output:
xieite::type_list<std::pair<int, char>, std::pair<float, double>, std::pair<void, bool>>
[View in Compiler Explorer]