OpenTTD Source: ConvertibleThroughBaseOrTo Concept Reference

OpenTTD Source 15.0-RC2

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>
ConvertibleThroughBaseOrTo
Type is convertible to TTo, either directly or through ConvertibleThroughBase.
Definition convertible_through_base.hpp:30
ConvertibleThroughBase
A type is considered 'convertible through base()' when it has a 'base()' function that returns someth...
Definition convertible_through_base.hpp:19

## Detailed Description

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

Template Parameters

  T | The type under consideration.
  TTo | The type to convert to.

Definition at line 30 of file convertible_through_base.hpp.