auto test_rel = p_to_int.release();
Checking memory leaks with leaks -atExit -- ./main, it turns out that 16 bytes have been leaked, and I don't see why this is possible. I mean, as I'm using smart pointers, I shouldn't see them. Any help is highly appreciated.
1. A heap has overhead. Most heap implementations use a boundary tag method.
[Knuth, Vol. 1, pg 440-442]
2. Heap implementations guarantee that a block of memory allocated from the heap is optimally aligned.
With 64 bit architectures, 16 byte multiples satisfy both requirements.
Knuth - that's a blast from the past! My Vol 1 copy is dated 1973! Good books, but IMO a pity he had to invent MIX and didn't use an established language. I understand his reasons, but having to learn another language (low level at that!) at the same time as trying to learn the rest didn't help.