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
std::tuple compilation errors with implicit conversion constructors #29493
Comments
Darn it. |
Eric, can you give an assessment of the severity of this bug and how intrusive a fix might be? At this stage in the 3.9 process (rc3 was just tagged), I'm reluctant to take patches for anything but regressions from earlier release candidates. |
It's a regression from 3.8 and tuple tends to get a lot of usage, and breakage is often noticed by many users. That's why I would like to fix this before 3.9. The fix should hopefully be small. I'll give a more complete analysis tomorrow. |
So this may be a Clang bug. It seems that GCC accepts the reproducer just fine. I still would like to see this fixed in Clang before 3.9 but that might be a harder change to make. |
Attempted fix: https://reviews.llvm.org/D23978 The bug seems to be caused only when |
Richard, can you shed some light on why the proposed patch makes a difference here? |
After speaking with Richard about this, it sounds like we don't have a lot of good options to choose from here (there seems to be both issues with Clang and the C++ standard library). Taking Eric's D23978 is probably the least bad thing, doesn't make anything worse, and will fix this PR. So can we go ahead and land it? |
I have no reservations, and Richard's word is good enough for me in this case. :) We can change that on trunk later, if necessary. |
Update: I choose not to fix this bug in libc++ for 3.9.0 for two reasons:
Closing this bug as resolved fixed since it compiles with ToT clang. |
*** Bug llvm/llvm-bugzilla-archive#34895 has been marked as a duplicate of this bug. *** |
See https://reviews.llvm.org/D23999 for more information. |
mentioned in issue llvm/llvm-bugzilla-archive#30261 |
mentioned in issue llvm/llvm-bugzilla-archive#30301 |
mentioned in issue llvm/llvm-bugzilla-archive#34895 |
Extended Description
I encountered this error when trying to use libcxx from 3.9 release and trunk from around August 1st. The same code works with 3.8 release
Repro: compile following example with libc++:
clang -c -std=c++14 repro.cpp -stdlib=libc++
// repro.cpp
// this is minimized code from folly library
#include
template
struct Optional {
// implicit
Optional(const Value& newValue) {}
};
struct dynamic {
// implicit
template dynamic(T t);
};
Optional<std::tuple> get();
void test() { auto x = get(); }
The text was updated successfully, but these errors were encountered: