On 11/30/08 12:49, Larry Evans wrote:
[snip]
You'll see Domains can be an mpl::vector of any
length. The cross_nproduct_view_test.cpp tests
with a 3 element Domains:
typedef
mpl::vector
< mpl::range_c
, mpl::range_c
, mpl::range_c
>
domains;
OOPS. That's in another test driver. The one
in the cross_nproduct_view_test.cpp has:
typedef range_c seq0;
typedef range_c seq1;
typedef range_c seq2;
typedef range_c seq3;
typedef
list
< seq0
, seq1
, seq2
, seq3
>
domains;
The range_c template instance:
http://www.boost.org/doc/libs/1_37_0/libs/mpl/doc/refmanual/range-c.html
produces a type sequence of length 2.
So mpl::list is a sequence of sequences
similar to haskell's [[a]] except that it's a sequence
of a sequences of types instead of a sequence of
sequences of values.
The cross_nproduct_view template and test driver
are found in the cross_nproduct_view.zip file here:
http://preview.tinyurl.com/5ar9g4