kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
Log | Files | Refs | README

commit 4692b18a244f65207b5d2c2f0451ff54f50474c0
parent 7a4a567a6233b7fddabfeb3f87943d7595bf6a89
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date:   Mon, 25 Nov 2019 11:57:47 +0000

Fix for limited C++17

Diffstat:
Minclude/kfr/base/memory.hpp | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/kfr/base/memory.hpp b/include/kfr/base/memory.hpp @@ -219,17 +219,19 @@ constexpr inline bool operator!=(const allocator<T1>&, const allocator<T2>&) CMT struct aligned_new { - inline static void* operator new(size_t size) { return aligned_allocate(size); } - inline static void operator delete(void* ptr) { return aligned_deallocate(ptr); } + inline static void* operator new(size_t size) noexcept { return aligned_allocate(size); } + inline static void operator delete(void* ptr) noexcept { return aligned_deallocate(ptr); } - inline static void* operator new(size_t size, std::align_val_t al) +#ifdef __cpp_aligned_new + inline static void* operator new(size_t size, std::align_val_t al) noexcept { return internal_generic::aligned_malloc(size, std::max(size_t(32), static_cast<size_t>(al))); } - inline static void operator delete(void* ptr, std::align_val_t al) + inline static void operator delete(void* ptr, std::align_val_t al) noexcept { return internal_generic::aligned_free(ptr); } +#endif }; #define KFR_CLASS_REFCOUNT(cl) \