Closed akrzemi1 closed 6 years ago
This looks like a compiler bug, because an exact match is availablein the overload set, so I don't get why is ambiguous. Also, in C++14 mode code compiles fine.
I'll try to commit soon a patch to SFINAE out the string view overload, which is not a bad idea in general to avoid ambiguities.
I got the following background information on isocpp.org: https://groups.google.com/a/isocpp.org/d/topic/std-discussion/B1MHPRMqfFA/discussion
Thanks, for the DR link. So it's time to patch the implementation...
One more link that might be useful: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82579
GCC developers say that the new rules for template-tempate argument matching have a regression in the Standard that they are forced to implement the regression too, but there is a flag in GCC to disable the feature: -fno-new-ttp-matching
.
I tested locally with Mingw-w64 GCC 7.1. Let me know if there are remaining issues. Thanks for all!
I only found it in Wandbox. I will not be able to test it until it is released. The source looks fine to me.
The following program does not compile in GCC 7, in C++17 mode:
This might be a bug in GCC (it works in clang), but I am not sure. It boils to the following situation, which does not compile in GCC 7 (C++17):