Boost logo

Boost :

From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2002-08-17 18:59:35


Some days ago, someone was wondering on this list (sorry, I can't find
the message off hand) whether the following construct

   typedef reverse_iterator<T> reverse_iterator;

were valid or not and reported that one of his compiler rejected it.

His compiler was right; somewhere, the standard says

3.3/4
   Given a set of declarations in a single declarative region, each of
   which specifies the same unqualified name,

     --- they shall all refer to the same entity, or all refer to
         functions and function templates; or

     --- exactly one declaration shall declare a class name or
         enumeration name that is not a typedef name and the other
         declarations shall all refer to the same object or
         enumerator, or all refer to functions and func-tion
         templates; in this case the class name or enumeration name is
         hidden (3.3.7). [Note: a namespace name or a class template
         name must be unique in its declarative region (7.3.2, clause
         14). ]

Hope that helps,

-- Gaby


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk