Repository navigation
Pre-release checkpoint for v2.5.2 - #255
Merged
Merged
Conversation
Merged
Kim-J-Smith
added a commit
that referenced
this pull request
Oct 31, 2026
**🔧 Fixed Bugs** - Fixed undefined behavior when an owning wrapper constructor throws. The destructor is now defined in the most-derived wrapper class. (#245) - Added missing header file `<memory>` for `std::addressof`. (#247) - Fixed a bug that caused `make_fn<Sig>(variadic_function)` to trigger a hard error. (#248) - Fixed potential undefined behavior in the trivial clone path: the address of the empty `erasure_base_t` subobject may differ from the derived erasure object, so `memcpy` now operates on the derived type instead of the base pointer. (#251) **⚠️ Breaking Changes** - None. **✨ New Features** - None. **🛠️ Optimizations and Improvements** - Removed the unused internal `crtp_mixins::destructor_impl` base and the view specialization of `crtp_mixins::lifetime_operations_impl`. Owning wrappers now declare their destructor directly, and view wrappers no longer inherit a lifetime-operations base. No user-visible API change. (#245) - Removed redundant internal traits and adjusted some comments' position. (#246) - MSVC: Annotated the `fn_ref` callable constructor with `[[msvc::lifetimebound]]`. (#249) - MSVC: Added the `_Notnull_` SAL annotation from `<sal.h>` to the `fn_ref` function-pointer constructor. (#249) - Copyable function wrappers can now wrap callable objects with a deleted move constructor. (#250) - The `fn_ref` conversion constructor now uses `sizeof(erasure_type::ErasureRefStorage)` instead of `default_values::non_owning::buffer_size` when copying the stored reference. No user-visible API change. (#251) **📌 Notes** - `operator bool` still works but may warn. It will be removed in a future release.
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.
🔧 Fixed Bugs
<memory>forstd::addressof. (Add missing header file<memory>forstd::addressof. #247)make_fn<Sig>(variadic_function)to trigger a hard error. (Fix a bug wheremake_fn<Sig>(variadic_function)caused a hard error. #248)erasure_base_tsubobject may differ from the derived erasure object, somemcpynow operates on the derived type instead of the base pointer. (Fix undefined behavior in the trivial clone path. #251)✨ New Features
🛠️ Optimizations and Improvements
crtp_mixins::destructor_implbase and the view specialization ofcrtp_mixins::lifetime_operations_impl. Owning wrappers now declare their destructor directly, and view wrappers no longer inherit a lifetime-operations base. No user-visible API change. (Fix UB when an owning wrapper constructor throws. #245)fn_refcallable constructor with[[msvc::lifetimebound]]. (Add MSVC annotation for better diagnostic. #249)_Notnull_SAL annotation from<sal.h>to thefn_reffunction-pointer constructor. (Add MSVC annotation for better diagnostic. #249)IsCopyableistrue. #250)fn_refconversion constructor now usessizeof(erasure_type::ErasureRefStorage)instead ofdefault_values::non_owning::buffer_sizewhen copying the stored reference. No user-visible API change. (Fix undefined behavior in the trivial clone path. #251)📌 Notes
operator boolstill works but may warn. It will be removed in a future release.