balint256 / gr-baz

Collection of new blocks for GNU Radio
http://wiki.spench.net/wiki/gr-baz
GNU General Public License v3.0
192 stars 78 forks source link

Doesn't compile with boost 1.67 #55

Open Fierthraix opened 6 years ago

Fierthraix commented 6 years ago

The release of boost 1.67 fixes an issue where floating point values are automatically converted into integers for the constructors of boost::posix_time::time_duration, and helper functions like boost::posix_time::microseconds(long). This causes errors when special values (NaN, -∞, etc) are passed to it.

Currently the value double limit value in Baz Burster get passed to boost::posix_time::microseconds(limit * 1e6), which isn't auto converting anymore.

This is the current compilation error.

/home/user/projects/gr-baz/src/gr-baz/lib/baz_burster.cc: In member function ‘virtual int baz_burster::general_work(int, gr_vector_int&, gr_vector_const_void_star&, gr_vector_void_star&)’:
/home/user/projects/gr-baz/src/gr-baz/lib/baz_burster.cc:225:62: error: no matching function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>::subsecond_duration(double)’
       if (diff >= boost::posix_time::microseconds(limit * 1e6))
julien-noblet commented 6 years ago

Please see #56 seems to be a good fix