Skip to content

LiteFX::is_covariant

Evaluates, if a value of type TValue can be returned as TCovariant. If TCovariant is a reference, TValue must be a reference as well, as returning a temporary as a reference would dangle.

Synopsis

Declared in <litefx/containers.hpp>

template<
    typename TValue,
    typename TCovariant>
concept is_covariant = std::convertible_to<TValue, TCovariant> && (!std::is_reference_v<TCovariant> || std::is_reference_v<TValue>);

Template Parameters

NameDescription
TValueThe type of the value.
TCovariantThe covariant type to check against TValue.