3 ms·
You could definitely use it for something useful; you can't store anything through it, but if an allocator supports allocations of size 0 with the same semantic
by dwattttt 3y ago
You could definitely use it for something useful; you can't store anything through it, but if an allocator supports allocations of size 0 with the same semantics of non-zero allocations, you get a "unique" ptr from the allocator dynamically.
Anywhere you need a dynamic list identifier this would suit (yes, a counter could do this too, this would be effectively a globally unique token)