|
OpenTTD Source 20260421-master-gc2fbc6fdeb
|
A sort-of mixin that implements 'at(pos)' and 'operator[](pos)' only for a specific type. More...
#include <convertible_through_base.hpp>
Public Member Functions | |
| Container::reference | at (const Index &pos) |
| Container::const_reference | at (const Index &pos) const |
| Container::reference | operator[] (const Index &pos) |
| Container::const_reference | operator[] (const Index &pos) const |
A sort-of mixin that implements 'at(pos)' and 'operator[](pos)' only for a specific type.
The type must have a suitable '.base()' method and therefore must inherently match 'ConvertibleThroughBase'. This to prevent having to call '.base()' for many container accesses, whilst preventing accidental use of the wrong index type.
Definition at line 38 of file convertible_through_base.hpp.
|
inline |
Definition at line 40 of file convertible_through_base.hpp.
|
inline |
Definition at line 42 of file convertible_through_base.hpp.
|
inline |
Definition at line 44 of file convertible_through_base.hpp.
|
inline |
Definition at line 46 of file convertible_through_base.hpp.