Boost logo

Boost :

From: Shunsuke Sogame (mb2act_at_[hidden])
Date: 2006-02-03 23:50:54


Thorsten Ottosen wrote:
> Shunsuke Sogame wrote:
>
>>Thorsten Ottosen wrote:
>>
>>
>>>Shunsuke Sogame wrote:
>>>
>>>
>>>
>>>>Thorsten Ottosen wrote:
>>>
>>>
>>>>>>I'm maybe an worrier, struggling with ADL invasions.
>>>>>>But short names conflict.
>>>>>
>>>>>
>>>>>true, that is why begin()/end() were abadened.
>>>>
>>>>
>>>>I maybe failed persuasion. :-)
>>>>But "mathematically", I believe ADL customization
>>>>must be full name that emulates namespace.
>>>>
>>>>Well, I request tag-dispatching customization using
>>>>class template partial specialization to next Boost.Ranges.
>>>>Now that I really need tag-dispatching, I'm against ADL customization.
>>>>I recall you said something like that. You were right.
>>>>My current ATL/WTL CString range implementation code is horror.
>>>>Will you add it to TODO list of next Boost.Ranges!
>>>
>>>
>>>Can you elaborate on what exactly you would like to see?
>>
>>
>>For instance, ATL/WTL have four strings.
>>They have the same interfaces.
>>I want to share the implementation.
>>You may say "Forward them to one implementation function", but:
>>
>> template< class BaseT, class TraitsT > inline
>> typename boost::range_iterator< CStringT<BaseT, TraitsT> >::type
>> boost_range_begin(CStringT<BaseT, TraitsT>& str)
>> {
>> return str.GetBuffer(0);
>> }
>>
>> template< class BaseT, class TraitsT > inline
>> typename boost::range_const_iterator< CStringT<BaseT, TraitsT> >::type
>> boost_range_begin(const CStringT<BaseT, TraitsT>& str)
>> {
>> return str.GetString();
>> }
>>
>>
>>Even forwarding is horror.
>
>
> right. not much to do about that. As Peter Dimov and others argued,
> you can easy forwarding, but the problem is that we still need
> free-standing boost::begin() and boost::end() on their own.
>
>
>>Moreover, the different version of ATL has different template parameters.
>
>
> if ATL actually uses a namespace, you could add a unconstrained overload
> of range_begin/range_end.

ATL/WTL has also many containers that can conform to Boost.Range.
I request tag-dispatching!

--
Regards,
Shunsuke Sogame

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