https://llvm.org/bugs/show_bug.cgi?id=31580

            Bug ID: 31580
           Summary: deduction fails to extend explicitly-specified
                    parameter pack in mixed specified/unspecified
                    deduction
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Testcase:

  template<typename T, typename U> struct pair {};
  template<typename ...T, typename ...U> void f(pair<T, U>...); //
expected-error 0-2{{C++11}}
  void g(pair<int, char> a, pair<long, double> b) { f<int>(a, b); }

  template<int T, typename U> struct pairI {};
  template<int ...T, typename ...U> void fI(pairI<T, U>...); // expected-error
0-2{{C++11}}
  void g(pairI<0, char> a, pairI<1, double> b) { fI<0>(a, b); }

  template<typename T, typename U> struct pair2 {};
  template<template<typename,typename> class T, typename U> struct pairT {};
  template<template<typename,typename> class ...T, typename ...U> void
fT(pairT<T, U>...); // expected-error 0-2{{C++11}}
  void g(pairT<pair, char> a, pairT<pair2, double> b) { fT<pair>(a, b); }

Deduction fails in each case because we're unable to extend an unexpanded
partially-substituted parameter pack during template argument deduction.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to