id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 8608,Default lambda expression with mpl::equal,Louis Dionne ,Aleksey Gurtovoy,"Summary of the original message posted on the mailing list: ------------------------------------------------------------------------------ Some higher order algorithms in the MPL have a default for the lambda expression they accept. A good example is `boost::mpl::equal`: {{{ template > struct equal; }}} This works fine most of the time, but I was recently bitten by the following: {{{ template struct find_vector : find_if< VectorOfVectors, equal > { }; typedef find_vector< vector< vector, vector >, vector >::type ThisWillBreak; }}} What happens here is that the `equal` expression inside `find_vector` really is `equal >` because of the default value for the predicate to `equal`. When the lambda is evaluated, the placholders inside the inner `is_same<_1, _2>` expression are replaced too, which yields unexpected results. ------------------------------------------------------------------------------ Original thread: http://thread.gmane.org/gmane.comp.lib.boost.devel/241690 ",Bugs,new,To Be Determined,mpl,Boost Development Trunk,Problem,,default lambda mpl equal,