cameron314 / concurrentqueue

A fast multi-producer, multi-consumer lock-free concurrent queue for C++11
Other
9.52k stars 1.66k forks source link

error C2129: static function 'bool moodycamel::details::likely(bool)' declared but not defined #354

Closed fmvin closed 10 months ago

fmvin commented 10 months ago

I'm getting this error from master on Windows Server 2019 x64 and msvc CL Version 19.37.32822 (Visual Studio 2022 v. 17.7.0)

If manually to remove static from the likely function then the code successefully has been built.

cameron314 commented 10 months ago

What header(s) did you include?

cameron314 commented 10 months ago

The only declaration of likely is also a definition, so this error should be impossible...

fmvin commented 10 months ago

What header(s) did you include?

I do #include "blockingconcurrentqueue.h" in MyModule.ixx

cameron314 commented 10 months ago

Sounds like you're using C++ modules? Can you share an example?

fmvin commented 10 months ago

I'm created a one more simple test project from scratch with blockingconcurrentqueue to present here and suddenly for me the issue is not reproduced. I'm strongly apologize for disturbance and propose to close this issue. Somehow my issue is related to dependency of imgui_bundle in my real project which I should investigate independently fromconcurrentqueue.

cameron314 commented 10 months ago

That's good news, thanks for following up. No need to apologize! Reopen as needed.