Remove ext::optional shim — migrate to std::optional#7
Open
tobydrinkall wants to merge 2 commits into
Open
Conversation
Mechanical replacement across 80 source files: - ext::optional<T> -> std::optional<T> - ext::nullopt -> std::nullopt - #include <ql/optional.hpp> -> #include <optional> - Added #include <optional> to files that got ext:: transitively QL_USE_STD_OPTIONAL was already ON by default, so std::optional was already in use at runtime. This commit makes the source reflect that. Co-Authored-By: Toby Drinkall <toby.drinkall@cognition.ai>
- ql/optional.hpp: reduced to thin deprecated #include <optional> (ext:: namespace aliases removed; the Boost fallback path and #error guard are gone) - QL_USE_STD_OPTIONAL removed from: CMakeLists.txt, CMakePresets.json, configure.ac, ql/userconfig.hpp, ql/config.hpp.cfg, .ci/userconfig*.alt.hpp, Docs/pages/config.docs - Docs/pages/modernization.docs updated to reflect completion - AGENTS.md updated: optional migration marked done, next shims listed 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:
|
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
Eliminates the
ql/optional.hppBoost compatibility shim — the one with the proven silent-correctness landmine (#erroron Boost ≥ 1.91 becauseboost::optionalsilently changed pricing behavior). All 80 source files now usestd::optional/std::nulloptdirectly via#include <optional>.Commit 1 — Mechanical migration across 80 files:
Files that previously got
ext::optionaltransitively now#include <optional>directly.Commit 2 — Remove the shim infrastructure:
ql/optional.hpp→ thin deprecated#include <optional>(backward compat)QL_USE_STD_OPTIONALremoved fromCMakeLists.txt,CMakePresets.json,configure.ac,ql/userconfig.hpp,ql/config.hpp.cfg,.ci/userconfig*.alt.hpp,Docs/pages/config.docsDocs/pages/modernization.docsandAGENTS.mdupdated to reflect completionVerification (local — CI is disabled on this fork)
cmake -B build … && cmake --build build -j$(nproc))ctest --test-dir build, 1 321 test cases)mastergrepfor leftoverext::optional/ext::nullopt/boost::optionalQL_USE_STD_OPTIONALwas already defaulted ON, sostd::optionalwas already in use at runtime — this migration makes the source reflect that and removes the dead Boost fallback path.This is step 1 of the recommended shim removal order per
Docs/pages/modernization.docs: optional → any → functional/tuple → shared_ptr.Link to Devin session: https://app.devin.ai/sessions/6cd4407d1a444c899fd3e01ef6375072
Requested by: @tobydrinkall
Devin Review