Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Partial template specialization and member list

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
csmitchell99 Posted - May 19 2011 : 1:25:23 PM
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
}
2   L A T E S T    R E P L I E S    (Newest First)
csmitchell99 Posted - May 19 2011 : 6:45:30 PM
Indeed it does help, I thought I had tried that but apparently not.

Thank you very much.
accord Posted - May 19 2011 : 6:14:45 PM
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.

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