Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1543: multiple "using namespace" and Alt-G problem

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
mertkew Posted - Dec 20 2006 : 05:13:51 AM
WinXP SP2, VS 2003 SP1

Try this code:

--------------------
myclass.h
--------------------

namespace xyz
{
  namespace abc {  }

  class MyClass
  {
  public:
    MyClass(void);
    void fooFunc(int a); // Alt-G on fooFunc does nothing
    void fooFunc(bool b); // Alt-G on fooFunc jumps to above fooFunc()
    virtual ~MyClass(void);
  };
}


--------------------
myclass.cpp
--------------------

#include "myclass.h"

using namespace xyz;
using namespace abc; // <<<---- source of the problem

MyClass::MyClass(void)
{}

MyClass::~MyClass(void)
{}

void MyClass::fooFunc( int a ){} // Alt-G on fooFunc offers the both 
                                 // fooFunc() from the myclass.h

void MyClass::fooFunc( bool b ){}// Alt-G on fooFunc offers the both 
                                 // fooFunc() from the myclass.h


5   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jan 17 2007 : 3:44:42 PM
Cases 4204 and 4205 are fixed in 1544.
feline Posted - Dec 20 2006 : 5:11:32 PM
while working on the bug reported in this thread:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5777

I seem to have reproduced your problem 1, just using slightly different code.

case=4205
feline Posted - Dec 20 2006 : 4:11:31 PM
the second problem I can reproduce, exactly as you describe it. for now the obvious work around is not to mix both "using namespaces" lines with fully qualified functions.

case=4204
feline Posted - Dec 20 2006 : 3:01:34 PM
the first problem, have you tried it with the actual code you posted? I have tried the code you posted, and a variation of it where I renamed everything and moved things around, and alt-g is working correctly for me.

True I am seeing an extra item being offered sometimes, but I an not seeing any significant problems.
mertkew Posted - Dec 20 2006 : 06:22:14 AM
Here is another problem connected to multiple "using namespace" and ALT-G:

--------------------
myclass.h
--------------------
namespace xyz
{
  namespace abc {  }

  class MyClass
  {
  public:
    MyClass(void);
    void fooFunc(int a); // Alt-G on fooFunc does nothing
  };
}


--------------------
myclass.cpp
--------------------
#include "myclass.h"

using namespace xyz;
using namespace xyz::abc; // if you remove this Alt-G will work again

MyClass::MyClass(void) { }

void xyz::MyClass::fooFunc( int a ) { } // Alt-G jumps to fooFunc in myclass.h
  // ^^^^^--- alternatively if you remove this Alt-G will work again

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