Re: std::unique_ptr and class allocator

2019-11-20 Thread Walt Karas
The assembler shows that initialization is just immediate stores (of zero in this case). So memcpy of the proto object should load in the same constant values. On Wed, Nov 20, 2019 at 12:49 PM Alan Carroll wrote: > That doesn't seem to account for the proto object used in the class > allocator.

Re: std::unique_ptr and class allocator

2019-11-20 Thread Alan Carroll
That doesn't seem to account for the proto object used in the class allocator. I think you might be OK with std::unique_ptr anyway, because it default constructs to a nullptr. On Wed, Nov 20, 2019 at 12:03 PM Walt Karas wrote: > Does this, https://godbolt.org/z/4muzR3 , satisfy everyone that ins

std::unique_ptr and class allocator

2019-11-20 Thread Walt Karas
Does this, https://godbolt.org/z/4muzR3 , satisfy everyone that instances of std::unique_ptr can be member variables of classes with class allocators (as long as ~unique_ptr() is explicitly called in the destroy function)? Kvetch now or forever hold your kvetch.