From 72b45bb8def087f2eff09ed671de788978853e2a Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 17 Oct 2019 16:01:22 -0700 Subject: uhd: Remove all usages of boost::tuple and friends This replaces all of the following with standard C++ features: - boost::tuple - boost::make_tuple - boost::tuple::get - #include All usages were replaced with search-and-replace scripts (the usages of get could be automatically replaced with a vim macro, the rest was straightforward search-and-replace). --- host/lib/usrp/dboard_manager.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'host/lib/usrp/dboard_manager.cpp') diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp index ca3612ad5..a4acf2aaf 100644 --- a/host/lib/usrp/dboard_manager.cpp +++ b/host/lib/usrp/dboard_manager.cpp @@ -12,10 +12,9 @@ #include #include #include -#include #include #include -#include +#include using namespace uhd; using namespace uhd::usrp; @@ -72,7 +71,7 @@ bool operator==(const dboard_key_t &lhs, const dboard_key_t &rhs){ * storage and registering for dboards **********************************************************************/ //dboard registry tuple: dboard constructor, canonical name, subdev names, container constructor -typedef boost::tuple, dboard_manager::dboard_ctor_t> args_t; +typedef std::tuple, dboard_manager::dboard_ctor_t> args_t; //map a dboard id to a dboard constructor typedef uhd::dict id_to_args_map_t; @@ -90,12 +89,11 @@ static void register_dboard_key( if (dboard_key.is_xcvr()) throw uhd::key_error(str(boost::format( "The dboard id pair [%s, %s] is already registered to %s." - ) % dboard_key.rx_id().to_string() % dboard_key.tx_id().to_string() % get_id_to_args_map()[dboard_key].get<1>())); + ) % dboard_key.rx_id().to_string() % dboard_key.tx_id().to_string() % std::get<1>(get_id_to_args_map()[dboard_key]))); else throw uhd::key_error(str(boost::format( "The dboard id %s is already registered to %s." - ) % dboard_key.xx_id().to_string() % get_id_to_args_map()[dboard_key].get<1>())); - + ) % dboard_key.xx_id().to_string() % std::get<1>(get_id_to_args_map()[dboard_key]))); } get_id_to_args_map()[dboard_key] = args_t(db_subdev_ctor, name, subdev_names, db_container_ctor); } @@ -150,7 +148,7 @@ std::string dboard_id_t::to_cname(void) const{ (key.is_xcvr() and (*this == key.rx_id() or *this == key.tx_id())) ){ if (not cname.empty()) cname += ", "; - cname += get_id_to_args_map()[key].get<1>(); + cname += std::get<1>(get_id_to_args_map()[key]); } } return (cname.empty())? "Unknown" : cname; @@ -319,7 +317,7 @@ void dboard_manager_impl::init( //extract data for the xcvr dboard key dboard_ctor_t subdev_ctor; std::string name; std::vector subdevs; dboard_ctor_t container_ctor; - boost::tie(subdev_ctor, name, subdevs, container_ctor) = get_id_to_args_map()[xcvr_dboard_key]; + std::tie(subdev_ctor, name, subdevs, container_ctor) = get_id_to_args_map()[xcvr_dboard_key]; //create the container class. //a container class exists per N subdevs registered in a register_dboard* call @@ -371,7 +369,7 @@ void dboard_manager_impl::init( //extract data for the rx dboard key dboard_ctor_t rx_dboard_ctor; std::string rx_name; std::vector rx_subdevs; dboard_ctor_t rx_cont_ctor; - boost::tie(rx_dboard_ctor, rx_name, rx_subdevs, rx_cont_ctor) = get_id_to_args_map()[rx_dboard_key]; + std::tie(rx_dboard_ctor, rx_name, rx_subdevs, rx_cont_ctor) = get_id_to_args_map()[rx_dboard_key]; //create the container class. //a container class exists per N subdevs registered in a register_dboard* call @@ -410,7 +408,7 @@ void dboard_manager_impl::init( //extract data for the tx dboard key dboard_ctor_t tx_dboard_ctor; std::string tx_name; std::vector tx_subdevs; dboard_ctor_t tx_cont_ctor; - boost::tie(tx_dboard_ctor, tx_name, tx_subdevs, tx_cont_ctor) = get_id_to_args_map()[tx_dboard_key]; + std::tie(tx_dboard_ctor, tx_name, tx_subdevs, tx_cont_ctor) = get_id_to_args_map()[tx_dboard_key]; //create the container class. //a container class exists per N subdevs registered in a register_dboard* call -- cgit v1.2.3