1 .. Metafunctions/Comparisons//equal_to |50
17 typedef |unspecified| type;
25 Returns a true-valued |Integral Constant| if ``T1`` and ``T2`` are equal.
33 #include <boost/mpl/equal_to.hpp>
34 #include <boost/mpl/comparison.hpp>
40 |Numeric Metafunction|
46 +---------------+---------------------------+-----------------------------------------------+
47 | Parameter | Requirement | Description |
48 +===============+===========================+===============================================+
49 | ``T1``, ``T2``| |Integral Constant| | Operation's arguments. |
50 +---------------+---------------------------+-----------------------------------------------+
52 |Note:| |numeric metafunction note| |-- end note|
59 For any |Integral Constant|\ s ``c1`` and ``c2``:
63 typedef equal_to<c1,c2>::type r;
73 typedef bool_< (c1::value == c2::value) > r;
76 .. ..........................................................................
80 typedef equal_to<c1,c2> r;
90 struct r : equal_to<c1,c2>::type {};
97 Amortized constant time.
105 BOOST_MPL_ASSERT_NOT(( equal_to< int_<0>, int_<10> > ));
106 BOOST_MPL_ASSERT_NOT(( equal_to< long_<10>, int_<0> > ));
107 BOOST_MPL_ASSERT(( equal_to< long_<10>, int_<10> > ));
113 |Comparisons|, |Numeric Metafunction|, |numeric_cast|, |not_equal_to|, |less|
116 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
117 Distributed under the Boost Software License, Version 1.0. (See accompanying
118 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)