Using Angle Brackets In Templates

From RAD Studio
Jump to: navigation, search

Go Up to Class Templates Overview Index

Be careful when using the right angle bracket character upon instantiation:

Buffer<char, (x > 100 ? 1024 : 64)> buf;

In the preceding example, without the parentheses around the second argument, the > between x and 100 would prematurely close the template argument list.