[Dune] allocators... dingleton vs. instance

Christian Engwer christian.engwer at uni-muenster.de
Tue Oct 2 22:32:58 CEST 2012


Dear all,

I'm currently puzzled... and I couldn't find an answer in the
standard.

Assume the following:

AllocatorType<Foo> alloc1;
AllocatorType<Foo> alloc2;
Foo * f = alloc1.allocate(1);
alloc2.deallocate(f,1);

Is this supposed to work? In general I would assume not (although it
will work for many implementations). Is there somewhere a place that
states that the instance of an allocator is important and not only the
type?

Christian




More information about the Dune mailing list