Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-09-28 22:19:19


Joel de Guzman <joel_at_[hidden]> writes:

>> [what's a mono-sequence?]
>
> The opposite of hetero-sequence :P

A mono-sequence is the opposite of a multi-sequence. The opposite of
a hetero-sequence is a homo-sequence.

>> It's not the same thing at all. In the case of array<int>, the
>> sequence has the same elements in either case; we're just talking
>> about two ways of accessing the same sequence. In the case of
>> std::pair there are two completely distinct interpretations, either of
>> which could be valid. In my case I think there are only two possible
>> choices:
>>
>> 1. say that std::pair needs to be wrapped or otherwise
>> transformed before I know how to treat it.
>>
>> 2. pick one of the two interpretations.
>
> I'm sorry. I think I'm lost. With:
>
> pair<int*,int*>
>
> or
>
> tuple<int*,int*,int*,int*>
>
> or
>
> array<int*>
>
> I see the same elements. What am I missing?

* Boost.Range and Boost.Fusion both interpret an int*[4] as a
  sequence of 4 values of type int*. Consistent

* Boost.Fusion interprets a pair<int*,int*> as a sequence of two
  values of type int*.

* Boost.Range interprets a pair<int*,int*> x as a sequence of
  x.second-x.first values of type int.

-- 
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