Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 15xx: namespace + typedef 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
bugfix Posted - Dec 20 2006 : 03:09:05 AM

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
9   L A T E S T    R E P L I E S    (Newest First)
support Posted - Apr 10 2008 : 01:09:13 AM
case=4249 is fixed in build 1632
feline Posted - Dec 22 2006 : 7:43:32 PM
*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
feline Posted - Dec 21 2006 : 5:34:07 PM
I have the project, many thanks for this
bugfix Posted - Dec 21 2006 : 4:22:46 PM
i ve sent a repro project via contact form, hope you have access to it.
feline Posted - Dec 21 2006 : 4:20:43 PM
*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.
bugfix Posted - Dec 21 2006 : 12:55:43 PM
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
feline Posted - Dec 21 2006 : 12:43:58 PM
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.
bugfix Posted - Dec 21 2006 : 07:48:07 AM
Just tried 1543 and same broken alt-g behavior.
bugfix Posted - Dec 20 2006 : 05:12:49 AM
just replaced "<ATL::" w/ "<" in all wtl headers, rebuild db and guess what completion and alt-g works!

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