This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/41351] std::rotate on RAI does not conform to ISO complexity requirement
- From: "chris at bubblescope dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2009 14:45:22 -0000
- Subject: [Bug libstdc++/41351] std::rotate on RAI does not conform to ISO complexity requirement
- References: <bug-41351-18186@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #19 from chris at bubblescope dot net 2009-09-15 14:45 -------
I think this generally looks good. The testsuite could do with some
improvement, there are quite a lot of cases for this algorithm, and it's
probably worth testing they all work properly.
I unfortunately cam't execute the code at the moment so I apologise if this is
wrong, but it looks like the existing code works fine with
std::rotate(NULL,NULL,NULL), while yours will break. It's not even completely
clear if this should work, but as a QOI issue it would probably be nice if it
did. In general, checking all rotates of length 0 to 10ish would I think be a
nice check that your code works properly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41351