| 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
 |