Open mmoult opened 2 months ago
@llvm/issue-subscribers-clang-frontend
Author: Matthew Moulton (mmoult)
CC @ChuanqiXu9
@llvm/issue-subscribers-clang-modules
Author: Matthew Moulton (mmoult)
Interestingly, I can't reproduce the same failure but got:
main.cpp:7:10: error: cannot decompose class type 'tuple<const Again , std::basic_string
>': its base classes '_Head_base<1UL, basic_string<char, char_traits >' have non-static data members 7 | auto [a, s] = again.next("something"); | ^, allocator >>' and '_Head_base<0UL, const Again
The build of clang I was running when I encountered the error is a couple weeks old. I didn't think that would make a difference, but I will try with top of tree to compare against your error.
Unless I am mistaken, the code should compile (and therefore, any error is a bug).
Here are the versions of the tools I used to reproduce the error I described originally:
Maybe it is related to the version of libstdc++. I see you're using 12 and I am using 10.
While this should be a bug and need to be fixed, I suggest you to use libc++ as workaround especially you can try std module that way.
files.tar.gz
I am unable to compile the attached files using CMake and Ninja. Here is the error(s) I get:
The code has no issues compiling if I change tuple -> pair, but that shouldn't be an issue. The same code compiles without any errors if I change again.cxx from module syntax to a header file (and change the CMakeFile and main import to correspond). This indicates to me there is a bug with the module compilation.