OpenTTD Source 20250703-master-gbf07751ee7
|
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) |
Container::reference | at (const Index &pos) |
Container::const_reference | at (size_t pos) const |
Container::const_reference | at (const Index &pos) const |
Container::reference | operator[] (size_t pos) |
Container::reference | operator[] (const Index &pos) |
Container::const_reference | operator[] (size_t pos) const |
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 40 of file convertible_through_base.hpp.
|
inline |
Definition at line 43 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.
|
inline |
Definition at line 46 of file convertible_through_base.hpp.
|
inline |
Definition at line 49 of file convertible_through_base.hpp.