Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-07-26 16:30:13


At 02:48 PM 7/26/2002, David Abrahams wrote:

>> > Another thing that still confuses me is why you need to specify
Value,
>> but
>> > can let Reference, Pointer, and Distance default.
>>
>> It's all spelled out in the table. The default value_type is
>> iterator_traits<slist_node*>::value_type == slist_node, not slist_data.
>
>To further clarify, as the table says, the defaults for Reference,
Pointer,
>and Distance are not taken from the Base type, but from the Value type.
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>Once we specify that the Value type is slist_data, we get slist_data& and
>slist_data* for free.

I was misreading the table as always using the Base type as the default.
Sigh.

--Beman


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