xte::wrap_type {}

Defined in header <xte/meta/wrap_type.hpp>

Wraps a type. This exists because std::type_identity {} isn't guaranteed to be default-constructible.


Definition

template<typename T>
struct wrap_type {
	using type = T;
};



Example

static_assert(xte::is_same<int, xte::wrap_type<int>::type>);
Output:
double
[View in Compiler Explorer]