https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67228
Bug ID: 67228 Summary: Template partial ordering failure ambiguous overload Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: barry.revzin at gmail dot com Target Milestone: --- In the following code: #include <tuple> template<int I> struct A {}; template<int I, typename... T> void f(A<I>, std::tuple<T *...>) {} // (1) template<typename... T> void f(A<0>, std::tuple<T *...>) {} // (2) int main() { f(A<0>{}, std::tuple<char*, int*, float*>{}); } (2) is more specialized and should be preferred, gcc 5.1 reports as ambiguous. If the two tuples were instead tuple<T...> instead of tuple<T*...>, (2) is correctly selected. clang accepts the code as is.