Bug in variadic function template specialization with MSVC?
Posted
by
Andrei Tita
on Stack Overflow
See other posts from Stack Overflow
or by Andrei Tita
Published on 2012-12-11T03:13:22Z
Indexed on
2012/12/11
5:04 UTC
Read the original article
Hit count: 170
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?
© Stack Overflow or respective owner