http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53723

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler at
                   |                            |googlemail dot com

--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-06-20 12:26:27 UTC ---
I disaqree. IMO the example shall be ill-formed and it does not match the
referenced stackoverflow example. The specialization

template<>
int foo<int>();

does not match the primary template

template<typename T, typename... Args>
int foo(T, Args...);

because it omits the first function argument depending on template parameter T.

The fixed version would be written as:

template<typename T, typename... Args>
int foo(T, Args...);

template<>
int foo<int>(int) {
  return 0;
}

int main() { }

and this example is accepted by gcc 4.8 HEAD. Unless gcc 4.7.1 does need to be
fixed, this seems an invalid bug report to me.

Reply via email to