diff options
author | Huang Rui <vowstar@gmail.com> | 2020-10-26 10:21:43 +0800 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2020-12-18 14:31:30 -0800 |
commit | 4161659ee0aecba352f459514b6f15fbca4f1f90 (patch) | |
tree | 133947db86f37425512588f3e80cdf6510ae9199 /gr-uhd/lib/usrp_block_impl.h | |
parent | 96d00b4cbd4d1607f1b549d3e65e5ea3c19b876b (diff) |
gr-uhd/lib/usrp_block_impl.cc: fix compile error using boost>=1.73
When using boost>=1.73 and compile with uhd, it always have errors.
Fix the compile error when using uhd and gcc10: error: ‘_1’ was not declared
Bug: https://bugs.gentoo.org/751259
usrp_source_impl.cc: use lambdas instead of boost::bind
usrp_block_impl.cc:use lambdas instead of boost::bind
usrp_block_impl.h: Switch from boost::function to std::function
https://github.com/gnuradio/gnuradio/pull/3441
https://github.com/gnuradio/gnuradio/pull/3887
usrp_source_impl: fix parameter bug of original code
The usrp_block_impl::register_msg_cmd_handler uses cmd_handler_t as
handler type, but it have 3 parameters.
Fix the parameter mismatch bug and change the signature as cmd_handler_t
Signed-off-by: Huang Rui <vowstar@gmail.com>
Diffstat (limited to 'gr-uhd/lib/usrp_block_impl.h')
-rw-r--r-- | gr-uhd/lib/usrp_block_impl.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gr-uhd/lib/usrp_block_impl.h b/gr-uhd/lib/usrp_block_impl.h index f08e1428d3..7560b839e0 100644 --- a/gr-uhd/lib/usrp_block_impl.h +++ b/gr-uhd/lib/usrp_block_impl.h @@ -14,8 +14,8 @@ #include <gnuradio/uhd/usrp_block.h> #include <pmt/pmt.h> #include <uhd/usrp/multi_usrp.hpp> -#include <boost/bind.hpp> #include <boost/dynamic_bitset.hpp> +#include <functional> namespace gr { @@ -31,9 +31,8 @@ static const std::string ALL_LOS; class usrp_block_impl : virtual public usrp_block { public: - typedef boost::function<::uhd::sensor_value_t(const std::string&)> get_sensor_fn_t; - typedef boost::function<void(const pmt::pmt_t&, int, const pmt::pmt_t&)> - cmd_handler_t; + typedef std::function<::uhd::sensor_value_t(const std::string&)> get_sensor_fn_t; + typedef std::function<void(const pmt::pmt_t&, int, const pmt::pmt_t&)> cmd_handler_t; static const double LOCK_TIMEOUT; |