Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-01-20 17:17:46


"JOAQUIN LOPEZ MU?Z" <joaquin_at_[hidden]> writes:

> ----- Mensaje original -----
> De: David Abrahams <dave_at_[hidden]>
> Fecha: Viernes, Enero 20, 2006 5:45 pm
> Asunto: Re: [boost] [multi_index] intrusive multi_index poll for
> interest
>
>> Bruno Martínez <br1_at_[hidden]> writes:
>>
>> > On Fri, 20 Jan 2006 05:52:22 -0200, Joaquín Mª López Muñoz
>> > <joaquin_at_[hidden]> wrote:
>> >
>> >> OK, you have shown a realistic scenario where the feature
>> >> is valuable, so I'm putting this into my todo list --probably
>> >> I can have it in time for 1.34, but I'm very slow writing and
>> checking>> things :) Any suggestions about the name/syntax?
>> Something like:
>> >>
>> >> iterator iter_to(const value_type& x)const;
>> >
>> > iterator_from()?
>> >
>> > I don't know. I'm spanish speaking too.
>>
>> position(const value_type& x) const;
>
> position() would be a perfect fit except for one thing:
> in the roadmapped ranked indices
>
> (http://boost.org/libs/multi_index/doc/future_work.html#ranked_indices)
>
> I will need another member function to return the
> position ordinal of a given element (that is,
> the inverse of operator[]), and for that "position"
> seems also a good candidate.

IMO that should have been "index."

> If we could find some other name for this latter memfunction, I
> think I'd adopt "position" for the former.
>
>> or if you are worried about "position" sounding like a verb,
>>
>> get_position(const value_type& x) const;
>>
>
> "position" seems OK to me as the verb interpretation
> doesn't look so obvious,

  "Position yourself between me and the wall"

It's not a very common usage, so I agree with you.

> but then again I'm not a native English speaker --incidentally,
> those who proposed empty() for STL containers didn't seem to have
> their English well oiled that day, either :)

:)

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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