Hello,
I need metafunction cross_product, which should
transform 2 sequences to a sequence of pairs.
Example:
typedef list l1;
typedef list l2;
typedef cross_product::type c;
typedef list<
pair,
pair,
pair,
pair
e;
BOOST_MPL_ASSERT((equal));
The best definition I came up with is the
following:
template
struct product : transform >
{
};
template
struct cross_product :
fold<
typename transform >::type,
list<>,
joint_view<_1, _2>
>
{
};
Is there a better way to do it? How can I get rid of
'struct product' and implement it as one metafunction?
Regards,
Roman Perepelitsa
Deutsche Bank Moscow
+7 (495) 660-74-08
---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.