"Bug" in flow-graph together with termios.h

"Bug" in flow-graph together with termios.h

I wanted to report a "bug" which might appear when using the flow-graph.

In flow_graph.h(and probably all the other impl files) all the fake variadic-templates are being written using arguments B0-BN. The problem is that the old UNIX file termios.h defines B0 as 0. Now, when simply compiling you get a lot of compile errors because the B0 argument in the templates was replaced with 0.

I recognized this when using boost::asio together with the flow-graph.

Basic example:

#include <boost/asio.hpp>
#include <tbb/flow_graph.h>
int main() {

I think that this should be fixed, as using something like boost::asio together with the flow-graph might not be a rare usecase.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello, Stephan,

Thanks for the report.  The next update to TBB will include a renaming of the template parameters both in flow_graph.h and in compat/tuple to reduce the liklihood of such collisions.


Leave a Comment

Please sign in to add a comment. Not a member? Join today