Remove ext::optional shim; use std::optional directly#4
Open
tobydrinkall wants to merge 2 commits into
Open
Conversation
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 EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Toby Drinkall <toby.drinkall@cognition.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the
ql/optional.hppcompatibility shim entirely and migrates all 261 uses ofext::optional→std::optionaland 130 uses ofext::nullopt→std::nulloptacross 94 files. Deletes theQL_USE_STD_OPTIONALconfiguration flag from all build systems (CMakeLists.txt,configure.ac,CMakePresets.json,config.hpp.cfg), CI alternate configs (.ci/userconfig*.alt.hpp),ql/userconfig.hpp, andDocs/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 inboost::optionalthat would corrupt pricing. Removing the shim eliminates this hazard entirely and drops dead code.Binary equivalence: Since
QL_USE_STD_OPTIONALwas already ON by default, this is a source-level cleanup with no binary change. The only CI config that exercisedboost::optionalwasuserconfig2019.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