20 Commits

Author SHA1 Message Date
Victor Zverovich 46cf422f54 Unify copyright notices 2026-05-31 08:54:06 -07:00
Victor Zverovich 7ffc3ca15b Minor cleanup 2025-08-16 12:20:02 -07:00
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
Diego Ramírez cf1f55f798 Specialize formatter for all std::basic_string types (#3943)
* Specialize `formatter` for all `std::basic_string` types

* mock-allocator: add member types to make GCC 4.8 happy
2024-04-23 08:44:41 -07:00
Victor Zverovich 297b22f585 Remove <memory> dependency 2024-01-12 09:09:19 -08:00
Kevin Hwang e7d6eb6794 Update tests to use recommended MOCK_METHOD (#3395) 2023-04-20 13:16:21 -07:00
Victor Zverovich 9155e2de4c Cleanup tests 2021-05-01 17:11:45 -07:00
Alexey Ochapov 53ca0cbe75 gtest: move GTest/GMock files to separate directory, update GTest/GMock usages
* all GTest/GMock files moved to `test/gtest` directory
* `CMakeLists.txt` created in `test/gtest` from `CMakeLists.txt` in `test`
* GTest/GMock target in CMake renamed to `gtest` (was `gmock`)
* CMake `gtest` target updated to export includes as "gtest/gtest.h" or "gmock/gmock.h" only
* includes in tests updated: "gtest.h" -> "gtest/gtest.h", "gmock.h" -> "gmock/gmock.h"
* removed duplications of `target_include_directories` for GTest/GMock directories (CMake manages them)
2021-04-29 07:11:49 -07:00
Victor Zverovich 7f723fbcb8 Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
Victor Zverovich 4639843839 Cleanup 2019-06-15 09:44:51 -07:00
Victor Zverovich d07cc2026b FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr 2019-05-30 07:42:36 -07:00
Victor Zverovich 58b6f8db48 Format the code using clang-format 2019-01-13 06:58:20 -08:00
Victor Zverovich 20c708bf6d Fix build on gcc 4.4 2018-10-24 10:52:02 -07:00
Victor Zverovich 3f4984fb36 Clean core-test and fix linkage errors on older gcc 2018-09-19 12:24:38 -07:00
Victor Zverovich c178ab440f Remove FMT_USE_RVALUE_REFERENCES 2018-07-22 15:07:53 -07:00
Elias Kosunen 691a7a91a1 Add more compilers to CI and increase FMT_PEDANTIC warning levels (#736)
* Add a _lot_ more warnings to FMT_PEDANTIC
Fix these warnings

* Add more compilers to CI
Fix (some) of the compiler errors with them

* Enable -Werror on CI
Increase warning level on MSVC when compiling with FMT_PEDANTIC

* Add VS 2013 and 2015 to Appveyor

* Fix Appveyor tests
Formatting

* Implement requested changes
Fix some of the MSVC warnings
Implement C++11 integer_sequence

* Reintroduce appveyor-build.py

* Remove ranges-test from tests

* Remove (some) explicit warning suppressions
Fix C++ standard setting in CI

* Remove (some) explicit warning suppressions
Fix C++ standard setting in CI

* Fix test builds with C++11

* Enable pedantic warnings on tests

* Fix warnings from edits to master

* Cleanups

* Add C++11 support to ranges.h
Re-enable ranges-test
Fix a Visual Studio error about function not returning a value in printf.h
Fix a bug in .travis.yml
2018-06-06 15:57:59 +02:00
Victor Zverovich 86a9bc8291 Cleanup 2018-03-04 09:16:51 -08:00
Victor Zverovich cdfcee27fb Use allocator_traits if available 2018-02-10 06:51:13 -08:00
Victor Zverovich 8b9a6e03f6 Test buffer 2014-10-01 08:12:10 -07:00
Victor Zverovich d1ded569ff Separate memory management and formatting
Array is split into an abstract Buffer class and a concrete MemoryBuffer class. BasicWriter now does all memory allocation through a Buffer object. Subclasses of BasicWriter may use different buffer types. The new BasicMemoryBuffer class uses the default MemoryBuffer.
2014-09-29 08:48:16 -07:00