3D vector

This is a discussion on 3D vector within the C++ Programming forums, part of the General Programming Boards category; [Note that this is in that case a bug in the compiler, really] The standard says the following: 3 After ...

  1. #16
    Registered User
    Join Date
    May 2008
    Location
    Paris
    Posts
    248
    [Note that this is in that case a bug in the compiler, really]
    The standard says the following:
    3 After name lookup (3.4) finds that a name is a template-name, if this name is followed by a <, the < is
    always taken as the beginning of a template-argument-list and never as a name followed by the less-than
    operator. When parsing a template-id, the first non-nested > is taken as the end of the template argument- list rather than a greater-than operator. [Example:
    Code:
    template<int i> class X { /* ... */ };
    X< 1>2 > x1; // syntax error
    X<(1>2)> x2; // OK
    template<class T> class Y { /* ... */ };
    Y< X<1> > x3; // OK
    Y<X<6>> 1> > x4; // OK: Y< X< (6>>1) > >     <----------
    This does not concern the shift operator, but it (line <-------) seems to indicate that the end of two nested templates must be separated by a blank space..

    ps: how do I color a line in my thread?
    Last edited by MarkZWEERS; 07-24-2008 at 02:08 AM.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can some one please tell me the cause of the error ?
    By broli86 in forum C Programming
    Replies: 8
    Last Post: 06-26-2008, 08:36 PM
  2. syntax help?
    By scoobygoo in forum C++ Programming
    Replies: 1
    Last Post: 08-07-2007, 10:38 AM
  3. Certain functions
    By Lurker in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2003, 12:26 AM
  4. My 3D Vector class
    By Lurker in forum C++ Programming
    Replies: 105
    Last Post: 11-16-2003, 04:58 PM
  5. Operators for 3D Vector Mathematics
    By Anarchist in forum C++ Programming
    Replies: 10
    Last Post: 01-31-2003, 06:33 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21