Created on 2007-06-14.00:00:00 last changed 172 months ago
Proposed resolution:
To the Returns paragraph for operator unspecified-bool-type() const of [unique.ptr.single.observers] paragraph 11 and [util.smartptr.shared.obs] paragraph 16, add the sentence:
The return type shall not be convertible to int.
[ Bellevue: ]
Close as NAD. Accepting paper N2435 makes it irrelevant.
The standard library uses the operator unspecified-bool-type() const idiom in five places. In three of those places ([func.wrap.func.cap], function capacity for example) the returned value is constrained to disallow unintended conversions to int. The standardese is
The return type shall not be convertible to int.
This constraint is omitted for unique_ptr and shared_ptr. It should be added for those.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3440 |
2010-10-21 18:28:33 | admin | set | messages: + msg3439 |
2007-06-14 00:00:00 | admin | create |