OpenTTD Source 20250511-master-gf2b48bad79
ConvertibleThroughBaseOrTo Concept Reference

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

#include <convertible_through_base.hpp>

Concept definition

template<typename T, typename TTo>
concept ConvertibleThroughBaseOrTo = std::is_convertible_v<T, TTo> || ConvertibleThroughBase<T>
Type is convertible to TTo, either directly or through ConvertibleThroughBase.
A type is considered 'convertible through base()' when it has a 'base()' function that returns someth...

Detailed Description

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

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

Definition at line 30 of file convertible_through_base.hpp.