Tuesday, November 16, 2010

The Angle Bracket Hack

The following is the angle bracket hack:
   Accepting two consecutive ">"s in a template declaration.

Currently, the C++ Standard mandates that a space should placed between two adjacent closing template angle brackets (">"). Some compilers tolerate not having the space. In the next C++ standard, it is expected that the space will no longer be required.

Reference: C++ Templates: The complete guide by David Vandevoorde and Nicolai M. Josuttis. Addison-Wesley, 2003, p. 507

No comments:

Post a Comment