On 8 August 2013 10:38, Andrew Ho wrote:
Howard's implementation did bring something interesting up I noticed about the standard on array unique_ptr:
There is no move constructor/assignment of the form:
// constructor form here, similar issue with move assignment unique_ptr
(move(unique_ptr )) Assuming I'm interpreting the standard correctly, this technically is a compiler error even if U is implicitly convertible to D and D is not a reference (e.g. U == D&). This is not the case for single element unique_ptr. Single element unique ptr will copy-construct D if U is implicitly convertible and a reference.
I don't know if this was intentionally done by the standards committee, or if it was a minor oversight. Howard's implementation does not allow this, GCC 4.8.1 allows this.
Thoughts/comments on how we should handle this in boost? My current implementation follows GCC's implementation, but it is very easy to change.
I think this is probably because I implemented the proposed resolution of http://cplusplus.github.io/LWG/lwg-active.html#2118 for GCC