Index: boost/mpl/equal.hpp =================================================================== diff --git a/trunk/boost/mpl/equal.hpp b/trunk/boost/mpl/equal.hpp --- a/trunk/boost/mpl/equal.hpp (revision 84407) +++ b/trunk/boost/mpl/equal.hpp (working copy) @@ -4,8 +4,8 @@ // Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. @@ -14,21 +14,22 @@ // $Date$ // $Revision$ +#include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include #include -#include -#include +#include #include #include -#include -#include +#include +#include +#include #include -#include -#include -#include #include @@ -49,7 +50,7 @@ > struct apply { - typedef typename and_< + typedef typename and_< not_< is_same > , not_< is_same > , aux::iter_apply2 @@ -87,25 +88,23 @@ typedef typename result_::type type; }; - - } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence1) , typename BOOST_MPL_AUX_NA_PARAM(Sequence2) - , typename Predicate = is_same<_,_> + , typename Predicate = quote2 > struct equal - : aux::msvc_eti_base< + : aux::msvc_eti_base< typename aux::equal_impl::type >::type { - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal,(Sequence1,Sequence2)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,equal,(Sequence1,Sequence2)) }; -BOOST_MPL_AUX_NA_SPEC(2, equal) +BOOST_MPL_AUX_NA_SPEC(3, equal) }} Index: libs/mpl/doc/src/refmanual/equal.rst =================================================================== diff --git a/trunk/libs/mpl/doc/src/refmanual/equal.rst b/trunk/libs/mpl/doc/src/refmanual/equal.rst --- a/trunk/libs/mpl/doc/src/refmanual/equal.rst (revision 84407) +++ b/trunk/libs/mpl/doc/src/refmanual/equal.rst (working copy) @@ -7,11 +7,11 @@ -------- .. parsed-literal:: - + template< typename Seq1 , typename Seq2 - , typename Pred = is_same<_1,_2> + , typename Pred = quote2 > struct equal { @@ -23,7 +23,7 @@ Description ----------- -Returns a true-valued |Integral Constant| if the two sequences ``Seq1`` +Returns a true-valued |Integral Constant| if the two sequences ``Seq1`` and ``Seq2`` are identical when compared element-by-element. @@ -31,7 +31,7 @@ ------ .. parsed-literal:: - + #include @@ -56,14 +56,14 @@ .. parsed-literal:: - typedef equal::type c; + typedef equal::type c; :Return type: |Integral Constant| :Semantics: - ``c::value == true`` is and only if ``size::value == size::value`` - and for every iterator ``i`` in |begin/end| ``deref::type`` is identical to + ``c::value == true`` is and only if ``size::value == size::value`` + and for every iterator ``i`` in |begin/end| ``deref::type`` is identical to .. parsed-literal:: @@ -73,17 +73,17 @@ Complexity ---------- -Linear. At most ``size::value`` comparisons. +Linear. At most ``size::value`` comparisons. Example ------- .. parsed-literal:: - + typedef vector s1; typedef list s2; - + BOOST_MPL_ASSERT(( equal )); Index: libs/mpl/test/Jamfile.v2 =================================================================== diff --git a/trunk/libs/mpl/test/Jamfile.v2 b/trunk/libs/mpl/test/Jamfile.v2 --- a/trunk/libs/mpl/test/Jamfile.v2 (revision 84407) +++ b/trunk/libs/mpl/test/Jamfile.v2 (working copy) @@ -17,6 +17,7 @@ compile bind.cpp ; compile bitwise.cpp ; run bool.cpp ; +compile bug_equal_default_lambda.cpp ; compile comparison.cpp ; compile contains.cpp ; compile copy.cpp ; Index: libs/mpl/test/bug_equal_default_lambda.cpp =================================================================== diff --git a/trunk/libs/mpl/test/bug_equal_default_lambda.cpp b/trunk/libs/mpl/test/bug_equal_default_lambda.cpp new file mode 10644 --- /dev/null (revision 0) +++ b/trunk/libs/mpl/test/bug_equal_default_lambda.cpp (working copy) @@ -0,0 +1,39 @@ +// Copyright Louis Dionne 2013 +// +// Distributed under the Boost Software License,Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + + +// Test case for the bug reported at: +// https://svn.boost.org/trac/boost/ticket/8608 + + +#include +#include +#include +#include +#include +#include + + +using namespace boost; +using namespace boost::mpl; + + +template +struct find_vector + : find_if< + VectorOfVectors, equal + > +{ }; + +typedef find_vector< + vector< + vector, + vector + >, + vector +>::type ThisShouldNotBreak;