aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-09-28 13:13:41 +0200
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:32 -0800
commitf773cf9fb96e25d064f43cffdc893ac905d91f15 (patch)
treeb9aab514b0289687dcc006a831c832a53051f34d /host/lib/rfnoc
parentfcc2e9c602a6103dfd0f75e035f614b177c5dc35 (diff)
downloaduhd-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/rfnoc')
-rw-r--r--host/lib/rfnoc/block_id.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/host/lib/rfnoc/block_id.cpp b/host/lib/rfnoc/block_id.cpp
index 573b393e5..db7ddb032 100644
--- a/host/lib/rfnoc/block_id.cpp
+++ b/host/lib/rfnoc/block_id.cpp
@@ -11,7 +11,7 @@
#include <uhd/rfnoc/constants.hpp>
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
-#include <boost/regex.hpp>
+#include <regex>
#include <iostream>
using namespace uhd::rfnoc;
@@ -38,12 +38,12 @@ block_id_t::block_id_t(
bool block_id_t::is_valid_blockname(const std::string& block_name)
{
- return boost::regex_match(block_name, boost::regex(VALID_BLOCKNAME_REGEX));
+ return std::regex_match(block_name, std::regex(VALID_BLOCKNAME_REGEX));
}
bool block_id_t::is_valid_block_id(const std::string& block_name)
{
- return boost::regex_match(block_name, boost::regex(VALID_BLOCKID_REGEX));
+ return std::regex_match(block_name, std::regex(VALID_BLOCKID_REGEX));
}
std::string block_id_t::to_string() const
@@ -63,9 +63,9 @@ uhd::fs_path block_id_t::get_tree_root() const
bool block_id_t::match(const std::string& block_str)
{
- boost::cmatch matches;
- if (not boost::regex_match(
- block_str.c_str(), matches, boost::regex(VALID_BLOCKID_REGEX))) {
+ std::cmatch matches;
+ if (not std::regex_match(
+ block_str.c_str(), matches, std::regex(VALID_BLOCKID_REGEX))) {
return false;
}
try {
@@ -82,9 +82,9 @@ bool block_id_t::match(const std::string& block_str)
bool block_id_t::set(const std::string& new_name)
{
- boost::cmatch matches;
- if (not boost::regex_match(
- new_name.c_str(), matches, boost::regex(VALID_BLOCKID_REGEX))) {
+ std::cmatch matches;
+ if (not std::regex_match(
+ new_name.c_str(), matches, std::regex(VALID_BLOCKID_REGEX))) {
return false;
}
if (not(matches[1] == "")) {