Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
2421 Discussions

'tbb::filter': no appropriate default constructor available

uri_p_
Beginner
158 Views

Hi,
Using the latest version of TBB (2018 update 2), when compiled using cpp17 I'm getting the compile error

tbb::filter': no appropriate default constructor available. My class derives from filter, 
 

class CMyClass : public CMyOtherClass, public tbb::filter

And using it on another class

class cDifferentClass

{

CMyClass* pInput;

int process()

{

tbb::pipeline pipeline; // create pipeline

pipeline.add_filter(*pInput);
}

}

Thanks!

0 Kudos
1 Reply
Aleksei_F_Intel
Employee
158 Views

Hi,

According to documentation class tbb::filter does not have default constructor, but has an explicit user-defined one. Therefore, this explicit constructor must be called from derived class during its construction.

Regards, Aleksei

Reply