3

Using the Visual Studio Nov 2012 CTP, which supports variadic templates (among other things). The following code:

template<int, typename... Args>
void myfunc(Args... args)
{
}

template<>
void myfunc<1, float>(float)
{
}

produces the following errors:

error C2785: 'void myfunc(Args...)' and 'void myfunc(float)' have different return types
error C2912: explicit specialization 'void myfunc(float)' is not a specialization of a function template

(yeah, the first one is pretty funny)

So my questions are:

1) Am I writing legal C++11 here?

2) If yes, is there a way to find out if this is a known bug in MSVC before submitting it?

Andrei Tita
  • 1,226
  • 10
  • 13

1 Answers1

2
  1. This is perfectly legitimate code; both gcc-4.7.2 and clang 3.0 accept it.

  2. Try searching Microsoft Connect.

ecatmur
  • 152,476
  • 27
  • 293
  • 366