A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue4110 below:

shared_ptr(nullptr_t, Deleter) is overconstrained, breaking some sensible deleters


template<class Y, class D> shared_ptr(Y* p, D d);
template<class Y, class D, class A> shared_ptr(Y* p, D d, A a);
template<class D> shared_ptr(nullptr_t p, D d);
template<class D, class A> shared_ptr(nullptr_t p, D d, A a);

-9- Constraints: is_move_constructible_v<D> is true, and d(p) is a well-formed expression. For the first two overloads:

  1. (9.1) If T is an array type, then either T is U[N] and Y(*)[N] is convertible to T*, or T is U[] and Y(*)[] is convertible to T*.
  2. (9.2) If T is not an array type, then Y* is convertible to T*.

template<class D> shared_ptr(nullptr_t p, D d);
template<class D, class A> shared_ptr(nullptr_t p, D d, A a);

-?- Constraints: is_move_constructible_v<D> is true, and d(static_cast<T*>(p)) is a well-formed expression.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4