Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Bug w/ create declaration in namespace
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cbranch
Senior Member

USA
30 Posts

Posted - Jul 29 2008 :  1:02:25 PM  Show Profile  Reply with Quote
Versions: This bug has existed for a long time, easily over a year and up to the current beta 1646.
Environment: VS2003

Basically create declaration for a member function in a namespace erroneously adds the class specification to the header. This code will compile in VS2003 but will not compile in other more compliant compilers (GCC,maybe VS2005/8).

Replication:

//in header
namespace Foo
{
class Bar
{
};
}

//in source
namespace Foo
{
Bar::Bar()
{
}
}

Now create declaration for Bar::Bar()
and you get:

namespace Foo
{
class Bar
{

Bar::Bar();
};
}

When it should be:
namespace Foo
{
class Bar
{
Bar();
};
}

The extra line break isn't that much of issue, but clearly Bar::Bar() is wrong.
When you remove the namespace all together it works properly. I'm guess when iterating over the list of ns/class specifiers for the function it isn't removing all of them (its leaving the last still attached).

Colin Branch

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Jul 29 2008 :  4:07:31 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=6593
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jun 03 2013 :  2:04:30 PM  Show Profile  Reply with Quote
case=6593 is fixed in build 1940
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Sep 25 2013 :  4:39:03 PM  Show Profile  Reply with Quote
case=6593 nested namespace issue is fixed in build 2001.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000