Before I mention the bug, I want to point out that this in no way prevents compilation of the auto-generated code. However, it is my opinion that just because the code compiles doesn't make this a feature request.
1) Create a header and CPP file with the same name. Example: foo.h and foo.cpp
2) In foo.cpp, paste the following code:
namespace bar
{
void foo::DoSomething()
{
}
}
3) In foo.h, paste the following code:
namespace bar
{
class foo
{
};
}
4) In foo.cpp, hover your mouse cursor over the function "DoSomething()" and click "Create Declaration"
5) You should see the following results in the foo.h file:
namespace bar
{
class foo
{
void foo::DoSomething();
};
}
The red part above shouldn't be there. Note that this does not happen if the namespace doesn't exist.
This is not a high-priority bug obviously, but it's just one of those minor annoyances that prevents me from using the feature extensively.
EDIT:
I'm using build 1555, Visual Studio 2005