"Jeff Flinn" <NONONE@nowhere.com> skrev i meddelandet
news:dt2ls8$3lv$1@bluegill.adi.com...[color=blue]
> Bo Persson wrote:[/color]
[color=blue][color=green]
>> So, do we want to have two types named std::vector<Test> that are
>> not
>> the same type? Not really.[/color]
>
> And I wouldn't expect them to have the same type names. I would
> expect them to have names related to the scope that each has.[/color]
At the time, the committee wasn't able to come up with a naming scheme
that would do this. What exactly are the different scopes here? What
if there are other functions f() and g() in other source files, etc?
Global names and names in namespaces have a well defined, and unique
(important!), name. The One Defintion Rule also ensures that these
names are globally unique. That means that std::vector<global_name>
will also be unique.
[color=blue]
>[color=green]
>> So, the Standards Committee said: You just can't do this![/color]
>
> Too bad.
>[color=green]
>> Problem solved?[/color]
>
> Probably not. :)
>[/color]
Perhaps there will be another attempt for the next revision of the
standard. At least it is now known that the problem can be solved.
http://www.open-std.org/jtc1/sc22/wg...2003/n1427.pdf
Bo Persson