[libc++] Fix LWG 2874: Constructor shared_ptr::shared_ptr(Y*) should be constrained.

This patch fixes LWG2874. It is based on the original patch by Zoe Carver
originally uploaded at D81417.

Differential Revision: https://reviews.llvm.org/D81417

GitOrigin-RevId: 1f8a6dcf128064e2ac75e4ffd227750779d83ade
3 files changed