diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-09-28 13:13:41 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:32 -0800 |
commit | f773cf9fb96e25d064f43cffdc893ac905d91f15 (patch) | |
tree | b9aab514b0289687dcc006a831c832a53051f34d /host/lib/types | |
parent | fcc2e9c602a6103dfd0f75e035f614b177c5dc35 (diff) | |
download | uhd-f773cf9fb96e25d064f43cffdc893ac905d91f15.tar.gz uhd-f773cf9fb96e25d064f43cffdc893ac905d91f15.tar.bz2 uhd-f773cf9fb96e25d064f43cffdc893ac905d91f15.zip |
uhd: Replace boost::regex with std::regex
boost::regex was a requirement until the minimum version of gcc was
increased. Since it is at version 5.3 now, using Boost.Regex is no
longer necessary.
This change is a pure search-and-replace; Boost and std versions of
regex are compatible and use the same syntax.
Diffstat (limited to 'host/lib/types')
-rw-r--r-- | host/lib/types/device_addr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/types/device_addr.cpp b/host/lib/types/device_addr.cpp index 65d265857..3e2fac94d 100644 --- a/host/lib/types/device_addr.cpp +++ b/host/lib/types/device_addr.cpp @@ -9,7 +9,7 @@ #include <boost/algorithm/string.hpp> #include <boost/tokenizer.hpp> #include <boost/format.hpp> -#include <boost/regex.hpp> +#include <regex> #include <stdexcept> #include <sstream> @@ -93,8 +93,8 @@ device_addrs_t uhd::separate_device_addr(const device_addr_t &dev_addr){ device_addrs_t dev_addrs(1); //must be at least one (obviously) std::vector<std::string> global_keys; //keys that apply to all (no numerical suffix) for(const std::string &key: dev_addr.keys()){ - boost::cmatch matches; - if (not boost::regex_match(key.c_str(), matches, boost::regex("^(\\D+)(\\d*)$"))){ + std::cmatch matches; + if (not std::regex_match(key.c_str(), matches, std::regex("^(\\D+)(\\d*)$"))){ throw std::runtime_error("unknown key format: " + key); } std::string key_part(matches[1].first, matches[1].second); |