I am using Intel C++ compiler 15.0 for Windows and there's a simple case that cannot compile.
#include class Foo { public: Foo() {} ~Foo() {} void test() const { std::cout << "Hello world!"<< std::endl; } }; template<typename T> void test(const T& t) { t.test(); } template<typename T, void F(const T&)=test<T> > void bar(const T& t) { F(t); } int main() { Foo foo; bar<Foo>(foo); return 0; }
It can successfully compile on other compilers including msvc, g++(both linux and windows), clang++(both linux and windows) and intel compiler on linux (with std=c++11 option). However on Windows, intel compiler (again with c++11 support) complains "error : no instance of function template "bar" matches the argument list", which does not make sense at all. Anyone could confirm this bug? Thanks in advance!