Title
is_constructible<int*,void*> reports true
Status
resolved
Section
[meta.unary.prop]
Submitter
Peter Dimov

Created on 2009-11-07.00:00:00 last changed 170 months ago

Messages

Date: 2010-10-21.19:06:53

Proposed resolution:

Change [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:

  • if sizeof...(Args) == 0 1, the expression:

    static_cast<T>(create<Args>()...)
    T t;
    
  • otherwise the expression:

    T t(create<Args>()...);
    
Date: 2010-11-20.00:05:46

[ Post-Rapperswil: ]

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

Date: 2009-11-07.00:00:00

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*.

History
Date User Action Args
2010-11-19 19:04:45adminsetstatus: nad editorial -> resolved
2010-10-21 19:06:53adminsetmessages: + msg4766
2010-10-21 19:06:53adminsetstatus: new -> nad editorial
2010-10-21 18:28:33adminsetmessages: + msg1353
2009-11-07 00:00:00admincreate