[Bug libstdc++/35480] Relational operators for <tr1/tuple> don't error on different sized tuples
chris at bubblescope dot net
gcc-bugzilla@gcc.gnu.org
Thu Mar 6 17:11:00 GMT 2008
------- Comment #6 from chris at bubblescope dot net 2008-03-06 17:11 -------
While I agree that this is an issue of implementation detail, I thought there
was code already there to stop this case, except it is broken :(
Looking at the svn copy of tr1/tuple, you can see operator== (and others)
delegate to _tuple_compare, passing the first parameter:
tuple_size<_Tp>::value - tuple_size<_Tp>::value
Which should be:
tuple_size<_Tp>::value - tuple_size<_Up>::value
The template which accepts this is only implemented for this value being 0, so
any other value produces a compile time error.
I broke this (woops) in r91171, back in 2004. The code has continued to be
updated as tuple has changed, and no-one seems to have noticed it made no sense
;)
--
chris at bubblescope dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |chris at bubblescope dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35480
More information about the Gcc-bugs
mailing list