Date: Wed, 18 Sep 2013 20:33:31 -0300 From: kaballo86@hotmail.com
The following snippet fails to compile (tested with 1.54.0 and trunk, several compilers),
#include
#include #include int main() { using namespace boost::mpl; static_assert(and_
::value, "U KID?"); //this one fires static_assert(or_ ::value, "U KID?"); //this one is ok } This issue actually showed up in a variadic template scenario. Is this a bug? I feel like I'm doing something really wrong...
I guess one may not call `and_` with less than two arguments. If that's the case, it would be helpful if it would be impossible to instantiate it with a single argument.
I would go the other way and start support from zero arguments! The "and" operation would default to TRUE while "or" defaults to "FALSE." (Hint: the operations default to their "identity" operand value, and definitely not their "short-circuit" operand value.) Daryle W.