- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello ,
I have built a library(say MYLIB) in which i have used tbb to paralleize. This MYLIB i am trying to use for one application i am building and when i try to build the application getting following erros :
/usr/include/tbb/internal/_concurrent_unordered_impl.h:146:85: error: expected a type, got ‘397’
/usr/include/tbb/internal/_concurrent_unordered_impl.h:146:85: error: template argument 2 is invalid
/usr/include/tbb/internal/_concurrent_unordered_impl.h:146:90: error: ‘bool tbb::interface5::internal::operator!=(const int&, const int&)’ must have an argument of class or enumerated type
friend bool operator!=( const solist_iterator<M,T>& i, const solist_iterator<M,U>& j );
can anyone please help , i am new to tbb .
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Ajay,
When I have seen this kind of message it is usually because a preprocessor symbol has collided with a typename or variable name. Do you have M, T or U predefined somewhere?
Best Regards,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mr. Chris
Many Thanks for your kind reply .
Yeah I do had a macro M declared.. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Always use a distinctive prefix, or otherwise carefully #undef after local use, and only use macros for things that cannot be done in the underlying language itself (C++ already has provisions for constants and inline function templates etc.).
Unfortunately that simplistic preprocessor is all we have for light-weight code generation, so you have to be quite careful how you use it. People already get hysterical about macros even when you use them responsibly (in my view), so it's best not to give them any reasons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot Mr. Raf and Christopher for your prompt suggestions ,
that solved the problem for me :)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page