This patch adds deduction guides to <memory> to allow deducing construction of shared_ptrs from unique_ptrs, and from weak_ptrs and vice versa, as specified by C++17.
The tests should be more comprehensive; they should ASSERT_SAME_TYPE(decltype(s), XXX) to make sure that the deduction guides actually return the correct type, rather than just compile.
When you're testing type-deduction, I find it much easier to convince myself that the types are correct if you are explicit whenever possible (instead of just auto everywhere)
using SP = std::shared_ptr<A>; using WP = std::weak_ptr<A>; SP s0 = new A; WP w = s0; auto s = std::shared_ptr(w); ASSERT_SAME_TYPE(decltype(s), SP);
Also, you should check the value of s. Make sure it points to the same thing as s0.
Thanks Marshall. As for www/cxx1z_status.html, my best guess is that it doesn't need updating, since the row for P0433R2 lists it as In progress, which I believe is still the case after this patch. Please correct me if I'm wrong. Otherwise, I'd be grateful if someone with commit access could help me tie a bow around this.