$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David Abrahams (dave_at_[hidden])
Date: 2006-07-06 22:34:28
"Robert Ramey" <ramey_at_[hidden]> writes:
> David Abrahams wrote:
>> "Robert Ramey" <ramey_at_[hidden]> writes:
>>
>>
>>>> Thanks; I think I see why you need the templated ctors now.
>>>>
>>>> w.r.t. composing with a typedef, would
>>>>
>>>>     boost::archive::iterators::insert_linebreaks<
>>>>         boost::archive::iterators::base64_from_binary<
>>>>             boost::archive::iterators::transform_width<
>>>>                 const char *,
>>>>                 6,
>>>>                 8
>>>>             >::type
>>>>        >::type
>>>>         ,72
>>>>         ,const char // cwpro8 needs this
>>>>     >::type
>>>> base64_text;
>>>>
>>>> be much worse, for your purposes?
>>>
>>> Hmmm - I read this as creating an instance of base64_text -
>>> presumably on the stack.
>>
>> Eh?  All I did was make an exact copy of code you posted, and change
>> ">" to ">::type" everywhere.
>
> Oh - I only noticed that the word "typedef" was gone.
>
> Without looking at exactly what I did in detail and just commenting
> from a users's pespective - I don't see a big problem.  Maybe its
> even better in that it is explicit about exactly what we're doing -
> composing iterator types to create a new iterator type.
>
> But then - if I want to use base_64_text somewhere - where
> does the ::type go?  
Nowhere.  base_64_text is an iterator; you don't need to reach for its
nested ::type.
-- Dave Abrahams Boost Consulting www.boost-consulting.com