On 2014-09-29 22:15:33 +0000, Andrei Alexandrescu said:

On 9/29/14, 11:44 AM, Shammah Chancellor wrote:
I don't like the idea of having to pass in template parameters
everywhere -- even for allocators.

I agree.

Is there some way we could have
"allocator contexts"?

E.G.

with( auto allocator = ReferencedCounted() )

Don't confuse memory allocation with memory management. There's no such a thing as a "reference counted allocator".

Andrei

Sure, but combining the two could be very useful -- as we have noticed with a allocators that work off of a garbage collector. With regards to reference counting, you could implement one that automatically wraps the type in an RC struct and proxies them. Being able to redefined aliases during different sections of compilation would be required though.

Reply via email to