...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Returns a true-valued MPL
Integral Constant if I
and J
are equal.
template< typename I, typename J > struct equal_to { typedef unspecified type; };
Table 1.15. Parameters
Parameter |
Requirement |
Description |
---|---|---|
|
Any fusion iterators |
Operation's arguments |
result_of::equal_to
<I, J>::type
Return type: A model of MPL Integral Constant.
Semantics: Returns boost::mpl::true_
if I
and J
are iterators to the same position.
Returns boost::mpl::false_
otherwise.
#include <boost/fusion/iterator/equal_to.hpp> #include <boost/fusion/include/equal_to.hpp>
typedefvector
<int,double> vec; typedefresult_of::begin
<vec>::type first; typedefresult_of::end
<vec>::type last; BOOST_MPL_ASSERT((result_of::equal_to
<first, first>)); BOOST_MPL_ASSERT_NOT((result_of::equal_to
<first,last>));