我有一个看起来像这样的结构:
struct foo_t
{
template <std::size_t x, std::size_t y>
std::size_t operator()() const
{ return /*something dealing with x and y*/; }
};
该定义似乎编译得很好,但是我该如何称呼它呢?我似乎无法通过编译器:
foo_t foo;
foo<3, 3>(); // ERROR: Compiler seems to think I'm asking for "foo < 3 ..."