Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-11-14 07:17:09


Sergey Shandar skrev:
> Thorsten Ottosen wrote:
>> David Abrahams skrev:
>>
>>> on Fri Nov 09 2007, Thorsten Ottosen <nesotto-AT-cs.aau.dk> wrote:
>>>
>>>
>>>> Dear all,
>>>>
>>>> As suggested by several people, I have started to rely on
>>>> range_difference<T>::type in all places of the library.
>>>>
>>>> I have also updated the docs w.r.t new concepts and are working on
>>>> polishing them.
>>>>
>>>> 1.35 will introduce a new function
>>>>
>>>> template< class T >
>>>> BOOST_DEDUCED_TYPENAME range_difference<T>::type size( const T& r );
>>>>
>>> Really, you're returning the difference_type and not the size_type?
>>>
>> Yes, that was the intension. Iterators don't have a size_type per se,
>> and so it complicated the whole thing a little to make the user worry
>> about this.
>>
>> -Thorsten
>> _______________________________________________
>> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>>
> Would it be better to use a meta-function 'make_unsigned' which converts
> signed type to its correspondent unsigned type? For example:
>
> signed int => unsigned int
> ::std::ptrdif_t => ::std::size_t
> etc.

I don't really know if it's better.

-Thorsten


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