Solves circular dependencies, enabling recursive types.

The `recursive_wrapper` class template has an interface similar to a simple value container, but its content is allocated dynamically. This allows `recursive_wrapper` to hold types `T` whose member data leads to a circular dependency (e.g., a data member of `T` has a data member of type `T`).

The application of `recursive_wrapper` is easiest understood in context. See for a demonstration of a common use of the class template.

Notes:

- Any type specified as the template argument to `recursive_wrapper` must be capable of construction via `operator new`. Thus, for instance, references are not supported.

T
Destructor.

Deletes the content of `*this`.

Will not throw.
Default constructor.

Initializes `*this` by default construction of `T`.

`T` must fulfill the requirements of the DefaultConstructible [20.1.4] concept.

May fail with any exceptions arising from the default constructor of `T` or, in the event of insufficient memory, with `std::bad_alloc`.

const recursive_wrapper &
Copy constructor.

Copies the content of `other` into `*this`.

May fail with any exceptions arising from the copy constructor of `T` or, in the event of insufficient memory, with `std::bad_alloc`.

const T &
Value constructor.

Copies `operand` into `*this`.

May fail with any exceptions arising from the copy constructor of `T` or, in the event of insufficient memory, with `std::bad_alloc`.

void

recursive_wrapper &

Exchanges contents of `*this` and `other`.

Will not throw.
recursive_wrapper &

const recursive_wrapper &
Copy assignment operator.

Assigns the content of `rhs` to the content of `*this`.

`T` must fulfill the requirements of the Assignable concept.

May fail with any exceptions arising from the assignment operator of `T`.

recursive_wrapper &

const T &
Value assignment operator.

Assigns `rhs` into the content of `*this`.

`T` must fulfill the requirements of the Assignable concept.

May fail with any exceptions arising from the assignment operator of `T`.

T &
const T &

Returns a reference to the content of `*this`.

Will not throw.
T *
const T *

Returns a pointer to the content of `*this`.

Will not throw.

Determines whether the specified type is a specialization of `recursive_wrapper`.

Value is true iff `T` is a specialization of ``recursive_wrapper``.

Note: `is_recursive_wrapper` is a model of MPL's IntegralConstant concept.

unspecified
bool unspecified

Unwraps the specified argument if given a specialization of ``recursive_wrapper``.

`type` is equivalent to `T::type` if `T` is a specialization of ``recursive_wrapper``. Otherwise, `type` is equivalent to `T`.

unspecified