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

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

Portrait de Stephan Dollberg

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 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

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.


Connectez-vous pour laisser un commentaire.