[llvm-bugs] [Bug 31580] New: deduction fails to extend explicitly-specified parameter pack in mixed specified/unspecified deduction

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jan 8 20:53:22 PST 2017


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: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170109/a0090ff0/attachment.html>


More information about the llvm-bugs mailing list