
El 05/08/2011 11:04, Mathias Gaunard escribió:
Quick question about the SBO: why are you using two static_casts, with one to void* and another to the target type, rather than the more explicit reinterpret_cast?
Stylistic issue, no problem to change it to reinterpret_cast if that helps diagnostics.
Unfortunately you cannot put long_t directly in the union (since pointer does not have to be a POD, I take it?), so I'm not sure the code can be made standard-conforming in C++03.
Not in theory, but all C++03 compilers treat this correctly. Anyway, maybe we could find a workaround to avoid defining the copy contructor (which is a limitation of the Boost.Move library, I think).
Containers have a constructor that takes two iterators. It might be interesting to extend this by adding a constructor that takes a single range argument.
Yes, in ordered containers there are optimization opportunities in case the range is guaranteed to be already ordered (and/or unique) with the same comparison functor. Best, Ion