Boost logo

Boost :

From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2006-02-02 14:25:01


MB wrote:
> Thorsten Ottosen wrote:
>
>>>It is possible to hook 'range_iterator' from user specializations?
>>>
>>> template< class T >
>>> struct range_iterator<const T> : range_const_iterator<T> { };
>>>
>>>Fortunately, Boost.Range documentation doesn't say
>>>'range_iterator< const Foo::Pair<T> >' must be specialized.
>>>User 'range_iterator' specializations still work.
>>
>>
>>I'm not sure what you're saying here. Could you explain?
>
>
> Sorry, please forget this code. I was confused or drunken.
> I had ever specialized 'range_iterator<const MyX>' to return "mutable" iterator,
> before I removed it some time ago.
>
> I see "range_iterator -> range_mutable_iterator" change
> doesn't break any current user customizations.
> Am I right?

well, it could break any specialization of range_iterator.

I'll see if I can avoid it, but I won't promise that I can.

>>>As for 'boost_range_begin', the change is rather dangerous.
>>>Please do google "range_end".
>>
>>
>>I don't get a lot of hits that uses range_end as a function.
>
>
> If 'range_end' is a function, it is rather lucky.
> Once "int range_end;" is defined, I think there is no workaround.

right, if you have a namespace static variable called range_end, then
you can't define a function of the same name in that namespace. But what
are the chances of that? remember there is no problem with

{
   // some scope
   int range_end;
   boost::end(rng);
}

> I read the long discussion why 'boost_range_begin' was born.
> Did I overlook another discussion about the birth of 'range_begin'?

maybe, there was some discussion about the problems of tying
a concept to a library name. the range concept exists out-side of boost
and any type T conforms to it if it implements range_begin(T&) and
range_end(T&) etc.

>>>>BTW: please use your real name when posting
>>>
>>>Formal rule?
>>>If so, this should be the final post...
>>
>>
>>I don't think so, but I like to know whom I'm speaking with.
>
>
> Nice to meet you and the world.
>
>
> Regards,
> Shunsuke Sogame

Nice to meet you too, Shunsuke.

And welcome to boost :-)

best regards

Thorsten


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