OpenTTD Source: AdaptT< T > Struct Template Reference

OpenTTD Source 1.11.0-RC1

Public Member Functions | Data Fields
AdaptT< T > Struct Template Reference

Adapter wrapper for CCountedPtr like classes that can't be used directly by stl collections as item type. More...

`#include <countedptr.hpp>`

## Public Member Functions
| AdaptT (const T &t)
| construct by wrapping the given object
T & | operator= (const T &t)
| assignment operator
| operator T& ()
| type-cast operator (used when AdaptT is used instead of T)
| operator const T & () const
| const type-cast operator (used when AdaptT is used instead of const T)

## Data Fields
T | m_t

## Detailed Description

### template<class T>
struct AdaptT< T >

Adapter wrapper for CCountedPtr like classes that can't be used directly by stl collections as item type.

For example CCountedPtr has overloaded operator & which prevents using CCountedPtr in stl collections (i.e. std::list<CCountedPtr<MyType> >)

Definition at line 167 of file countedptr.hpp.

The documentation for this struct was generated from the following file:

- src/misc/countedptr.hpp