Issue 673: unique_ptr update (original) (raw)
Change 20.3.1.3 [unique.ptr.single]:
template <class T, class D = default_delete> class unique_ptr { public: typedef implementation (see description below) pointer; ... explicit unique_ptr(
T*pointer p); ... unique_ptr(T*pointer p, implementation defined (see description below) d); unique_ptr(T*pointer p, implementation defined (see description below) d); ...T*pointer operator->() const;T*pointer get() const; ...T*pointer release(); void reset(T*pointer p =0pointer()); };
-3- If the type remove_reference<D>::type::pointerexists, then unique_ptr<T, D>::pointer is a typedef toremove_reference<D>::type::pointer. Otherwiseunique_ptr<T, D>::pointer is a typedef to T*. The type unique_ptr<T, D>::pointer shall be CopyConstructibleand CopyAssignable.
Change 20.3.1.3.2 [unique.ptr.single.ctor]:
unique_ptr(
T*pointer p); ... unique_ptr(T*pointer p, implementation defined d); unique_ptr(T*pointer p, implementation defined d); ... unique_ptr(T*pointer p, const A& d); unique_ptr(T*pointer p, A&& d); ... unique_ptr(T*pointer p, A& d); unique_ptr(T*pointer p, A&& d); ... unique_ptr(T*pointer p, const A& d); unique_ptr(T*pointer p, const A&& d); ...
-23- Requires: If D is not a reference type, construction of the deleter D from an rvalue of type E must shall be well formed and not throw an exception. If D is a reference type, then E must shall be the same type as D(diagnostic required). U*unique_ptr<U,E>::pointer must shall be implicitly convertible to pointer.T*
-25- Postconditions: get() == value u.get() had before the construction, modulo any required offset adjustments resulting from the cast from U*unique_ptr<U,E>::pointer to pointer. T*get_deleter() returns a reference to the internally stored deleter which was constructed fromu.get_deleter().
Change 20.3.1.3.4 [unique.ptr.single.asgn]:
-8- Requires: Assignment of the deleter
Dfrom an rvalueDmustshall not throw an exception.U*unique_ptr<U,E>::pointermustshall be implicitly convertible topointer.T*
Change 20.3.1.3.5 [unique.ptr.single.observers]:
T*pointer operator->() const;...
T*pointer get() const;
Change 20.3.1.3.6 [unique.ptr.single.modifiers]:
T*pointer release();...
void reset(
T*pointer p =0pointer());
Change 20.3.1.4 [unique.ptr.runtime]:
template <class T, class D> class unique_ptr<T[], D> { public: typedef implementation pointer; ... explicit unique_ptr(
T*pointer p); ... unique_ptr(T*pointer p, implementation defined d); unique_ptr(T*pointer p, implementation defined d); ...T*pointer get() const; ...T*pointer release(); void reset(T*pointer p =0pointer()); };
Change 20.3.1.4.2 [unique.ptr.runtime.ctor]:
unique_ptr(
T*pointer p); unique_ptr(T*pointer p, implementation defined d); unique_ptr(T*pointer p, implementation defined d);These constructors behave the same as in the primary template except that they do not accept pointer types which are convertible to
T*pointer. [Note: One implementation technique is to create private templated overloads of these members. _-- end note_]
Change 20.3.1.4.5 [unique.ptr.runtime.modifiers]:
void reset(
T*pointer p =0pointer());-1- Requires: Does not accept pointer types which are convertible to
T*pointer(diagnostic required). [Note: One implementation technique is to create a private templated overload. _-- end note_]