From f773cf9fb96e25d064f43cffdc893ac905d91f15 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 28 Sep 2019 13:13:41 +0200 Subject: 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. --- host/lib/rfnoc/block_id.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'host/lib/rfnoc') 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 #include #include -#include +#include #include 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] == "")) { -- cgit v1.2.3