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
 15xx: namespace + typedef problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bugfix
Tomato Guru

Germany
324 Posts

Posted - Dec 20 2006 :  03:09:05 AM  Show Profile  Reply with Quote

namespace XXX
{
    template<typename T>
    class A
        : public T
    {
    public:
        void foo(){};
    };

    struct dummy{};
};

#if TRIGGER_VAX_ATL_G_BUG
typedef XXX::A<XXX::dummy> Adummy;
#else
using namespace XXX;
typedef A<dummy> Adummy;
#endif

class B
    : public Adummy
{
public:
    void foo(int i)
    {
        Adummy::foo(); //<-- try ALT-G on foo
    }
};


Took me a while to figure this one out but this sure looks like the bug that makes alt-g fail on most of atl/wtl stuff.
This might be related to case=2403 and hopefully speeds up fixing it:)

vs2003 sp1

-bugfix

bugfix
Tomato Guru

Germany
324 Posts

Posted - Dec 20 2006 :  05:12:49 AM  Show Profile  Reply with Quote
just replaced "<ATL::" w/ "<" in all wtl headers, rebuild db and guess what completion and alt-g works!

http://www.mf-sd.de
Go to Top of Page

bugfix
Tomato Guru

Germany
324 Posts

Posted - Dec 21 2006 :  07:48:07 AM  Show Profile  Reply with Quote
Just tried 1543 and same broken alt-g behavior.

http://www.mf-sd.de
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 21 2006 :  12:43:58 PM  Show Profile  Reply with Quote
in post 3 where you report the same broken alt-g behavior, is this for the code in post 1, or for the modified WTL headers?

I have tried all sorts of things with the code from post 1, but it simply will not compile in VS2003 or VS2005. Is it supposed to compile?

If the compiler cannot figure this out I am not that surprised that VA is having problems, although I suspect they are having completely different problems.

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

bugfix
Tomato Guru

Germany
324 Posts

Posted - Dec 21 2006 :  12:55:43 PM  Show Profile  Reply with Quote
uh? this compiles fine for me. using vs2003 sp1. i just used a plain win32 console app and pasted the code into the cpp file.

seems for triggering the bug you need to remove the #if/#endif and use comments.

// uncomment to trigger bug
//typedef XXX::A<XXX::dummy> Adummy;

// comment if the above line is uncommented:)
// working
using namespace XXX;
typedef A<dummy> Adummy;

---
w/ my modified wtl headers alt-g works as well as completion

http://www.mf-sd.de

Edited by - bugfix on Dec 21 2006 12:57:00 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 21 2006 :  4:20:43 PM  Show Profile  Reply with Quote
*confused* this code compiles perfectly in a brand new C++ console application in VS2003, but not in my main test project, which does compile quite happily normally.

*sigh* this is not helping. Once I have made this compile in my main test project I will put in a case.

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

bugfix
Tomato Guru

Germany
324 Posts

Posted - Dec 21 2006 :  4:22:46 PM  Show Profile  Reply with Quote
i ve sent a repro project via contact form, hope you have access to it.

http://www.mf-sd.de
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 21 2006 :  5:34:07 PM  Show Profile  Reply with Quote
I have the project, many thanks for this

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

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 22 2006 :  7:43:32 PM  Show Profile  Reply with Quote
*rolls eyes* having some of this code in both the cpp and .h file was the cause of the compiling problem. I am not sure how that happened, probably something to do with me doing half a dozen jobs at the same time. Now I have found the problem I have fixed it.

case=4249

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

support
Whole Tomato Software

5566 Posts

Posted - Apr 10 2008 :  01:09:13 AM  Show Profile  Reply with Quote
case=4249 is fixed in build 1632
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000