From 6ba05a4760c816b3d3461019aad32d4c1b7b11ea Mon Sep 17 00:00:00 2001 From: "Justin A. Irwin" Date: Sat, 23 May 2020 20:43:40 -0400 Subject: [PATCH] Define rebind template struct in fftw_allocator to compile with GCC 9. Newer versions of the STL library apparently use rebind in places they did not before. Because fftw_allocator inherits from std::allocator, it also inherits that rebind unless it is overridden. This caused std::vector to be unable to compile with fftw_allocator due to the mismatch of allocator types. --- sdr/libraries/fftlib/cpp/include/fftw_allocator.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdr/libraries/fftlib/cpp/include/fftw_allocator.h b/sdr/libraries/fftlib/cpp/include/fftw_allocator.h index d0b8080..3404abe 100644 --- a/sdr/libraries/fftlib/cpp/include/fftw_allocator.h +++ b/sdr/libraries/fftlib/cpp/include/fftw_allocator.h @@ -38,6 +38,11 @@ throw "fftwf_allocator bad type - must be float or complex only"; } + template + struct rebind { + typedef fftwf_allocator other; + }; + typedef typename std::allocator::size_type size_type; typedef typename std::allocator::difference_type difference_type; typedef typename std::allocator::pointer pointer;