Skip to content
Commit 96917d05 authored by Simon Marchi's avatar Simon Marchi
Browse files

gdbsupport/intrusive-list: sprinkle noexcept

Some methods of intrusive_list are marked noexcept.  But really,
everything in that file could be noexcept.  Add it everywhere.

The only one I had a doubt about is clear_and_dispose: what if the
disposer throws?  The boost equivalent [1] is noexcept and requires the
disposer not to throw.  The rationale is probably the same as for
destructors.  What if the disposer throws for an element in the middle
of the list?  Do you skip the remaining elements?  Do you swallow the
exception and keep calling the disposer for the remaining elements?
It's simpler to say no exceptions allowed.

[1] https://www.boost.org/doc/libs/1_79_0/doc/html/boost/intrusive/list.html#idm33710-bb



Change-Id: I402646cb12c6b7906f4bdc2ad85203d8c8cdf2cc
Reviewed-by: default avatarKeith Seitz <keiths@redhat.com>
parent a1371f32
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment