Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang complains about parameter used in std::atomic_flag constructor #315

Open
hotblack944 opened this issue Mar 6, 2024 · 0 comments
Open

Comments

@hotblack944
Copy link

clang complains about this line:

https://github.com/mfontanini/cppkafka/blame/9c5ea0e332486961e612deacc6e3f0c1874c688d/include/cppkafka/utils/buffered_producer.h#L664

C:\vcpkg\installed\x86-windows-utc-default\include\cppkafka/utils/buffered_producer.h(664,39): error G7095654A: no matching constructor for initialization of 'std::atomic_flag' [clang-diagnostic-error]
mutable std::atomic_flag flag_{0};
^~~
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\atomic:2829:20: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const atomic_flag' for 1st argument
_EXPORT_STD struct atomic_flag { // flag with test-and-set semantics
^
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\atomic:2856:15: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
constexpr atomic_flag() noexcept = default;
^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant