23 General utilities library [utilities]

23.11 Smart pointers [smartptr]

23.11.1 Class template unique_­ptr [unique.ptr]

23.11.1.3 unique_­ptr for array objects with a runtime length [unique.ptr.runtime]

23.11.1.3.4 unique_­ptr modifiers [unique.ptr.runtime.modifiers]

void reset(nullptr_t p = nullptr) noexcept;

Effects: Эквивалентно reset(pointer()).

template <class U> void reset(U p) noexcept;

Эта функция ведет себя так же, как reset член основного шаблона, за исключением того, что она не должна участвовать в разрешении перегрузки, если либо

  • U того же типа, что и pointer, или

  • pointer имеет тот же тип element_­type*, U что и тип указателя V*, и V(*)[] может быть преобразован в element_­type(*)[].