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
 Partial template specialization and member list
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

csmitchell99
New Member

2 Posts

Posted - May 19 2011 :  1:25:23 PM  Show Profile  Reply with Quote
Using the current release of VAX (10.6.1845.0 built 2011.03.13) when accessing a variable that is a class using partial template specialization the member drop down is either missing or only shows functions from the derived class, not the base class. We've seen both behaviors depending on the classes being used.

I've included sample code that I used in a clean project to duplicate the issue (of no member drop down). I've tested it under 3 versions of VS:
VS2005 - doesn't work, no drop down
VS2008 - doesn't work, no drop down
VS2010 - works, see the drop down as expected and it's populated with all functions


TemplateClass.h:

//TemplateClass is uses partial specialization and the member dropdown is missing
template<typename T, int TCount> class TemplateClass;

template<typename T> class TemplateClass<T, 0>
{
public:
    TemplateClass() {}
    ~TemplateClass() {}

    void Func1() {}
    void Func2() {}

protected:
    T m_obj;
};
template<typename T, int TCount = 0> class TemplateClass : public TemplateClass<T, 0>
{
public:
    TemplateClass() {}
    ~TemplateClass() {}

    void Func3() {}
    void Func4() {}
};


//TemplateClass2 that has a working member dropdown (no partial specialization)
template<typename T> class TemplateClass2
{
public:
    TemplateClass2() {}
    ~TemplateClass2() {}

    void Func1() {}
    void Func2() {}

protected:
    T m_obj;
};



Main.cpp:

#include "TemplateClass.h"

void main(int argc, char* argv[])
{
    TemplateClass<int> t1;
    TemplateClass2<int> t2;

    //t1.  No dropdown appears except under VS2010
    //t2.  Dropdown appears under all 3 VS versions
}

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - May 19 2011 :  6:14:45 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=42317

It works under Visual Studio 2010 because

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

is turned on by default. For now, try turning it on under VS2008 and VS2005 as a workaround. I tested your code snippet and turning this option has helped with VS2008 SP1 for me.

Edited by - accord on May 19 2011 6:21:12 PM
Go to Top of Page

csmitchell99
New Member

2 Posts

Posted - May 19 2011 :  6:45:30 PM  Show Profile  Reply with Quote
Indeed it does help, I thought I had tried that but apparently not.

Thank you very much.
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