In the Clang-enhanced C++ compilers, two consecutive right angle brackets no longer generate an error, and these constructions are treated according to the C++11 standard.
C++03’s parser defines “>>” as the right shift operator or stream extraction operator in all cases. However, with nested template declarations, there is a tendency for the programmer to neglect to place a space between the two right angle brackets, thus causing a compiler syntax error.
C++11 improves the specification of the parser so that multiple right angle brackets will be interpreted as closing the template argument list where it is reasonable.
Head over and find all of the different C++ language features now available in C++Builder.
Right angle brackets example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#pragma hdrstop #pragma argsused #include <tchar.h> #include <stdio.h> #include <vector> typedef std::vector<std::vector<int> > Table; // OK typedef std::vector<std::vector<bool>> Flags; // OK int _tmain(int argc, _TCHAR* argv[]) { return 0; } |
Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial
Free C++Builder Community Edition
Design. Code. Compile. Deploy.
Start Free Trial
Free C++Builder Community Edition