4.6.0
Freundlich's C++ toolkit
|
Turns an incomplete type into a complete one, allowing recursion.
Unfortunately, C++ makes no guarantees that incomplete types can be used as a template parameter of a container like std::vector. For example, the following might or might not work:
The recursive class uses a unique pointer internally which allows its type to be incomplete. We can therefore write
Public Member Functions | |
recursive (Type const &) | |
recursive (Type &&) | |
recursive (recursive const &) | |
recursive (recursive &&) noexcept | |
recursive & | operator= (recursive const &) |
recursive & | operator= (recursive &&) noexcept |
~recursive () | |
Type & | get () |
Type const & | get () const |
Type * | operator-> () |
Type const * | operator-> () const |
|
explicit |
|
explicit |
fcppt::recursive< Type >::recursive | ( | recursive< Type > const & | ) |
|
noexcept |
fcppt::recursive< Type >::~recursive | ( | ) |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
noexcept |
recursive & fcppt::recursive< Type >::operator= | ( | recursive< Type > const & | ) |