1260. is_constructible<int*,void*> reports true

Section: 23.15.4.3 [meta.unary.prop] Status: Resolved Submitter: Peter Dimov Opened: 2009-11-07 Last modified: 2016-02-10

Priority: Not Prioritized

View other active issues in [meta.unary.prop].

View all other issues in [meta.unary.prop].

View all issues with Resolved status.

Discussion:

The specification of is_constructible<T,Args...> in N3000 uses

static_cast<T>(create<Args>()...)

for the one-argument case, but static_cast also permits unwanted conversions such as void* to T* and Base* to Derived*.

[ Post-Rapperswil: ]

Moved to NAD EditorialResolved, this issue is addressed by paper n3047

Proposed resolution:

Change 23.15.4.3 [meta.unary.prop], p6:

the predicate condition for a template specialization is_constructible<T, Args> shall be satisfied, if and only if the following expression CE variable definition would be well-formed: