M
marco_segurini
Hi,
I like to know if this code is legal:
namespace
{
void unnamed_ns(){}
}
class test
{
friend void unnamed_ns();
};
int main()
{
unnamed_ns();
}
because the c++ compiler of vs2003 return me this error
error C2668: 'unnamed_ns' : ambiguous call to overloaded function
could be 'void unnamed_ns(void)'
or 'void `anonymous-namespace'::unnamed_ns(void)'
while all is fine for Comeau Online
Thanks a lot.
Marco.
I like to know if this code is legal:
namespace
{
void unnamed_ns(){}
}
class test
{
friend void unnamed_ns();
};
int main()
{
unnamed_ns();
}
because the c++ compiler of vs2003 return me this error
error C2668: 'unnamed_ns' : ambiguous call to overloaded function
could be 'void unnamed_ns(void)'
or 'void `anonymous-namespace'::unnamed_ns(void)'
while all is fine for Comeau Online
Thanks a lot.
Marco.