Created on 2009-05-28.00:00:00 last changed 171 months ago
Proposed resolution:
In [concept.transform] before p. 4 change as indicated:
auto concept RvalueOf<typename T> {typenameRvalueReference type = T&&; requiresExplicitlyConvertible<T&, type> && Convertible<T&&, type>SameType<T&, type&>; }
A recent news group article points to several defects in the specification of reference-related concepts.
One problem of the concept RvalueOf as currently defined in [concept.transform]:
concept RvalueOf<typename T> { typename type = T&&; requires ExplicitlyConvertible<T&,type> && Convertible<T&&,type>; } template<typename T> concept_map RvalueOf<T&> { typedef T&& type; }
is that if T is an lvalue-reference, the requirement Convertible<T&&,type> isn't satisfied for lvalue-references, because after reference-collapsing in the concept definition we have Convertible<T&,type> in this case, which isn't satisfied in the concept map template and also is not the right constraint either. I think that the reporter is right that SameType requirements should do the job and that we also should use the new RvalueReference concept to specify a best matching type requirement.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg831 |
2009-05-28 00:00:00 | admin | create |