3 <title>BOOST_PP_MAX_D
</title>
4 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
7 <div style=
"margin-left: 0px;">
8 The
<b>BOOST_PP_MAX_D
</b> macro expands to the greater of its second and third arguments.
9 It reenters
<b>BOOST_PP_WHILE
</b> with maximum efficiency.
13 <b>BOOST_PP_MAX_D
</b>(
<i>d
</i>,
<i>x
</i>,
<i>y
</i>)
19 The next available
<b>BOOST_PP_WHILE
</b> iteration.
23 The first operand.
24 Valid values range from
<i>0</i> to
<b>BOOST_PP_LIMIT_MAG
</b>.
28 The second operand.
29 Valid values range from
<i>0</i> to
<b>BOOST_PP_LIMIT_MAG
</b>.
34 This macro returns the greater of its first and second arguments or the value of both arguments if they are equal.
38 <li><a href=
"limit_mag.html">BOOST_PP_LIMIT_MAG
</a></li>
39 <li><a href=
"max.html">BOOST_PP_MAX
</a></li>
43 <b>Header:
</b> <a href=
"../headers/selection/max.html"><boost/preprocessor/selection/max.hpp
></a>
47 #include
<<a href=
"../headers/list/fold_left.html">boost/preprocessor/list/fold_left.hpp
</a>>
48 #include
<<a href=
"../headers/selection/max.html">boost/preprocessor/selection/max.hpp
</a>>
50 #define LIST (
1, (
3, (
5, (
2, (
4,
<a href=
"nil.html">BOOST_PP_NIL
</a>)))))
52 #define OP(d, state, x)
<a href=
"max_d.html">BOOST_PP_MAX_D
</a>(d, state, x)
54 #define LIST_MAX(list)
<a href=
"list_fold_left.html">BOOST_PP_LIST_FOLD_LEFT
</a>(OP,
0, LIST)
56 LIST_MAX(LIST) // expands to
5
59 <div style=
"margin-left: 0px;">
60 <i>© Copyright
<a href=
"http://www.housemarque.com" target=
"_top">Housemarque Oy
</a> 2002</i>
61 </br><i>© Copyright Paul Mensonides
2002</i>
63 <div style=
"margin-left: 0px;">
64 <p><small>Distributed under the Boost Software License, Version
1.0. (See
65 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a> or
67 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>