The void * is (should have been!) an implementation detail, and you're leaking it in the interface - that's not encapsulation.
For example if I want to store a __int128 on a 64-bit machine I'll have to deal with stuff like memory allocation and lifetime myself, when the data structure should do that.