Murat Toprak 0d145936ec
Handle allocator propagation in basic_memory_buffer::move, Fix #4487 (#4490)
* Handle allocator propagation in basic_memory_buffer::move

Update `basic_memory_buffer::move` to respect `propagate_on_container_move_assignment`allocator trait.
If the allocator should not propagate and differs from the target's allocator,
fallback to copying the buffer instead of transferring ownership.

This avoids potential allocator mismatch issues and ensures exception safety.

* Add test cases for the updated move ctor

- Added two test cases `move_ctor_inline_buffer_non_propagating` and `move_ctor_dynamic_buffer_non_propagating`
- Added `PropageteOnMove` template parameter to `allocator_ref` class to be compatible with the old test cases
- `allocator_ref` now implements `!=` and `==` operators
2025-08-09 08:14:15 -07:00
..
add-subdirectory-test Add base.h 2024-01-09 19:36:12 -08:00
compile-error-test Cleanup 2024-09-06 12:41:53 -07:00
cuda-test Add base.h 2024-01-09 19:36:12 -08:00
find-package-test Bump tested CMake version to 3.25 2022-11-30 08:09:32 -08:00
fuzzing Add base.h 2024-01-09 19:36:12 -08:00
gtest Backport from GoogleTest: "Work around a maybe-uninitialized warning under GCC 12" (0320f517fd) 2024-09-05 09:40:55 -07:00
static-export-test Bump tested CMake version to 3.25 2022-11-30 08:09:32 -08:00
args-test.cc Allow getting size of dynamic format arg store (#4270) 2024-12-18 19:54:35 -08:00
assert-test.cc Add base.h 2024-01-09 19:36:12 -08:00
base-test.cc Properly constrain detail::copy optimization (#4474) 2025-06-21 06:59:35 -07:00
chrono-test.cc Fix localization and formatting of timezone names 2025-04-13 09:52:59 -07:00
CMakeLists.txt Test FMT_BUILTIN_TYPES 2024-10-04 16:08:46 -07:00
color-test.cc fix buffer overflow on all emphasis flags set (#4498) 2025-07-20 10:43:33 -07:00
compile-fp-test.cc Fix constness 2024-01-14 06:44:38 -08:00
compile-test.cc Test non-SSO constexpr string formatting 2025-06-20 07:10:12 -07:00
detect-stdfs.cc Fix std::variant, std::filesystem::path tests on GCC-8, Clang-7,8. 2022-07-02 08:34:52 -07:00
enforce-checks-test.cc Workaround C complex.h idiocy 2022-09-03 06:35:55 -07:00
format-impl-test.cc Don't specialize std::is_floating_point 2025-04-26 08:17:05 -07:00
format-test.cc Handle allocator propagation in basic_memory_buffer::move, Fix #4487 (#4490) 2025-08-09 08:14:15 -07:00
gtest-extra-test.cc Improve the pipe API 2024-01-01 15:55:37 -08:00
gtest-extra.cc Improve the pipe API 2024-01-01 15:55:37 -08:00
gtest-extra.h Make gtest-extra-test more portable 2023-11-24 10:09:21 -08:00
header-only-test.cc Add base.h 2024-01-09 19:36:12 -08:00
mock-allocator.h Handle allocator propagation in basic_memory_buffer::move, Fix #4487 (#4490) 2025-08-09 08:14:15 -07:00
module-test.cc Improve module testing (#3397) 2023-05-03 07:56:24 -07:00
no-builtin-types-test.cc Update and apply clang-format 2025-05-03 07:29:31 -07:00
noexception-test.cc Add base.h 2024-01-09 19:36:12 -08:00
os-test.cc Cleanup os-test 2025-07-04 10:52:59 -07:00
ostream-test.cc Fix constness 2024-01-14 06:44:38 -08:00
perf-sanity.cc Cleanup test 2024-07-17 06:59:24 -07:00
posix-mock-test.cc Fix constness 2024-01-14 06:44:38 -08:00
posix-mock.h Apply coding conventions 2023-12-30 16:07:35 -08:00
printf-test.cc Fix compilation errors due to make_format_args in gcc 14.1.1 with c++20 (#4042) 2024-07-03 12:41:08 -07:00
ranges-odr-test.cc Make ranges only depend on fmt/base.h 2024-01-13 09:54:19 -08:00
ranges-test.cc Update and apply clang-format 2025-05-03 07:29:31 -07:00
scan-test.cc Add opt out for built-in types 2024-08-29 11:21:29 -07:00
scan.h Add double and float support to scan test 2025-06-21 06:57:20 -07:00
std-test.cc Minor cleanup 2025-05-11 07:54:23 -07:00
test-assert.h Relax constexpr 2024-09-29 10:04:57 -07:00
test-main.cc Fixed all clang -Wreserved-id-macro warnings (on macOS at least) 2022-03-24 07:33:43 -07:00
unicode-test.cc Demacrify UTF-8 check 2024-09-13 18:41:10 -07:00
util.cc Add opt out for built-in types 2024-08-29 11:21:29 -07:00
util.h Use actual example code and move safe_fopen to os-test 2025-07-04 09:50:55 -07:00
xchar-test.cc Add xchar support for std::byte formatter (#4480) 2025-06-23 14:02:11 -07:00