]> OCCT Git - occt.git/commit
??????: Fix error of TKernal and TMath compilation. CR32887
authorddzama <ddzama@opencascade.com>
Mon, 29 Aug 2022 08:05:26 +0000 (11:05 +0300)
committerddzama <ddzama@opencascade.com>
Mon, 29 Aug 2022 10:45:15 +0000 (13:45 +0300)
commitc0418c96db1b845ee98461a63e7ede38c104d172
treed8fb3c77b30a1558fbf2b59920160e50242cbbb4
parent83cc25e05b08451a1fc035c06323f85befe24c84
??????: Fix error of TKernal and TMath compilation.

Error occured if using c++20 standard with new oneTBB 2021.5.0.
The error was:
   Error C2672 'tbb::v1::parallel_for_each': no matching overloaded function found TKernel
   could be 'void tbb::detail::d2::parallel_for_each(Iterator,Iterator,const Body &)' TKernel
   'tbb::detail::d2::parallel_for_each': the associated constraints are not satisfied TKernel
Note, that if we use c++14 or c++17, all ok, error does not occures.
To solve the problem, i have to modify `UniversalIterator` class:
`value_type` instead `UniversalIterator` converted to `IteratorInterface*`
`pointer` = `reference` = `value_type`
Method `DownCast` moved into `FunctorInterface` abstract class.
argument `UniversalIterator& item` of the unary fuctions converted to `IteratorInterface*`.
The proposed solution solved the compilation error.
src/OSD/OSD_Parallel.hxx
src/OSD/OSD_Parallel_Threads.cxx