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
 Feature Requests
 Another STL request
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

rblondeau
Tomato Guru

Canada
102 Posts

Posted - Oct 05 2004 :  1:36:20 PM  Show Profile
Currently when we type a < (less than symbol), no corresponding > (greater than symbol) is automatically inserted with the caret left between the two. It would be nice but that is ok.

What would be nice though, is if the parser recognizes that you are defining a template object variable, that it would add spaces between the < > and the type. This is because sometimes not putting spaces between these characters causes compiler errors. Normally it's when there are multiple closing > characters.

For example, both of these would work:
vector<int> MyVar;
vector< int > MyVar;

But in a more complex declaration,
map<long, vector<string>> MyVar;

the >> would be interpreted as the >> stream operator and would give the following error message:

error C2947: expecting '>' to terminate template-argument-list, found '>>'

For that reason it should be declared with spaces:
map< long, vector< string > > MyVar;

Stephen
Tomato Guru

United Kingdom
781 Posts

Posted - Oct 05 2004 :  1:37:43 PM  Show Profile
Personally I prefer not to have a space, except in the case that won't compile otherwise.

Stephen Turner
ClickTracks http://www.clicktracks.com/
Winner: ClickZ's Best Web Analytics Tool 2003 & 2004

Edited by - Stephen on Oct 05 2004 1:38:02 PM
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Oct 05 2004 :  8:10:47 PM  Show Profile
You might create an Autotext entry for "vec" which expands to "vector< | >".

http://www.wholetomato.com/products/features/autotext.html?more=yes
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