
2 Sep
2012
2 Sep
'12
10:12 a.m.
Currently, the allocate/deallocate functions et.al. in lockfree::detail::freelist_stack are private. This inhibits reusing this class for implementing other lock-free datastructures as it's not possible to allocate anything which has not a constructor taking 0, 1, or 2 arguments (those are supported explicitly by exposing overloads for freelist_stack::construct).
Would it be possible to make the mentioned functions 'protected' instead?
hm, i see your point. however freelists are not really part of the public API. iac, i'd somehow prefer to have an API like: template <class... Args> T * construct(Args&&... args) but for the time being, making these functions protected is ok to me. tim