Closed PengBo410 closed 1 year ago
Hi @PengBo410 and thanks for the bug report!
Before I can test it, I need two things:
I provided detailed information
Looks like a compiler bug that was fixed, works from gcc 9.3. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93442
Thanks @guilhermelawless! Since this is a compiler bug, and not a bug in the thread pool library itself, I am closing this issue.
Describe the bug Hello, first of all, thank you for your project. Both its performance and detailed annotations have greatly benefited me. However, during a simple test, I encountered a compilation error. I am not sure if this error could be helpful for the improvement of the project (please ignore it if it is due to my misunderstanding). Thank you!
Minimal working example
CMakeLists.txt cmake_minimum_required(VERSION 3.0.0) project(2023-10-31 VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(OpenMP REQUIRED) if(OPENMP_FOUND) message("[COMPLETE]:OPENMP FOUND") message("OpenMP_C_LIBRARIES = ${OpenMP_C_LIBRARIES}") else(OPENMP_FOUND) message("[ERROR]:OPENMP NOT FOUND") endif(OPENMP_FOUND)
add_executable(Test test.cpp) target_compile_options(Test PRIVATE -O3) target_link_libraries(Test pthread OpenMP::OpenMP_CXX)
Information
Behavior
When I set the label to 0, it passed. However, when the label is set to 1, I encountered a compilation error:
error: conversion from ‘std::conditional_t<true, void, std::vector<void, std::allocator > >’ {aka ‘void’} to non-scalar type ‘const std::vector’ requested.
This error points to the line: