Opened 10 years ago

#6925 new Bugs

BooleanMetafunction

Reported by: Robert Ramey Owned by: Aleksey Gurtovoy
Milestone: To Be Determined Component: mpl
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

mpl defined the metafunctions max<N1, N2> as:

N1, N2 any type. with semantics equivalent to:

typedef if_< less<x,y>,y,x >::type r;

BUT less<x,y> requires that x & y be a NumericalMetafunction wity x, y modeling IntegralConstant.

So, I believe that N1 and N2 should also be required to model IntegralConstant.

In addition, it makes sense the max (and min) model the concept of NumericalMetafunction with value type bool.

Actually, there should be a concept BooleanMetafunction as short hand for NumericalMetafunction.

I came across this problem when I removed the ::type from min<x, y> and got a compile error. This should work as plus, ... etc do.

Robert Ramey

Change History (0)

Note: See TracTickets for help on using tickets.