Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1539: Template parameter resolution

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
thruska Posted - Oct 17 2006 : 10:19:00 AM
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).
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 18 2006 : 5:56:00 PM
It took a bit of hitting with a stick but I have my test machine working again now.

case=3115
thruska Posted - Oct 18 2006 : 12:21:25 PM


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.
feline Posted - Oct 17 2006 : 4:26:21 PM
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.
thruska Posted - Oct 17 2006 : 3:34:52 PM
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 '()'.
feline Posted - Oct 17 2006 : 1:08:31 PM
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?

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