Page MenuHomePhabricator

[backport#26924] refactor: Add missing includes to fix gcc-13 compile error
ClosedPublic

Authored by majcosta on May 4 2023, 15:13.

Details

Summary

Pull request description:

On current master:

```
  CXX      support/libbitcoin_util_a-lockedpool.o
support/lockedpool.cpp: In member function ‘void Arena::free(void*)’:
support/lockedpool.cpp:99:20: error: ‘runtime_error’ is not a member of ‘std’
   99 |         throw std::runtime_error("Arena: invalid or double free");
      |                    ^~~~~~~~~~~~~
support/lockedpool.cpp:22:1: note: ‘std::runtime_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’?
   21 | #include <algorithm>
  +++ |+#include <stdexcept>
   22 | #ifdef ARENA_DEBUG
support/lockedpool.cpp: In member function ‘void LockedPool::free(void*)’:
support/lockedpool.cpp:320:16: error: ‘runtime_error’ is not a member of ‘std’
  320 |     throw std::runtime_error("LockedPool: invalid address not pointing to any arena");
      |                ^~~~~~~~~~~~~
support/lockedpool.cpp:320:16: note: ‘std::runtime_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’?

This is a backport of core#26924

Test Plan
ninja all