-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
core: fix macOS warning #413
Conversation
core/thread_pool_test.cpp
Outdated
// an implicit capture. However, this makes clang sad, so we have to | ||
// ignore its warning. | ||
#if defined(__clang__) | ||
#pragma clang diagnostic ignored "-Wunused-lambda-capture" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not doing that at the CMake level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure whether to apply this everywhere. I was hoping it only ever comes up here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you want :).
As a principle, I don't like macros in the code, and I prefer to keep my code independent from the build system (as much as possible). But I'm fine with this as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convinced 😄
fadcfb4
to
eb69614
Compare
Note that you've changed it only for AppleClang, now (not sure if it is necessary for Clang, too). |
You're right:
|
eb69614
to
72f8b1d
Compare
Clang and MSVC are not agreeing on this issue. MSVC complains about an implicit capture while Clang says it's an unused lambda capture. For now, we'll ignore the Clang warning.
72f8b1d
to
0d81799
Compare
core: fix macOS warning
Clang and MSVC are not agreeing on this issue, so we'll ignore
the clang warning for now.