I have a functor like this,
class PrintParentheses
{
public:
PrintParentheses(unsigned pairsCount)
{}
void operator ()() {}
};
Inside main()
I am using it like,
#include <iostream>
int main()
{
unsigned pairsCount = 0;
// Error: ‘PrintParentheses pairsCount()’ redeclared as different kind of symbol
PrintParentheses(pairsCount)();
PrintParentheses(5)(); // But this works
}
Error positions are marked inside the code itself. I have tested both GCC-4.6
and clang-3.1
. Both are giving the same error.