Boost logo

Boost Users :

Subject: [Boost-users] [lockfree] stack needs undocumented trivial assignment
From: Norbert Wenzel (norbert.wenzel.lists_at_[hidden])
Date: 2014-09-21 06:50:17


I'm trying to replace some computation intensive loops in legacy code
with parallel loops and thus tried to store the results in a lockfree
stack. I've chosen stack over queue because of the requirements stated
in the documentation, where stack only needs a copy ctor and queue
additionally needs trivial assignment and trivial dtor.

My result struct I want to store in the stack is *not* trivially assignable.

When trying to compile the code containing my lockfree::stack the static
assertion in line 75 of stack.hpp because it requires trivial assignment
and trivial dtor.

My question would be if this is simply an error in the documentation ie.
if the requirements section should be copied over from lockfree::queue
or if these static assertions should only be checked in some special
case, eg. where the stack is of fixed size?

thanks,
Norbert


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net