[Boost-bugs] [Boost C++ Libraries] #6925: BooleanMetafunction

Subject: [Boost-bugs] [Boost C++ Libraries] #6925: BooleanMetafunction
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-21 16:56:39

#6925: BooleanMetafunction
 Reporter: ramey | Owner: agurtovoy
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: mpl
  Version: Boost 1.49.0 | Severity: Problem
 Keywords: |
 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

 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

 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

Ticket URL: <https://svn.boost.org/trac/boost/ticket/6925>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC