Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Bug w/ create declaration in namespace

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
cbranch Posted - Jul 29 2008 : 1:02:25 PM
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).
3   L A T E S T    R E P L I E S    (Newest First)
support Posted - Sep 25 2013 : 4:39:03 PM
case=6593 nested namespace issue is fixed in build 2001.
support Posted - Jun 03 2013 : 2:04:30 PM
case=6593 is fixed in build 1940
accord Posted - Jul 29 2008 : 4:07:31 PM
I am seeing the same effect here. Thank you for the clear description.

case=6593

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000