HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D13860

Details

Provenance
fanquake <fanquake@gmail.com>Authored on Jan 20 2023, 10:22
majcostaCommitted on May 4 2023, 15:39
majcostaPushed on May 4 2023, 15:39
Reviewer
Restricted Project
Differential Revision
D13860: [backport#26924] refactor: Add missing includes to fix gcc-13 compile error
Parents
rABCedc40e689a38: [Chronik] Add `Tx.size` to protobuf
Branches
Unknown
Tags
Unknown