93 Commits

Author SHA1 Message Date
Érico Nogueira Rolim 5ad7df63cd Don't use FTMs to determine implementation choice 2022-11-11 16:29:45 -05:00
Glen Fernandes 38e3b41e9f Correct regression in align 2020-09-01 20:15:37 -04:00
Glen Fernandes 05bfdf34c0 Add user option to make aligned_alloc use operator new 2020-05-12 11:00:54 -04:00
Glen Fernandes 6e30998236 Update fallback implementation of align and correct overflow check 2020-04-27 10:09:47 -04:00
Edward Diener 739213ee63 Change __CODEGEARC__ to BOOST_CODEGEARC, which is defined in Boost config for the Embarcadero non-clang-based compilers. (#12) 2020-04-16 11:36:53 -04:00
Glen Fernandes b8e81e10be Update aligned_alloc support on older mingw32 2020-02-29 16:47:48 -05:00
Glen Fernandes c1000b7cfa Mark throw_exception with BOOST_NORETURN 2019-08-27 09:09:27 -04:00
Glen Fernandes 2034d86f42 Revise implementation of align_up and align_down
Use original implementation; silences C4146 on MSVC.
2019-05-20 13:52:54 -04:00
Glen Fernandes dddc9046b5 Add additional construct overload 2019-05-19 23:46:51 -04:00
Glen Fernandes f8907c99d7 Support aligned_allocator<void> without specialization 2019-05-18 13:50:47 -04:00
Glen Fernandes 8caa2c0af0 Support for any integral and any pointer types
Covers is_aligned, align_up, and align_down.
2019-05-18 08:36:54 -04:00
Glen Fernandes f085cf1411 Correct new throw_exception detail helper implementation 2019-04-28 01:51:20 -04:00
Glen Fernandes 30708c301d Update implementation of aligned_allocator and aligned_allocator_adaptor 2019-04-27 19:36:02 -04:00
Glen Fernandes 596d8ec67b Add workaround and update tests for Windows Clang variant 2019-04-23 19:16:04 -04:00
Glen Fernandes 25b1b0afd8 Fully qualify call to align 2018-11-27 08:50:01 -05:00
Glen Fernandes 477668e548 Allow instantiation of allocator templates with incomplete types
MSVC's allocate_shared rebinds allocators to an incomplete value type.
2018-11-25 16:05:35 -05:00
Glen Fernandes 29e4266923 Use to_address free function instead of pointer_traits member 2017-11-23 22:27:29 -05:00
Glen Fernandes 02658f6674 Use pointer_traits.to_address to obtain address 2017-05-24 00:18:16 -04:00
Glen Fernandes 0159119d55 Utility to obtain raw pointer from allocator pointer 2017-05-12 07:14:26 -04:00
Glen Fernandes 9f6361fc66 Remove conditional value_type typedef and update documentation 2017-05-03 23:23:53 -04:00
Glen Fernandes 6147f01a6d Reformat source; wrap at 80 characters 2017-05-03 08:44:31 -04:00
Glen Fernandes 741591fac6 Add back the early return for zero size allocation 2017-03-23 22:48:26 -04:00
Glen Fernandes f90f7ba4f2 Correct unit tests for adaptor and trait 2017-03-23 22:48:26 -04:00
Glen Fernandes 3bfcbc523f Revise code, documentation, tests 2017-03-23 22:48:26 -04:00
Glen Fernandes 39a372ea59 Clean up align_up align_down header organization 2017-02-28 22:15:49 -05:00
Glen Fernandes d86fbd4be3 Update comments to pass Boost inspect 2017-02-01 22:54:21 -05:00
Glen Fernandes f0ed3a34ff Revert unit tests to use automatic allocation 2016-08-29 22:10:41 -04:00
Glen Fernandes 8b8cae741a Do not remove is_aligned overload (by request) 2016-08-23 06:38:01 -04:00
Tim Blechmann bb7a12eb97 aligned_allocator: cast away const-ness in construct
clang compile fix: adding entries into a std::map via operator[] calls
construct() on a const pointer.
2016-08-12 19:18:10 -04:00
Glen Fernandes 9fa8e7e5c1 Remove is_aligned overload 2016-04-02 14:51:42 -04:00
Glen Fernandes 5c1da00200 Use __typeof__ for clang assume_aligned 2016-02-08 08:34:29 -05:00
Glen Fernandes 7b8bcb5e3e Use __typeof__ instead of typeof with GCC 2016-02-07 17:04:50 -05:00
Glen Fernandes c60c73c1ac Remove aligned_alloc customization for now 2016-02-07 16:47:32 -05:00
Glen Fernandes df0e5eaa85 Update GCC implementation of assume_aligned
Allow use with pointer types other than void pointers.
2016-02-07 16:12:02 -05:00
Glen Fernandes 1f829685e0 Simplify allocation function customization 2015-12-30 00:19:56 -05:00
Glen Fernandes 75a026e0fd Move portable code out of detail 2015-12-30 00:10:31 -05:00
Glen Fernandes 48b3792fa1 Minor cosmetic changes in functions 2015-12-20 09:52:30 -05:00
Glen Fernandes 8f53dc3a0b Update align implementation and tests 2015-12-20 02:33:50 -05:00
Glen Fernandes 7f5f5219f9 Support custom allocation for aligned_alloc 2015-12-19 18:48:45 -05:00
Glen Fernandes e06e7dbf8b Clean up includes and refactor aligned_alloc 2015-12-19 17:51:56 -05:00
Glen Fernandes 07c4cc008e Minor formatting changes 2015-12-18 08:39:39 -05:00
Glen Fernandes e8e61532fe Relax requirements on wrapped allocator 2015-12-17 20:32:48 -05:00
Glen Fernandes 6e72b6adf7 Add alignment_of_v variable template for C++14 2015-12-16 19:03:53 -05:00
Giel van Schijndel fb729cf869 Use fallback implementation for aligned alloc on WinCE
MSVC doesn't provide aligned allocation functions for Windows CE, so
don't attempt to use the ones for MSVC there.
2015-12-16 18:04:31 -05:00
Glen Fernandes 2fe6991bad Change interface of align_up and align_down 2015-12-16 07:28:09 -05:00
Glen Fernandes e0e5640d45 Add integral overloads of is_aligned, align_up, align_down 2015-12-16 00:40:49 -05:00
Glen Fernandes fa72ba63ea Add align_up, align_down and other minor changes 2015-12-15 23:00:57 -05:00
Glen Fernandes 2d97f75083 Remove noexcept specifier from defaulted constructor 2015-11-08 15:02:39 -05:00
Glen Fernandes 63453133f3 Missing include in alignment_of_msvc.hpp 2015-10-29 23:06:22 -04:00
Glen Fernandes b42a30ff33 Do not use offsetof for MSVC 7.1 compatibility 2015-10-28 22:55:33 -04:00