https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69260

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-01-13
            Summary|C++14 template              |C++14 template
                   |instantiation problem in    |instantiation problem in
                   |GCC (up to 5.3)             |GCC
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
N.B. if you put "up to 5.3" in the summary it make it seem like it works in
6.0, but it doesn't.

Reduced:

struct function {
  template<typename F>
    function(F);
};

template <typename T1, typename T2>
auto sum(T1 x, T2 y)
{
    return x + y;
}

template <typename T1, typename T2, typename... Targ>
auto sum(T1 x, T2 y, Targ... args)
{
    return sum(x + y, args...);
}

int main()
{
    //(void)sum<int, int, int>;
    function f = sum<int, int, int>;
}

Reply via email to