head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.42 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.40 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.38 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.36 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.34 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.32 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.30 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.28 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.26 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.24 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.22 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.20 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.18 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.16 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.14 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.12 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.10 pkgsrc-2022Q1-base:1.1 pkgsrc-2021Q4:1.1.0.8 pkgsrc-2021Q4-base:1.1 pkgsrc-2021Q3:1.1.0.6 pkgsrc-2021Q3-base:1.1 pkgsrc-2021Q2:1.1.0.4 pkgsrc-2021Q2-base:1.1 pkgsrc-2021Q1:1.1.0.2 pkgsrc-2021Q1-base:1.1; locks; strict; comment @// @; 1.1 date 2021.03.19.21.48.27; author markd; state Exp; branches; next ; commitid 1WnrSPaSwuA1ZXLC; desc @@ 1.1 log @libcutl: add version 1.10.0 libcutl is a C++ utility library. It contains a collection of generic and fairly independent components such as meta-programming tests, smart pointers, containers, compiler buildling blocks, etc. @ text @$NetBSD$ * use std::regex instead of boost that don't have regex since 1.65 from FreeBSD ports --- cutl/re/re.cxx.orig 2021-03-18 09:52:50.415539125 +0000 +++ cutl/re/re.cxx @@@@ -9,7 +9,7 @@@@ #ifndef LIBCUTL_EXTERNAL_BOOST # include #else -# include +# include #endif using namespace std; @@@@ -40,17 +40,17 @@@@ namespace cutl struct basic_regex::impl { typedef basic_string string_type; - typedef tr1::basic_regex regex_type; + typedef std::basic_regex regex_type; typedef typename regex_type::flag_type flag_type; impl () {} impl (regex_type const& r): r (r) {} impl (string_type const& s, bool icase) { - flag_type f (tr1::regex_constants::ECMAScript); + flag_type f (std::regex_constants::ECMAScript); if (icase) - f |= tr1::regex_constants::icase; + f |= std::regex_constants::icase; r.assign (s, f); } @@@@ -118,15 +118,15 @@@@ namespace cutl impl_ = s == 0 ? new impl : new impl (*s, icase); else { - impl::flag_type f (tr1::regex_constants::ECMAScript); + impl::flag_type f (std::regex_constants::ECMAScript); if (icase) - f |= tr1::regex_constants::icase; + f |= std::regex_constants::icase; impl_->r.assign (*s, f); } } - catch (tr1::regex_error const& e) + catch (std::regex_error const& e) { throw basic_format (s == 0 ? "" : *s, e.what ()); } @@@@ -146,15 +146,15 @@@@ namespace cutl impl_ = s == 0 ? new impl : new impl (*s, icase); else { - impl::flag_type f (tr1::regex_constants::ECMAScript); + impl::flag_type f (std::regex_constants::ECMAScript); if (icase) - f |= tr1::regex_constants::icase; + f |= std::regex_constants::icase; impl_->r.assign (*s, f); } } - catch (tr1::regex_error const& e) + catch (std::regex_error const& e) { throw basic_format (s == 0 ? L"" : *s, e.what ()); } @@@@ -166,28 +166,28 @@@@ namespace cutl bool basic_regex:: match (string_type const& s) const { - return tr1::regex_match (s, impl_->r); + return std::regex_match (s, impl_->r); } template <> bool basic_regex:: match (string_type const& s) const { - return tr1::regex_match (s, impl_->r); + return std::regex_match (s, impl_->r); } template <> bool basic_regex:: search (string_type const& s) const { - return tr1::regex_search (s, impl_->r); + return std::regex_search (s, impl_->r); } template <> bool basic_regex:: search (string_type const& s) const { - return tr1::regex_search (s, impl_->r); + return std::regex_search (s, impl_->r); } template <> @@@@ -196,13 +196,13 @@@@ namespace cutl string_type const& sub, bool first_only) const { - tr1::regex_constants::match_flag_type f ( - tr1::regex_constants::format_default); + std::regex_constants::match_flag_type f ( + std::regex_constants::format_default); if (first_only) - f |= tr1::regex_constants::format_first_only; + f |= std::regex_constants::format_first_only; - return tr1::regex_replace (s, impl_->r, sub, f); + return std::regex_replace (s, impl_->r, sub, f); } template <> @@@@ -211,13 +211,13 @@@@ namespace cutl string_type const& sub, bool first_only) const { - tr1::regex_constants::match_flag_type f ( - tr1::regex_constants::format_default); + std::regex_constants::match_flag_type f ( + std::regex_constants::format_default); if (first_only) - f |= tr1::regex_constants::format_first_only; + f |= std::regex_constants::format_first_only; - return tr1::regex_replace (s, impl_->r, sub, f); + return std::regex_replace (s, impl_->r, sub, f); } } } @