Export (0) Print
Expand All

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


© 2015 Microsoft