|
Boost : |
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-03-05 15:15:50
Hello,
I needs calculate the mlp::or_ of a sequence of nullary logical
metafunction.
This seams quite simple. I have do the following:
<code>
template <typename Seq>
struct or_seq;
template <typename Seq, long N>
struct or_seq_aux : mpl::or_<
typename mpl::front<Seq>::type,
or_seq<typename mpl::pop_front<Seq>::type>
> {};
template <typename Seq>
struct or_seq_aux<Seq, 1> : mpl::front<Seq>::type {};
template <typename Seq>
struct or_seq : or_seq_aux<Seq, mpl::size<Seq>::value> {};
</code>
Is there a boost or_seq like logical metafunction?
Is there a better way to do it?
I would be extremely interested in any suggestions.
Best regards
---------------------------
Vicente Juan Botet Escriba
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk