Return a reference to an object, changing the kind and
replacing the contents.
The contents are replaced with an empty object using the current memory_resource.
All previously obtained iterators and references obtained beforehand are
Linear in the size of *this.
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)