
Frédéric Bron wrote
Hi Lorenzo,
1) I'd add something like this for each STL container that defines an operator==:
template< typename T, class Alloc = std::allocator<T> > struct has_equal_to< std::vector<T, Alloc> > : has_equal_to<T> {};
Halas, it is a bit more complicated because the operator traits have in fact 3 arguments: template <class Lhs, class Rhs=Lhs, class Ret=dont_care> struct has_equal_to : public true_type-or-false_type {};
So we have to deal with left hand side and right hand side case + return type. For Lhs and Rhs arguments, it is easy because we just have to deal with Lhs=Rhs. It is a bit more tricky with the return type. We also have to deal with const volatile and references.
Yes, I understand (the evil is in the details ;) ). At some point I might had some decent specialization code at least for has_equal_to within Boost.Contract. I'll take a look, otherwise I can implement something and run it by this ML.
+ update of <boost/detail/container_fwd.hpp>
We can do separate headers <boost/type_traits/std/vector.hpp>, etc if the above doesn't work.
+ detailed testing.
I fear this is too much for 1.50 but we may plan for 1.51? It would be a good idea to have this working.
Yes, plus I don't have much time now... I wanted to know that there's agreement in fixing this so if I spend time fixing it won't be lost. I'll see what I can do for 1.50, if not then we'll try for 1.51. Thanks. --Lorenzo -- View this message in context: http://boost.2283326.n4.nabble.com/boost-type-traits-has-equal-to-std-vector... Sent from the Boost - Dev mailing list archive at Nabble.com.