OpenTTD Source 20260129-master-g2bb01bd0e4
ConvertibleThroughBaseOrUnderlyingOrTo Concept Reference

Type is convertible to TTo, either directly, through ConvertibleThroughBase or through to_underlying. More...

#include <settings_internal.h>

Concept definition

template<typename T, typename TTo>
concept ConvertibleThroughBaseOrUnderlyingOrTo = ConvertibleThroughBaseOrTo<T, TTo> || (is_scoped_enum_v<T> && std::is_convertible_v<std::underlying_type_t<T>, TTo>)
Type is convertible to TTo, either directly or through ConvertibleThroughBase.
Type is convertible to TTo, either directly, through ConvertibleThroughBase or through to_underlying.

Detailed Description

Type is convertible to TTo, either directly, through ConvertibleThroughBase or through to_underlying.

Template Parameters
TThe type under consideration.
TToThe type to convert to.

Definition at line 78 of file settings_internal.h.