Opened 14 years ago
Last modified 12 years ago
#2487 new Feature Requests
Calculate the mlp::and_ or mpl_or of a sequence of nullary logical metafunctions.
Reported by: | Owned by: | Aleksey Gurtovoy | |
---|---|---|---|
Milestone: | Boost 1.38.0 | Component: | mpl |
Version: | Boost 1.36.0 | Severity: | Cosmetic |
Keywords: | Cc: |
Description
Do you think that these two metafunctions have a place in mpl?
template <typename Seq> struct and_seq : boost::is_same<typename mpl::find_if<Seq, mpl::not_<mpl::_> >::type,
typename mpl::end<Seq>::type>
{};
template <typename Seq> struct or_seq : mpl::not_<boost::is_same<typename mpl::find_if<Seq, mpl::_>::type,
typename mpl::end<Seq>::type>
{};
I have attached the code and the tests.
Attachments (5)
Change History (6)
by , 14 years ago
Attachment: | and_seq.hpp added |
---|
by , 14 years ago
Attachment: | or_seq.hpp added |
---|
mlp::or_ of a sequence of nullary logical metafunctions.
by , 14 years ago
Attachment: | or_seq.2.hpp added |
---|
mlp::or_ of a sequence of nullary logical metafunctions.
comment:1 by , 12 years ago
The while_recur2.hpp attachment to another ticket:
https://svn.boost.org/trac/boost/attachment/ticket/3044/while_recur.2.cpp
would be one way to implement these two metafunctions, as claimed by the post:
mlp::and_ of a sequence of nullary logical metafunctions.