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

tbb_stddef.h:312:10: error: void tbb::internal::no_assign::operator= is private

manish_m_
Beginner
1,001 Views

Hello !!

TBB gives this error while compiling the code. Any suggestions?

tbb_stddef.h:312:10: error: ‘void tbb::internal::no_assign::operator=(const tbb::internal::no_assign&)’ is private
     void operator=( const no_assign& );
          ^
compilation terminated due to -Wfatal-errors.

on gcc version 4.9.2 (Debian 4.9.2-10)

 

thanks

0 Kudos
4 Replies
Alexandr_K_Intel1
1,001 Views

no_assign is a special type that was created to mark types that should not be assigned. What is the code that leads to the error?

0 Kudos
manish_m_
Beginner
1,001 Views

I used older version of tbb (v4.2) and it fixed my issue.

 

However, finding which part of my template-based code led to this error might take too much time. I will report it if i am able to reproduce it on smaller piece of code.
 

0 Kudos
Alexei_K_Intel
Employee
1,001 Views

Could you share the compiler output log (not to waste time for a small reproducer)? Perhaps, it can give us some hint what can cause the issue. If the output is huge try to cut only the first error. If you are worried about confidential information, replace your type, class and function names, with something, e.g. "xxxxx". 

0 Kudos
Satish_K_1
Beginner
1,001 Views

I think I also have a similar error. I am trying to compile CGAL library with the latest intel tbb stable update and I get this compilation error:

In file included from /opt/intel/tbb/include/tbb/concurrent_hash_map.h:24:0,
                 from /usr/include/CGAL/Profile_counter.h:72,
                 from /usr/include/CGAL/Uncertain.h:26,
                 from /usr/include/CGAL/assertions.h:344,
                 from /usr/include/CGAL/basic.h:42,
                 from /usr/include/CGAL/Cartesian/Cartesian_base.h:28,
                 from /usr/include/CGAL/Simple_cartesian.h:28,
                 from /usr/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:28,
                 from /home/satish/cgal/demo/Mesh_3/Polyhedron_type.h:6,
                 from /home/satish/cgal/demo/Mesh_3/C3t3_type.h:4,
                 from /home/satish/cgal/demo/Mesh_3/Scene_c3t3_item.h:5,
                 from /home/satish/cgal/demo/Mesh_3/Scene_c3t3_item.cpp:3:
/opt/intel/tbb/include/tbb/tbb_stddef.h: In instantiation of ‘typename __gnu_cxx::__enable_if<(! std::__is_scalar<_Tp>::__value), void>::__type std::__fill_a(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = tbb::recursive_mutex*; _Tp = tbb::recursive_mutex; typename __gnu_cxx::__enable_if<(! std::__is_scalar<_Tp>::__value), void>::__type = void]’:
/usr/include/c++/4.9/bits/stl_algobase.h:740:14:   required from ‘void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = tbb::recursive_mutex*; _Tp = tbb::recursive_mutex]’
/usr/include/c++/4.9/bits/vector.tcc:470:16:   required from ‘void std::vector<_Tp, _Alloc>::_M_fill_insert(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = tbb::recursive_mutex; _Alloc = std::allocator<tbb::recursive_mutex>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<tbb::recursive_mutex*, std::vector<tbb::recursive_mutex> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = tbb::recursive_mutex*; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = tbb::recursive_mutex]’
/usr/include/c++/4.9/bits/stl_vector.h:1073:44:   required from ‘void std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = tbb::recursive_mutex; _Alloc = std::allocator<tbb::recursive_mutex>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<tbb::recursive_mutex*, std::vector<tbb::recursive_mutex> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = tbb::recursive_mutex*; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = tbb::recursive_mutex]’
/usr/include/c++/4.9/bits/stl_vector.h:716:42:   required from ‘void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type, std::vector<_Tp, _Alloc>::value_type) [with _Tp = tbb::recursive_mutex; _Alloc = std::allocator<tbb::recursive_mutex>; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = tbb::recursive_mutex]’
/usr/include/CGAL/Spatial_lock_grid_3.h:629:28:   required from here
/opt/intel/tbb/include/tbb/tbb_stddef.h:318:10: error: ‘void tbb::internal::no_assign::operator=(const tbb::internal::no_assign&)’ is private
     void operator=( const no_assign& );
          ^
/opt/intel/tbb/include/tbb/tbb_stddef.h:327:7: error: within this context
 class no_copy: no_assign {
       ^
/opt/intel/tbb/include/tbb/tbb_stddef.h:340:7: note: synthesized method ‘tbb::internal::no_copy& tbb::internal::no_copy::operator=(const tbb::internal::no_copy&)’ first required here 
 class mutex_copy_deprecated_and_disabled : no_copy {};
       ^
In file included from /opt/intel/tbb/include/tbb/tbb.h:72:0,
                 from /usr/include/CGAL/Concurrent_compact_container.h:37,
                 from /usr/include/CGAL/Triangulation_data_structure_3.h:44,
                 from /usr/include/CGAL/Triangulation_3.h:43,
                 from /usr/include/CGAL/Regular_triangulation_3.h:34,
                 from /usr/include/CGAL/Mesh_triangulation_3.h:30,
                 from /home/satish/cgal/demo/Mesh_3/C3t3_type.h:8,
                 from /home/satish/cgal/demo/Mesh_3/Scene_c3t3_item.h:5,
                 from /home/satish/cgal/demo/Mesh_3/Scene_c3t3_item.cpp:3:
/opt/intel/tbb/include/tbb/recursive_mutex.h:39:7: note: synthesized method ‘tbb::internal::mutex_copy_deprecated_and_disabled& tbb::internal::mutex_copy_deprecated_and_disabled::operator=(const tbb::internal::mutex_copy_deprecated_and_disabled&)’ first required here 
 class recursive_mutex : internal::mutex_copy_deprecated_and_disabled {
       ^
In file included from /usr/include/c++/4.9/algorithm:61:0,
                 from /usr/include/CGAL/config.h:289,
                 from /usr/include/CGAL/basic.h:29,
                 from /usr/include/CGAL/Cartesian/Cartesian_base.h:28,
                 from /usr/include/CGAL/Simple_cartesian.h:28,
                 from /usr/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:28,
                 from /home/satish/cgal/demo/Mesh_3/Polyhedron_type.h:6,
                 from /home/satish/cgal/demo/Mesh_3/C3t3_type.h:4,
                 from /home/satish/cgal/demo/Mesh_3/Scene_c3t3_item.h:5,
                 from /home/satish/cgal/demo/Mesh_3/Scene_c3t3_item.cpp:3:
/usr/include/c++/4.9/bits/stl_algobase.h:693:11: note: synthesized method ‘tbb::recursive_mutex& tbb::recursive_mutex::operator=(const tbb::recursive_mutex&)’ first required here 
  *__first = __value;
           ^

0 Kudos
Reply