pagmo2 icon indicating copy to clipboard operation
pagmo2 copied to clipboard

[BUG]Compile error with Clang 18.0.0

Open aulwes opened this issue 9 months ago • 0 comments

Hi, was trying to compile but getting error when compiling island.cpp using Clang 18. I get 2 errors.

First error:

/usr/include/tbb/internal/_concurrent_queue_impl.h:163:31: error: overload resolution selected deleted operator '=' 163 | static_cast<T>(dst) = tbb::internal::move( from ); | ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/tbb/internal/_concurrent_queue_impl.h:281:13: note: in instantiation of member function 'tbb::strict_ppl::internal::micro_queue<std::unique_ptrpagmo::detail::task_queue>::assign_and_destroy_item' requested here 281 | assign_and_destroy_item( dst, *p, index ); | ^ /usr/include/tbb/internal/_concurrent_queue_impl.h:552:29: note: in instantiation of member function 'tbb::strict_ppl::internal::micro_queue<std::unique_ptrpagmo::detail::task_queue>::pop' requested here 552 | } while( !r.choose( k ).pop( dst, k, *this ) ); | ^ /usr/include/tbb/concurrent_queue.h:153:22: note: in instantiation of member function 'tbb::strict_ppl::internal::concurrent_queue_base_v3<std::unique_ptrpagmo::detail::task_queue>::internal_try_pop' requested here 153 | return this->internal_try_pop( &result ); | ^ pagmo2/src/island.cpp:260:15: note: in instantiation of member function 'tbb::strict_ppl::concurrent_queue<std::unique_ptrpagmo::detail::task_queue>::try_pop' requested here 260 | if (!tqc->try_pop(retval)) {

Second error:

/usr/include/tbb/concurrent_queue.h:56:24: error: call to deleted constructor of 'std::unique_ptrpagmo::detail::task_queue' 56 | new (location) T(static_cast<const T>(src)); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/tbb/concurrent_queue.h:133:39: note: in instantiation of member function 'tbb::strict_ppl::concurrent_queue<std::unique_ptrpagmo::detail::task_queue>::copy_construct_item' requested here 133 | this->internal_push( &source, copy_construct_item ); | ^ pagmo2/src/island.cpp:292:29: note: in instantiation of member function 'tbb::strict_ppl::concurrent_queue<std::unique_ptrpagmo::detail::task_queue>::push' requested here 292 | get_task_queue_cache()->push(std::move(queue)); | ^

aulwes avatar Mar 27 '25 22:03 aulwes