我正在编译一些代码(我编写并使用微软 工具链编译)与铿锵。下面是一些一段代码,我不理解的错误:铿锵编译与模板函数的错误
#include <iostream>
#include <bitset>
template <int N>
auto foo(int index, std::bitset<N> & already_given)->int
{
return 0;
}
auto bar()->void
{
auto const n = 10;
auto baz = std::bitset<n>{};
for (auto i = 0; i < n; i++) {
std::cout << foo(i, baz)
<< std::endl;
}
}
给我的错误no matching function to call to 'foo'
。 这个错误的来源是什么?
微软的工具链或铛(使用MS编译器)?什么请求? –
@πάνταῥεῖ我编辑过。谢谢。 – mookid