Created on 2013-09-24.00:00:00 last changed 130 months ago
Proposed resolution:
This wording is relative to N3691.
Change [meta.unary.prop] around p6 as indicated:
-6- Given the following function prototype:
template <class T> typename add_rvalue_reference<T>::type create() noexcept;the predicate condition for a template specialization is_constructible<T, Args...> shall be satisfied if and only if the following variable definition would be well-formed for some invented variable t:
T t(create<Args>()...);[…]
Change [meta.unary.prop] around p4 as indicated:
-4- Given the following function prototype:
template <class T> typename add_rvalue_reference<T>::type create() noexcept;the predicate condition for a template specialization is_convertible<From, To> shall be satisfied if and only if the return expression in the following code would be well-formed, including any implicit conversions to the return type of the function:
To test() { return create<From>(); }[…]
[ 2013-09 Chicago ]
No objections, so moved to Immediate.
Accept for Working Paper
[ 2013-09-26 Nico improves wording ]
The additional change is just to keep both places were create() is defined consistent.
[ 2013-09-24 Daniel comments and provides resolution suggestion ]
Replacing create<> by std::declval<> would make the situation worse, because the definition of is_constructible is based on a well-formed variable definition and there is no way to specify a variable definition without odr-using its initializer arguments. It should also be added, that there is another problem with the specification of all existing is_trivially_* traits, because neither create<> nor std::declval<> are considered as trivial functions, but this should be solved by a different issue.
Addresses US 18
The trait is_constructible<T, Args...> is defined in terms of a helper template, create<>, that is identical to std::declval<> except for the latter's noexcept clause.
If the absence of noexcept is critical to this definition, insert a Note of explanation; otherwise, excise create<> and reformulate in terms of declval<> the definition of is_constructible.History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-20 13:20:35 | admin | set | status: wp -> c++14 |
2013-09-29 11:37:54 | admin | set | messages: + msg6662 |
2013-09-29 11:37:54 | admin | set | status: immediate -> wp |
2013-09-26 17:48:02 | admin | set | messages: + msg6635 |
2013-09-26 17:48:02 | admin | set | status: new -> immediate |
2013-09-24 19:03:04 | admin | set | messages: + msg6601 |
2013-09-24 19:03:04 | admin | set | messages: + msg6600 |
2013-09-24 00:00:00 | admin | create |