Skip to content

keep detail::Join compilable with exceptions disabled - #195

Merged
Taywee merged 1 commit into
Taywee:masterfrom
metsw24-max:join-no-exceptions
Jul 29, 2026
Merged

keep detail::Join compilable with exceptions disabled#195
Taywee merged 1 commit into
Taywee:masterfrom
metsw24-max:join-no-exceptions

Conversation

@metsw24-max

Copy link
Copy Markdown
Contributor

Unguarded try/catch in detail::Join

Every other try/catch in the header sits behind #ifndef ARGS_NOEXCEPT, so -fno-exceptions -DARGS_NOEXCEPT used to build; since the reserve guard landed it stops at args.hxx:401 with cannot use 'try' with exceptions disabled (6.4.16 compiles, 6.5.0 onwards does not). I dropped the guard rather than adding another #ifndef, since it only covers res.reserve(total) while the append loop below allocates the same memory unguarded, so it was not really buying anything.

The new no_exceptions test is built with exceptions off under both CMake and meson, so it fails to compile on master and passes here; the throwing helpers in test_helpers.hxx had to move behind __cpp_exceptions for it to use them.

@Taywee

Taywee commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Good catch, and the PR looks good. Thanks for the fix.

@Taywee
Taywee merged commit 6bfd2c7 into Taywee:master Jul 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants