[boost] name clash
by Gabriel Dos Reis other posts by this author
Aug 17 2002 11:59PM messages near this date
Re: [boost] 1.2.9 release - some libraries are still missing
tests
|
[boost] Re: name clash
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
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Gabriel Dos Reis
Gennaro Prota
Bo Persson
|