Skip to content

Remove ext::optional shim; use std::optional directly#4

Open
tobydrinkall wants to merge 2 commits into
masterfrom
devin/1780666109-remove-optional-shim
Open

Remove ext::optional shim; use std::optional directly#4
tobydrinkall wants to merge 2 commits into
masterfrom
devin/1780666109-remove-optional-shim

Conversation

@tobydrinkall
Copy link
Copy Markdown

@tobydrinkall tobydrinkall commented Jun 5, 2026

Summary

Removes the ql/optional.hpp compatibility shim entirely and migrates all 261 uses of ext::optionalstd::optional and 130 uses of ext::nulloptstd::nullopt across 94 files. Deletes the QL_USE_STD_OPTIONAL configuration flag from all build systems (CMakeLists.txt, configure.ac, CMakePresets.json, config.hpp.cfg), CI alternate configs (.ci/userconfig*.alt.hpp), ql/userconfig.hpp, and Docs/pages/config.docs.

Why now: The default build was already on std::optional (flag defaulted ON). The shim #errors on Boost ≥ 1.91 due to a silent behavioral change in boost::optional that would corrupt pricing. Removing the shim eliminates this hazard entirely and drops dead code.

Binary equivalence: Since QL_USE_STD_OPTIONAL was already ON by default, this is a source-level cleanup with no binary change. The only CI config that exercised boost::optional was userconfig2019.alt.hpp (which had the flag OFF) — that path is now removed.

Verification: Full test suite passes locally (1,321 test cases, 182 suites, 286s runtime, 0 failures). Build verified clean with default CMake config on GCC 11.4 / Ubuntu / Boost 1.74.

Link to Devin session: https://app.devin.ai/sessions/125eb5207a6d4ed6b730387ce184af44
Requested by: @tobydrinkall


Devin Review

Status Commit
⚪ Not started

Run Devin Review

Open in Devin Review (Staging)
Open in Devin Review

The QL_USE_STD_OPTIONAL flag defaulted to ON and the Boost fallback
was deprecated (and blocked for Boost >= 1.91). This commit removes
the shim header ql/optional.hpp, replaces all ext::optional/ext::nullopt
with std::optional/std::nullopt, and removes the QL_USE_STD_OPTIONAL
configuration flag from all build systems, CI configs, and docs.

All tests pass unchanged, confirming no pricing impact.

Co-Authored-By: Toby Drinkall <toby.drinkall@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

devin-ai-integration[bot]

This comment was marked as resolved.

Co-Authored-By: Toby Drinkall <toby.drinkall@cognition.ai>
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.

1 participant