
22 Oct
2013
22 Oct
'13
6:50 p.m.
[Marcel Raad]
slot<F>(const F &f) slot<BindArgs...>(const BindArgs &...args) MSVC12 always chooses the variadic constructor
Wow, that's a bug. I've filed DevDiv#807268 "meow(const T&) should be considered to be more specialized than meow(const Args&...)" in our internal database with a reduced repro: C:\Temp>type meow.cpp #include <stdio.h> template <typename T> void meow(const T&) { puts("meow(const T&), GOOD"); } template <typename... Args> void meow(const Args&...) { puts("meow(const Args&...), BAD"); } int main() { meow(1729); } C:\Temp>cl /EHsc /nologo /W4 meow.cpp meow.cpp C:\Temp>meow meow(const Args&...), BAD Thanks, STL