template <class U>
copy_on_write(U&& x, disable_copy<U> = nullptr)
template <class U, class V, class... Args>
copy_on_write(U&& x, V&& y, Args&&... args)
copy_on_write(const copy_on_write& x) noexcept
copy_on_write(copy_on_write&& x) noexcept

Constructs a copy_on_write

  1. The first call to the default constructor will construct a default instance of element_type which will be used for subsequent calls to the default constructor. The default instance will be released at exit.

  2. Constructs a new copy_on_write object with a single argument.

  3. Constructs a new copy_on_write object with two or more arguments.

  4. Copy construction is a non-throwing operation and simply increments the reference count on the stored object.

  5. Move construction.