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: Keith Seitz <keiths@redhat.com>
1 file changed