Add ADL swap() function. - #128
Merged
Merged
Conversation
Kim-J-Smith
commented
Aug 9, 2026
Merged
Kim-J-Smith
added a commit
that referenced
this pull request
Aug 14, 2026
**🔧 Fixed Bugs** - Fixed freestanding support: `throw_or_terminate()` now uses `std::terminate()` and the `std::function` overload of `not_empty()` is skipped when `__STDC_HOSTED__` is not defined. (#132) - Fixed GCC 16 ipa-cp devirtualization failure by adding `gcc_ipa_cp_friendly_cast()` so indirect calls via `m_invoker` are tracked correctly (see issue #133). (#134) - Fixed `-Wuninitialized` warning by explicitly initializing `Base_MemberVariable` in the default/`nullptr_t`/functor constructors. (#136) - Fixed the benchmark bug in `MoveOnlyFunction.Params.SmallTrivial` (wrong `volatile void*` usage). (#137) **⚠️ Breaking Changes** - None. **✨ New Features** - Added [ngcpp/proxy](https://github.com/ngcpp/proxy) as a benchmark target, with `proxy` cases added to all runtime benchmark suites (headers vendored in `benchmark/runtime/proxy/`). (#137) - Added an ADL swap() free function for exchanging two same-type wrappers. (#128) **🛠️ Optimizations and Improvements** - Constructed `ErasurePass` directly with const pointers, adding dedicated constructors for const/volatile-qualified erased pointers. (#134) - Simplified `operator()` by inlining the invoker call and dropping the `invoke()` helper from the command tables and removing unnecessary `const_cast`. (#134) - Benchmarks now build with `-O2` (was `-Os`) to avoid the strange bug in MinGW, and benchmark parameters were adjusted (`BENCHMARK_TIMES {1000, 1000000}`, `BENCHMARK_REPEAT 15`). (#137) - Updated benchmark CI to GCC-16 on Ubuntu 26.04, and README benchmark results (GCC-16, C++23, `-O2`). (#137) - Enabled sanitizers in the test suite (non-Windows): GCC tests build with `-fsanitize=address` and Clang tests build with `-fsanitize=address,undefined`. (#130) - Defining `DEBUG` now forces the debug diagnostics (assertions and terminate checks) to stay active even when `NDEBUG` or `__OPTIMIZE__` is defined. (#136) - Added `[[msvc::intrinsic]]` to `gcc_ipa_cp_friendly_cast()` to help MSVC inline. (#135) **📌 Notes** - Benchmark now requires C++20 because of the `proxy` dependency.
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.
feat & perf: add ADL swap() function.
ADLSwapBenchmark.fn_swap_trivial:
ADLSwapBenchmark.fn_swap_non_trivial: