Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Angle Bracket Placement

Bad placement of angle brackets (<>) causes many template syntax errors. Make sure that you use proper spacing and parentheses to distinguish angle brackets from operators such as >> and ->. For example:

TempClass< float, a > b ? a : b > test1;

should be rewritten as

TempClass< float, (a > b ? a : b) > test1;

Similarly, pay extra attention when using macros that use angle brackets as template arguments.

See Also

Templates

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.