|
Boost : |
From: Raja R Harinath (harinath_at_[hidden])
Date: 2002-02-18 16:59:34
"Rainer Deyke" <root_at_[hidden]> writes:
> ----- Original Message -----
> From: "Wilka" <wilka_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Monday, February 18, 2002 12:55 PM
> Subject: RE: [boost] Most needed/desired features in C++
>
>> Or how about allowing
>>
>> std::vector< ...complex sub-types, ... > v;
>> for( v::const_iterator it = v.begin(); it != v.end() ++it)
>>
>> When I'm explaining this to people new to C++, they often get
> confused
>> by they need some_type::iterator instead of the_value::iterator. And
> I
>> can't think of a good reason that it needs to be this way (but I'm
>> probably missing something)
>
> I would probably use '.' for symmetry:
>
> type::static_function()
> value.static_function()
> type::type x;
> value.type y;
And, you could put 'typename' to use here. Only allow
typename value.type y;
to access the enclosed type.
- Hari
-- Raja R Harinath ------------------------------ harinath_at_[hidden] "When all else fails, read the instructions." -- Cahn's Axiom "Our policy is, when in doubt, do the right thing." -- Roy L Ash
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk