On Mar 14, 2016; 8:06am, Phil Bouchard wrote:
Indeed, I need to add a way to pass a1 in the constructor.
Yes, but in addition to that, the concern is:
Yes because I use: node >::operator
new ()
Given:
new block >(/* a1 */)
I still don't see how the 'new block(...)' is going to use 'a1' for
the block allocation.
I can see how it could not use '::operator new(std::size_t)' if you have
overloaded operator new for block, but at that point, you still
wouldn't know 'a1' (though you do know the type 'A').
Just using A{}.allocate(...) is not sufficient, especially if A is a
stateful allocator. i.e. A might not even be default-constructible: the only
way to construct an A instance might require providing that state (a1) (or
copy-construct given an existing A instance).
Glen
--
View this message in context: http://boost.2283326.n4.nabble.com/Root-Pointer-Benchmark-tp4684533p4684560....
Sent from the Boost - Dev mailing list archive at Nabble.com.