Skip to content

fix(build): include <stdexcept> for std::runtime_error - #1

Merged
AlexanderSlaa merged 1 commit into
SourceRegistry:mainfrom
wido:fix/include-stdexcept
Nov 21, 2026
Merged

AlexanderSlaa merged 1 commit into
SourceRegistry:mainfrom
wido:fix/include-stdexcept

Conversation

@wido

@wido wido commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

src/common.h throws std::runtime_error but never includes <stdexcept>. Older GCC versions pull it in through another header, but GCC 15 doesn't, so the build fails:

../src/common.h:37:41: error: 'runtime_error' is not a member of 'std'

Seen on Ubuntu with GCC 15.2. The fix is a single include.

common.h throws std::runtime_error but relied on another standard header to
declare it. GCC 15 no longer pulls it in transitively, so the addon fails to
build with "'runtime_error' is not a member of 'std'".

@AlexanderSlaa AlexanderSlaa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

Verified. On main, compiling src/*.cpp with GCC 15.3 (gcc:15 image) fails with exactly the error in the description. With this change every source file compiles cleanly with -Wall -Wextra -Wpedantic.

The other open PRs (#2–#6) also only compile on GCC 15 once this include is in, so this one should land first.

@AlexanderSlaa
AlexanderSlaa merged commit 0d44095 into SourceRegistry:main Nov 21, 2026
9 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 21, 2026
# [1.1.0](v1.0.3...v1.1.0) (2026-11-21)

### Bug Fixes

* **build:** include <stdexcept> for std::runtime_error ([#1](#1)) ([0d44095](0d44095))
* **rados:** refuse io context setting changes while operations are in flight ([#2](#2)) ([dd3f83b](dd3f83b))

### Features

* name the errno of a CephError in codeName ([#5](#5)) ([ff3568d](ff3568d))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants