- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to build a TBB pipeline with the new syntax as described in the tutorial, using tbb:filter_t as below f1( tbb::filter::serial_in_order, MyInputFunc(fd) );
FILE *fd
tbb::filter_t f1( tbb::filter::serial_in_order,
MyInputFunc(fd) );
but it keeps throwing a compile error:
tbb40_20120201oss/include/tbb/pipeline.h:416: error: passing const MyInputFunc as this argument of TextSlice* MyInputFunc::operator()(tbb::interface6::flow_control&) discards qualifiers
It works fine with the inheritance based old filter API.
tbb::filter_tLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Never mind looking at pipeline.h, I realized it requires const functions. Changing the operator() to const, fixed it.
I would recommend updating the tutorial and documentation to please reflect that you expect consts.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page