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
 Template parameters of functions.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tailsu
Senior Member

37 Posts

Posted - Sep 11 2007 :  03:54:27 AM  Show Profile  Reply with Quote
Template functions in C++ have a nice feature that lets them figure out their template arguments automatically. However it's not always possible, and some functions aren't even meant to do so.

However VA doesn't know and respect this.

Take boost::fusion::at_c() for example, it's used as follows:
at_c<0>(fusionSeq);
0 must always be passed explicitly.

It would be nice for VA to know about this and insert <>() (or something like this, instead of just () when auto-completing..

tailsu
Senior Member

37 Posts

Posted - Sep 11 2007 :  04:07:24 AM  Show Profile  Reply with Quote
It seems to me that the most intuitive way would be when being at
at_c(*cursor*)

pressing '<' takes us to

at_c<*cursor*>()

This way VA doesn't even need to understand about deducible template parameters and whatnot, just an editing aid.

How about it?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 11 2007 :  08:19:52 AM  Show Profile  Reply with Quote
We are considering having VA automatically insert the angle brackets along with the round brackets when it knows you are calling a template function:

case=460

I am a little wary of special casing the angle brackets as you describe in your second post, although off hand I cannot think of anything this would break.

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