Share via


Angle Bracket Placement

OverviewHow Do I

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.