Replace Boost with C++ standard library - #74
Open
gretel wants to merge 1 commit into
Open
Conversation
gretel
marked this pull request as ready for review
May 1, 2026 21:55
Member
|
This seems a very good cleanup to have. Can you rebase? Thanks! |
gretel
force-pushed
the
pr/boost-purge
branch
3 times, most recently
from
August 10, 2026 19:04
34d9b71 to
655224c
Compare
- boost::lexical_cast -> std::stod / std::to_string - boost::format -> string concatenation - boost::bind -> C++14 lambdas with explicit captures - boost::mutex / scoped_lock -> std::mutex / std::lock_guard - boost::uint32_t -> std::uint32_t - drop <boost/bind.hpp>, <boost/lexical_cast.hpp>, <boost/weak_ptr.hpp> - drop find_package(Boost), Boost link flags, and BOOST_ALL_DYN_LINK - macports CI: pass UHD's boost171 include dir via CMAKE_CXX_FLAGS, since MacPorts UHD public headers still include <boost/config.hpp> Rebased onto current upstream master (UHD 4.x, modernized CMake). Property-tree publisher/subscriber callbacks use set_publisher() / add_desired_subscriber() with lambdas, matching upstream's API surface after the UHD <4.0 support drop.
Contributor
Author
|
@zuckschwerdt the MacPorts job is red because the MacPorts |
Member
|
We'd need to switch to MacPorts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace Boost with C++ standard library
Changed
boost::lexical_cast<double>(s)→std::stod(s)(3 sites)boost::lexical_cast<std::string>(n)→std::to_string(n)(2 sites)boost::format("...") % a % b→ string concatenation with+(8 sites)boost::bind(&fn, target, args...)→ C++14 lambdas with explicit captures (51 sites)boost::mutex/scoped_lock→std::mutex/std::lock_guard<std::mutex>boost::uint32_t→std::uint32_t<boost/foreach.hpp>and<boost/algorithm/string.hpp>find_package(Boost), Boost link flags,BOOST_ALL_DYN_LINK<cstdint>,<mutex>Why
The Boost utilities replaced here all have C++14 equivalents.
UHD's CMake config still pulls
Boost_INCLUDE_DIRStransitively viafind_dependency(Boost)inUHDConfig.cmake, so UHD public headers that template-instantiate Boost types (e.g.uhd::dictindict.ipp) keep compiling.