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
 1539: Template parameter resolution
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

thruska
Ketchup Master

71 Posts

Posted - Oct 17 2006 :  10:19:00 AM  Show Profile  Reply with Quote
template <class XKey, class XValue, size_t XPrime>
class SomeClass
{
int SomeFunction(size_t SomeVariable, const XKey &Key, const XValue &Value)
{
...Code here...
}
};

Notice the last template parameter is defined as size_t. When I go to use SomeFunction:

SomeClass<BString, BString, 27> TestVar;
...
TestVar.SomeFunction(

VAX thinks that size_t is 27. That is, the tooltip that appears after typing in the '(' says:

int SomeFunction( 27 SomeVariable, const BString &Key, const BString &Value)

That's pretty weird. And you may not be able to see it, but there is also a leading space before the 27 (may or may not be related).

Thomas Hruska
CubicleSoft President
http://www.cubiclesoft.com/

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 17 2006 :  1:08:31 PM  Show Profile  Reply with Quote
which IDE are you using? using VS2003 and VA 1539 I have added the code:

template <class XKey, class XValue, size_t XPrime>
class SomeClass
{
    int SomeFunction(size_t SomeVariable, const XKey &Key, const XValue &Value)
    {
        /*...Code here...*/
    }
};

void callTemplate()
{
    SomeClass<std::string, std::string, 27> TestVar;
    TestVar.SomeFunction(|)
}


to a cpp file, and I am seeing:



Am I doing something obviously different to you?

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

thruska
Ketchup Master

71 Posts

Posted - Oct 17 2006 :  3:34:52 PM  Show Profile  Reply with Quote
VS2003 SP1 with VAX 1539. And that's pretty much identical to my code. The only obvious difference is that I have "autocomplete" turned off for matching parenthesis '()'.

Thomas Hruska
CubicleSoft President
http://www.cubiclesoft.com/
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 17 2006 :  4:26:21 PM  Show Profile  Reply with Quote
can you reproduce the odd tooltip easily? if so can you grab a screen shot?
it is possible you are getting a VA tooltip while I am getting an IDE tooltip.
VA tooltips have a single pixel border all of the way around the outside, while the IDE tooltips do not. this is a subtle difference, but quite obvious if you manage to compare the two side by side via screen shots

*sigh* my system has decided it will not show me the tooltip a second time - I may have to find something to hit it with.

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

thruska
Ketchup Master

71 Posts

Posted - Oct 18 2006 :  12:21:25 PM  Show Profile  Reply with Quote


Definitely VAX - without VAX there is no syntax coloring (variables are bolded but that's all). I use 47 in my code, but the number chosen shouldn't make a difference.

Thomas Hruska
CubicleSoft President
http://www.cubiclesoft.com/
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 18 2006 :  5:56:00 PM  Show Profile  Reply with Quote
It took a bit of hitting with a stick but I have my test machine working again now.

case=3115

zen is the art of being at one with the two'ness
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