Boost logo

Boost :

From: Rainer Deyke (root_at_[hidden])
Date: 2001-06-23 11:41:24


----- Original Message -----
From: "Beman Dawes" <bdawes_at_[hidden]>
To: <boost_at_[hidden]>; <boost_at_[hidden]>
Sent: Saturday, June 23, 2001 8:11 AM
Subject: Re: [boost] Re: Tuples Library Formal Review

> So the rule actually seems something like:
>
> For by-value indexes such as selecting an element in a container, use
0
> as the base. Examples: std::vector or std::string.
>
> For by-name ordinals such as naming operands, arguments, or structure
> members, use 1 as the base. Examples: std::pair.first, std::bind1st.
>
> On that basis, bind( f, _1, _2 ) seems the correct choice. It might be
> worth mentioning the above rules in the rationale.

Not really. In the English language, "first" (also spelled "1st") denotes
the element that has no predecessor. Zero-based indexing does not change
that. So zero is the first elements, one is the second elements, etc..
'_1' is the number one, i.e. the second element.

--
Rainer Deyke (root_at_[hidden])
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

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