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
 C++ Namespace parsing problems
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

peck797
Tomato Guru

United Kingdom
171 Posts

Posted - Nov 27 2005 :  06:07:34 AM  Show Profile
VAX doesn't appear to find functions that are defined implicitly by putting a "using namespace" declaration at the top of the cpp file.

I'm not sure if this is a bug in the compiler or in VAX but, ISTM, that VAX should work with the compiler's behaviour, not with the "ideological universe".

If you put a class inside a namespace and then define its member functions within the Namespace too:

using namespace MyNamespace
{
void MyNamespace::MyClassName::MyFunction()
{
}
};

it will work fine. However, if you use the implied-namespace syntax:

using namespace MyNamespace;

void MyClassName::MyFunctionName()
{
}

then the VAX Alt-G won't recognise the definition and will refuse to go there. The Net 2003 compiler recognizes that MyClassName is inside the namespace MyNamespace and is able to complete the resolution implicitly (i.e. the code compiles and works). Can you make the VAX parser do the same thing, please? :)

This is with build #1434

Edited by - peck797 on Nov 27 2005 06:09:00 AM

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Nov 29 2005 :  6:10:08 PM  Show Profile
setting up a basic test this works correctly in VA 1418, but not in 1434

case=901

zen is the art of being at one with the two'ness
Go to Top of Page

obirsoy
Junior Member

USA
18 Posts

Posted - Dec 04 2005 :  12:58:16 PM  Show Profile
This also does not work (classes and functions could not be found) for 1434.

namespace MyNamespace
{
void Function()
{
}
}

namespace mynm = MyNamespace;
mynm::Function();

Problems:
. Function() is underlined as error.
. When Alt+G while the cursor is on Function(), it goes to the mynm namespace definition (namespace mynm = MyNamespace;) not to the actual Function.

Go to Top of Page

peck797
Tomato Guru

United Kingdom
171 Posts

Posted - Dec 04 2005 :  1:02:24 PM  Show Profile
Yes, just for the record, I've noticed that it also underlines enum values that are not fully qualified with the namespace (but are perfectly legal values).

I assume these problems are all caused by the same bug manifesting in many different ways. If not, can someone add a ticket for this problem as well?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Dec 04 2005 :  6:11:00 PM  Show Profile
obirsoy i have reproduced the underlining, but only when i place the function call inside a function, which makes sense. this should be covered by the current case.

peck797 this should also be covered by the same case.


zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000