Title
Insufficient requirements for tuple::operator<()
Status
c++11
Section
[tuple.rel]
Submitter
Joe Gottman

Created on 2010-05-15.00:00:00 last changed 162 months ago

Messages

Date: 2010-11-23.13:22:14

Proposed resolution:

  1. Change [tuple.rel] before p. 4 as indicated [Remark to the editor: This paragraph doesn't have a number yet, but it seems to me as if it should have one]:
    template<class... TTypes, class... UTypes>
    bool operator<(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
    

    Requires: For all i, where 0 <= i and i < sizeof...(Types), get<i>(t) < get<i>(u) and get<i>(u) < get<i>(t)is a valid expression returning a type that is are valid expressions returning types that are convertible to bool. sizeof...(TTypes) == sizeof...(UTypes).

Date: 2010-11-23.13:22:14

[ Adopted at 2010-11 Batavia ]

Date: 2010-10-21.19:06:53

[ Post-Rapperswil ]

Moved to Tentatively Ready with updated wording correcting change-bars after 6 positive votes on c++std-lib.

Date: 2010-05-15.00:00:00

The requirements section for std::tuple says the following:

Requires: For all i, where 0 <= i and i < sizeof...(Types), get<i>(t) < get<i>(u) is a valid expression returning a type that is convertible to bool. sizeof...(TTypes) == sizeof...(UTypes).

This is necessary but not sufficient, as the algorithm for comparing tuples also computes get<i>(u) < get<i>(t) (note the order)

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-11-23 13:22:14adminsetmessages: + msg5405
2010-11-14 13:10:57adminsetstatus: voting -> wp
2010-11-08 14:14:39adminsetstatus: ready -> voting
2010-10-21 19:06:53adminsetmessages: + msg4774
2010-10-21 19:06:53adminsetstatus: new -> ready
2010-10-21 18:28:33adminsetmessages: + msg1626
2010-05-15 00:00:00admincreate