
--- Jaakko Jarvi <jarvi@cs.tamu.edu> wrote:
On Nov 25, 2005, at 11:14 AM, John Maddock wrote:
There appear to be other problems with the comparison operators, these are required to use only operators == and < on the types held by the tuple, but given:
struct strict_comparison1{}; struct strict_comparison2{}; bool operator==(const strict_comparison1&, const strict_comparison1&); bool operator<(const strict_comparison1&, const strict_comparison1&); bool operator==(const strict_comparison2&, const strict_comparison2&); bool operator<(const strict_comparison2&, const strict_comparison2&); bool operator==(const strict_comparison1&, const strict_comparison2&); bool operator<(const strict_comparison1&, const strict_comparison2&); bool operator==(const strict_comparison2&, const strict_comparison1&); bool operator<(const strict_comparison2&, const strict_comparison1&);
Then trying to instantiate the operators with:
// strict comparisons: const std::tr1::tuple<strict_comparison1, strict_comparison2> comp1, comp2; verify_return_type(comp1 == comp2, false); verify_return_type(comp1 != comp2, false); verify_return_type(comp1 < comp2, false); verify_return_type(comp1 > comp2, false); verify_return_type(comp1 <= comp2, false); verify_return_type(comp1 >= comp2, false);
Fails with some extremely criptic error messages in operator!=
Joel asked me to have a look at the fusion1 TR1 stuff. I've had a go at the support for pairs in tuple_element, tuple_size, and get. I've just modified the operators based on the comments above as well. I've updated some of the fusion tests, but I've not had chance to run your TR1 test material yet. My tests were compiled against mingw gcc, and all was ok. Anyway, hope this is helpful, let me know if there are any (other) problems. Cheers Dan ___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com