aboutsummaryrefslogtreecommitdiffstats
path: root/gr-fft
diff options
context:
space:
mode:
authorVasil Velichkov <vvvelichkov@gmail.com>2020-01-25 00:08:16 +0200
committerMartin Braun <martin.braun@ettus.com>2020-01-24 22:59:01 -0800
commita11d2e36c63a3011ab2b3407798b766068e31d8f (patch)
tree6dcbea23cd3d0cf424695c03cb8b1931e1398159 /gr-fft
parentAdded in/out selector msg ports (diff)
downloadgnuradio-a11d2e36c63a3011ab2b3407798b766068e31d8f.tar.xz
gnuradio-a11d2e36c63a3011ab2b3407798b766068e31d8f.zip
fft: Add message to static_assert
In c++11 the static_assert takes two parameters while in c++17 a version with only one parameter was added https://en.cppreference.com/w/cpp/language/static_assert Compilation on CentOS 7 with gcc 4.8.5 fails with gr-fft/lib/fft.cc:164:62: error: expected ',' before ')' token static_assert(sizeof(fftwf_complex) == sizeof(gr_complex));
Diffstat (limited to 'gr-fft')
-rw-r--r--gr-fft/lib/fft.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/gr-fft/lib/fft.cc b/gr-fft/lib/fft.cc
index c9c9f3199..e787f2f95 100644
--- a/gr-fft/lib/fft.cc
+++ b/gr-fft/lib/fft.cc
@@ -161,7 +161,8 @@ fft_complex::fft_complex(int fft_size, bool forward, int nthreads)
// Hold global mutex during plan construction and destruction.
planner::scoped_lock lock(planner::mutex());
- static_assert(sizeof(fftwf_complex) == sizeof(gr_complex));
+ static_assert(sizeof(fftwf_complex) == sizeof(gr_complex),
+ "The size of fftwf_complex is not equal to gr_complex");
if (fft_size <= 0) {
throw std::out_of_range("fft_impl_fftw: invalid fft_size");
@@ -218,7 +219,8 @@ fft_real_fwd::fft_real_fwd(int fft_size, int nthreads)
// Hold global mutex during plan construction and destruction.
planner::scoped_lock lock(planner::mutex());
- static_assert(sizeof(fftwf_complex) == sizeof(gr_complex));
+ static_assert(sizeof(fftwf_complex) == sizeof(gr_complex),
+ "The size of fftwf_complex is not equal to gr_complex");
if (fft_size <= 0) {
throw std::out_of_range("gr::fft: invalid fft_size");
@@ -275,7 +277,8 @@ fft_real_rev::fft_real_rev(int fft_size, int nthreads)
// Hold global mutex during plan construction and destruction.
planner::scoped_lock lock(planner::mutex());
- static_assert(sizeof(fftwf_complex) == sizeof(gr_complex));
+ static_assert(sizeof(fftwf_complex) == sizeof(gr_complex),
+ "The size of fftwf_complex is not equal to gr_complex");
if (fft_size <= 0) {
throw std::out_of_range("gr::fft::fft_real_rev: invalid fft_size");