I would like to have a method with a name same as some type in the
same namespace. Is it allowed by the C++ standard? I tried to figure
it out experimentally in gcc, but I get ambiguous results - for
example:
struct Point
{
int x;
int y;
};
struct Utils
{
Point Point()
{
return Point();
}
std::string Point()
{
return "";
}
};
The first method produces compile-time error, but the second method is
ok.