Skip to content

LiteFX::is_covariant

Evaluates if a type TCovariant behaves covariant to a value type TValue. In this context, covariance is expressed as the type TCovariant can be assigned a value of type TValue or can be constructed from a value of TValue.

Synopsis

Declared in <litefx/containers.hpp>

template<
    typename TValue,
    typename TCovariant>
concept is_covariant = std::is_assignable_v<TCovariant, TValue> || std::is_constructible_v<TCovariant, TValue>;

Template Parameters

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