|
Boost Users : |
From: Noel Belcourt (kbelco_at_[hidden])
Date: 2005-09-28 17:08:52
Hi,
I'm new to the list so this may have been answered elsewhere (like a
FAQ for MPL) but I couldn't find it.
I've got 2 vector_c types like this
typedef vector_c<int, 1,2,1,1,-2,0,1> p1;
typedef vector_c<int, 0,3,0,-1,1,3,5> p2;
and a resultant type defined as
typedef vector_c<int, 1,1,0,1,1,0,1> r;
that I want to compare at compile time using logic like this
r = p1 || p1 && p2
This pseudo code is what I want to do but I know this doesn't work.
Can anyone can suggest a better approach?
template <class R, class P1, class P2>
struct validate_checkin : boost::mpl::equal<
boost::mpl::placeholders::_1,
boost::mpl::or_<
boost::mpl::placeholders::_2,
boost::mpl::and_<
boost::mpl::placeholders::_2,
boost::mpl::placeholders::_3
>,
>,
>
{};
Regards,
-- Noel Belcourt
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net