Boost logo

Boost :

From: Bo Persson (bop2_at_[hidden])
Date: 2002-08-18 05:48:17

"Gabriel Dos Reis" <gdr_at_[hidden]> skrev i meddelandet
> 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.

Yes, but

typedef std::reverse_iterator<T> reverse_iterator;

is accepted.

> 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,

Note: "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

Bo Persson

Boost list run by bdawes at, gregod at, cpdaniel at, john at