Open Twon opened 7 months ago
This certainly doesn't work with fancy pointers:
https://github.com/jbcoe/value_types/blob/a7fa0db8f4710853f9c4469c6749102a3906e7b1/experimental/polymorphic_inline_vtable.h#L77
allocate
and deallocate
need to work with the allocator's pointer type, but construct
and destroy
work with raw pointers. You need to use std::to_address
and std::pointer_traits<P>::pointer_to
to convert between them.
Note swap methods require the 2 phase swap to support fancy pointers
As @Quuxplusone points out on this PR there should be further testing added for testing to ensure types correctly make use of
allocator_traits<A>::pointer
.Adding Boost as a dependency is a little heavy weight as we require a mechanism for supporting the dependency (perhaps Conan?). However, we could emulate this with a custom
offset_ptr
implementation for the tests.