id summary reporter owner description type status milestone component version severity resolution keywords cc 5011 comparison/equal_to should work recursively Sebastian Redl Joel de Guzman "Suppose I have a struct that is adapted to Fusion, and it contains an array: typedef int i100[100]; // need a typedef due to ADAPT_STRUCT limitation struct with_ar { double d1; double d2; i100 ar; }; BOOST_FUSION_ADAPT_STRUCT(::with_ar, (double d1)(double d2)(i100, ar)); Now I want to use the Fusion comparisons with this: #include with_ar wa1 = { 0.0, 0.0, {1, 2 } }, wa2 = { 0.0, 0.0, {1, 2 } }; assert(boost::fusion::equal_to(wa1, wa2)); What I expect is that equal_to compares d1 and d2, and then compares ar as a Fusion sequence (the array adapter is included). However, the assertion fails, because equal_to compares the arrays with ==, which compares addresses. equal_to should be recursive, using equal_to to compare elements that are Fusion sequences, and == only for other things. I have hacked my local Fusion to do this, and it seems to work fine, but the hack is very ugly because of the recursive dependency between comparison/equal_to.hpp and comparison/detail/equal_to.hpp. Basically, I just add another version of equal_to that just does == on the arguments. SFINAE on is_sequence is used to decide between the two. The element comparison in sequence_equal_to then calls equal_to on the elements instead of using ==. The only problem I can see would be that equal_to would be used for adapted structs that have a specialized ==, but I think that would be a rather strange case." Bugs closed To Be Determined fusion Boost 1.45.0 Problem wontfix