Boost logo

Boost :

From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-03-05 15:15:50


I needs calculate the mlp::or_ of a sequence of nullary logical

This seams quite simple. I have do the following:
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> {};

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, gregod at, cpdaniel at, john at