public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/61645] New: forward_list::splice_after shall not throw exceptions
@ 2014-06-29  7:25 lh_mouse at 126 dot com
  2014-06-29 10:50 ` [Bug libstdc++/61645] " daniel.kruegler at googlemail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: lh_mouse at 126 dot com @ 2014-06-29  7:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61645

            Bug ID: 61645
           Summary: forward_list::splice_after shall not throw exceptions
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lh_mouse at 126 dot com

ISO/IEC 14882:2011

23.3.4.6 forward_list operations [forwardlist.ops]
void splice_after(const_iterator position, forward_list& x);
void splice_after(const_iterator position, forward_list&& x);
(... omitted ...)
3 Throws: Nothing. **
4 Complexity: O(distance(x.begin(), x.end()))



// test_case.cpp

#include <forward_list>

int main(){
    std::forward_list<int> l{1,2,3};
    static_assert(
        noexcept(l.splice_after(l.before_begin(), l)),
        "!!"
    ); // fails
    static_assert(
        noexcept(l.splice_after(l.before_begin(), l, l.before_begin())),
        "!!"
    ); // ditto
    static_assert(
        noexcept(l.splice_after(l.before_begin(), l, l.before_begin(),
l.end())),
        "!!"
    ); // ditto
}


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-28 13:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-29  7:25 [Bug libstdc++/61645] New: forward_list::splice_after shall not throw exceptions lh_mouse at 126 dot com
2014-06-29 10:50 ` [Bug libstdc++/61645] " daniel.kruegler at googlemail dot com
2014-06-29 16:44 ` redi at gcc dot gnu.org
2015-04-08 16:40 ` redi at gcc dot gnu.org
2015-04-28 13:06 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).