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
 VAX 124x: template specializations
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Aug 09 2004 :  2:14:13 PM  Show Profile
When I specialize function templates, VAX does not recognize them as being the same function and shows only the first definition ever. HCB shows them all.

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 20 2004 :  3:17:15 PM  Show Profile
is this what you mean?



i have added a template function to my class, plus two further versions using specialization. you can see all three versions in the HCB, but only the base version is listed in the tooltip.

case=222

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

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 20 2004 :  3:31:48 PM  Show Profile
while experimenting, i also discovered a problem with template functions that are not in a class.

i added this block (before any other functions) to a cpp file:

template<class T> bool felineLessThan(T a, T b)
{
    return return a < b;
}

template<> bool felineLessThan<const char *>(const char *a, const char *b)
{
    return strcmp(a, b) < 0;
}

template<> bool felineLessThan<long>(long a, long b)
{
    return a < b;
}

static void testFn()
{
	bool res = felineLessThan(|
}

when i add the open bracket on felineLessThan in testFn i see:



for a second, or less. then this tooltip is removed and replaced with:



i am getting this both with .NET 2003 at work and .NET 2002 at home. interestingly, calling felineLessThan further down the file does not produce this jumping tooltip.

case=223

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Aug 20 2004 :  4:28:38 PM  Show Profile
Yes, thats what I see too. As usual: full template support would be great one day
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