|
OpenTTD Source 20260512-master-g20b387b91f
|
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 (size_t pos)=delete |
| Container::reference | at (const Index &pos) |
| Container::const_reference | at (size_t pos) const =delete |
| Container::const_reference | at (const Index &pos) const |
| Container::reference | operator[] (size_t pos)=delete |
| Container::reference | operator[] (const Index &pos) |
| Container::const_reference | operator[] (size_t pos) const =delete |
| 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 41 of file convertible_through_base.hpp.
|
inline |
Definition at line 44 of file convertible_through_base.hpp.
|
inline |
Definition at line 47 of file convertible_through_base.hpp.
|
inline |
Definition at line 50 of file convertible_through_base.hpp.