From a4eee2aa4a4ab2b3645686d3cd42494266dc4e66 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Mon, 29 Jun 2015 14:23:39 -0700 Subject: ad9361: brought in Boost.Assign std::map workaround for MSVC 2013 --- host/lib/usrp/common/ad9361_driver/ad9361_device.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/common/ad9361_driver/ad9361_device.h') diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.h b/host/lib/usrp/common/ad9361_driver/ad9361_device.h index 1c5c97829..a2038ea01 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_device.h +++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.h @@ -29,7 +29,14 @@ public: ad9361_device_t(ad9361_params::sptr client, ad9361_io::sptr io_iface) : _client_params(client), _io_iface(io_iface) { - _rx_filters = boost::assign::map_list_of("LPF_TIA", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_lp_tia_sec, this, _1), + /* + * This Boost.Assign to_container() workaround is necessary because STL containers + * apparently confuse newer versions of MSVC. + * + * Source: http://www.boost.org/doc/libs/1_55_0/libs/assign/doc/#portability + */ + + _rx_filters = (boost::assign::map_list_of("LPF_TIA", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_lp_tia_sec, this, _1), boost::bind(&ad9361_device_t::_set_filter_lp_tia_sec, this, _1, _3))) ("LPF_BB", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_lp_bb, this, _1), boost::bind(&ad9361_device_t::_set_filter_lp_bb, this, _1, _3))) @@ -38,9 +45,9 @@ public: ("HB_2", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_hb_2, this, _1), 0)) ("HB_1", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_hb_1, this, _1), 0)) ("FIR_1", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_fir, this, _1, _2), - boost::bind(&ad9361_device_t::_set_filter_fir, this, _1, _2, _3))); + boost::bind(&ad9361_device_t::_set_filter_fir, this, _1, _2, _3)))).to_container(_rx_filters); - _tx_filters = boost::assign::map_list_of("LPF_SECONDARY", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_lp_tia_sec, this, _1), + _tx_filters = (boost::assign::map_list_of("LPF_SECONDARY", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_lp_tia_sec, this, _1), boost::bind(&ad9361_device_t::_set_filter_lp_tia_sec, this, _1, _3))) ("LPF_BB", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_lp_bb, this, _1), boost::bind(&ad9361_device_t::_set_filter_lp_bb, this, _1, _3))) @@ -49,7 +56,7 @@ public: ("HB_2", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_hb_2, this, _1), 0)) ("HB_1", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_hb_1, this, _1), 0)) ("FIR_1", filter_query_helper(boost::bind(&ad9361_device_t::_get_filter_fir, this, _1, _2), - boost::bind(&ad9361_device_t::_set_filter_fir, this, _1, _2, _3))); + boost::bind(&ad9361_device_t::_set_filter_fir, this, _1, _2, _3)))).to_container(_tx_filters); } /* Initialize the AD9361 codec. */ -- cgit v1.2.3