[c++0x] unique_ptr.hpp implementation
Howard Hinnant
hhinnant@apple.com
Wed Aug 15 15:03:00 GMT 2007
On Aug 14, 2007, at 5:56 PM, Chris Fairles wrote:
> However, EBO only kicks in when theres only one instance of each empty
> type int the tuple (i.e. sizeof(tuple<deleter, deleter>) == 2 when I'd
> like it to be 1).
I believe this is as it has to be. There's a note in section 10,
paragraph 5:
> however, two subobjects that have the same class type and that
> belong to the same most derived object must not be allocated at the
> same address
In practice this hasn't been much of a problem. I haven't run across
any use cases where I wanted two potentially zero-sized elements of
the same type.
-Howard
More information about the Libstdc++
mailing list