-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
pydrake doc: gcc and clang disagree on need for lambda capture for constexpr
vars
#9600
Comments
Possibly related; however, I am getting this with EDIT: EDIT 2: That was circumstantial; had to deal with storage duration inference via upstream |
Maybe related: https://reviews.llvm.org/D33526 |
Seems that this patch was incorporated before
The branch in the Git repo So perhaps it's still an issue? |
Huh, seems like you can also change |
Very Java-like (except that would be |
Filed bug with |
From chat with @m-chaturvedi, seems that GCC 7.3.0 on Bionic decided to further deviate from
Will submit a chaser PR to use the second workaround :( |
I may have spoken too soon? I am unable to reproduce this with simple reproduction: Even trying to re-simulate the nested structs does not yield an issue: Not sure what the discrepancy is... @m-chaturvedi @jamiesnape Might I ask if y'all have an inkling? |
Mmanu found that this error can be reproduced if we use a generic / templated lambda, such as using Seems related to old aforementioned bug with LLVM, but now specific to GCC: https://bugs.llvm.org/show_bug.cgi?id=31815 |
Posted a GCC bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87559 |
From here: #9571 (comment)
Workarounds:
constexpr auto& doc
, rather thanauto& doc
[&]
in lambda capturecopts = ["-Wno-unused-lambda-capture"]
forpybind_py_library
Action items:
doc_lambda
)\cc @m-chaturvedi @jamiesnape
The text was updated successfully, but these errors were encountered: