-
Notifications
You must be signed in to change notification settings - Fork 42
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
🐛 cppyy appears to add an extra void
template parameter to the end of std::tuple_cat
template params
#261
Comments
This seems to be a regression that was introduced in the update to LLVM16. It works fine in current cppyy. There are a few changes in the update to the iteration over template parameters, so that offers a clear lead. There's also a current test failing (the use of global lambda`s) that I believe to be related. |
@wlav, where's the template parameter iteration code? Maybe I can take a look. |
Look for the word "iterator" in this patch file: https://github.com/wlav/cppyy-backend/commit/c5d853105026358840906145a9375af1ca238c66.patch I copied these over from upstream, but eg. this:
have changed types and thus maybe changed behavior. |
Thanks for that info. I created a docker image to make sure that I was using the current released version of cppyy, but it still fails: # Use the latest Ubuntu LTS as the base image
FROM ubuntu:22.04
# Install required packages and development tools
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3 \
python3-pip \
vim
# Install necessary Python packages
RUN python3 -m pip install --upgrade pip pytest cppyy
# Set the working directory
WORKDIR /opt
RUN cat <<EOF > test.py
import cppyy
def test_tuple_cat():
cppyy.gbl.std.tuple_cat()
EOF
# Run the test
CMD ["pytest", "test.py"] Build and run the image (make sure the Dockerfile is in its own directory): docker build -t test_cppyy_empty_tuple_cat .
docker run -it test_cppyy_empty_tuple_cat You should see the following output:
|
I'll go back to that in a bit (digging into #262 atm.). And yes, I was a bit lazy in that I have two differences from the actual release: master just prior to the LLVM16 changes and Mac rather than Linux. So it could be working on Mac b/c of a different set of standard headers as opposed to the LLVM16 changes. |
Ok, no worries! I'll dig into the template parameter iteration code. 👍 |
That makes sense...maybe you're compiling with clang and libc++ on mac? |
Yes, and |
Interestingly, yes, I do get the broken type name of Still invalid code, of course, so still digging where that |
I ran into a strange problem trying to use
std::tuple_cat(...)
. It looks like an extravoid
template type parameter is being added to the end of the list of template parameters. I minimized the problem down to the following C++ code tested and working in clang 13:https://godbolt.org/z/54nhqK55T
The
cppyy
version fails, however:The error message below shows the extra
void
template type parameter:This seems to fail for any usage of
std::tuple_cat
...the exact args do not appear to matter.The text was updated successfully, but these errors were encountered: