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
Ambiguous partial specialization on Clang 4.0 (trunk) #318
Comments
Looks like what I've already reported here: |
Thanks for the heads up. I guess we still don't know whether the problem is with the library of the compiler? |
You can see the commit for the change here: llvm-mirror/clang@89014aa |
I've pinged cfe-dev once more, hopefully they'll notice before clang 4 is released. |
Unfortunately, I'm tempted to think that it's Hana's fault. If so, that will require a significant change to the way dispatching is done across the library, and that'll be a breaking change. In any case, that'll have to wait for Boost 1.64. I'm still hoping that it's a Clang bug, but I'm not too hopeful. |
I'm also tempted to go with Clang on this one unfortunately. The mental
model that I use is that one partial template specialization is only more
specialized than another if it depends on less *types*, i.e. non type
template parameters are *mostly* ignored.
cppreference corroborates this mental model and also gives an example where
it doesn't fit, but I think this particular example doesn't apply in this
case.
http://en.cppreference.com/w/cpp/language/partial_specialization#Partial_ordering
That said, I wouldn't be too surprised to be proven wrong here.
|
Taking a closer look into it, the simplified mental model that I mentioned doesn't help here, because it is only good to address the rule that
The present case is more complex and involves non-deduced context in the partial specialization ordering of class templates, which is as hairy as it gets: http://stackoverflow.com/questions/31497357/partial-specialization-ordering-with-non-deduced-context I'm not too confident Clang is correct here anymore. |
This problem is complicated, indeed, as we're in underspecified area of the standard, but it looks like we're safe for now - the pattern in question is now part of clang tests: llvm-mirror/clang@ae0874f . I've verified that clang with this commit works again. |
That's great news, at least for now. Thanks a lot! I'll close this now. |
Specializations of algorithms for
hana::tuple
fail withon
The text was updated successfully, but these errors were encountered: