Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

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

Stephan_Dollberg
Beginner
207 Views

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:

[cpp]

#include <boost/asio.hpp>
#include <tbb/flow_graph.h>


int main() {
}

[/cpp]

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

0 Kudos
1 Reply
Christophe_H_Intel
207 Views

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.

Regards,
Chris

0 Kudos
Reply