From 1e0938cca65b4f934a2afaf428bed5105f091017 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 19 Mar 2024 17:14:25 +0000 Subject: [PATCH] Try again with CI. Suppress some warnings. --- example/Jamfile.v2 | 16 ++++++++-------- include/boost/regex/concepts.hpp | 15 +++++++++++++++ include/boost/regex/v5/u32regex_iterator.hpp | 1 + test/Jamfile.v2 | 10 +++++----- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index dd958c7d..7f2b023b 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -47,19 +47,19 @@ test-suite regex-examples : [ regex-test-run snippets/partial_regex_grep.cpp : $(BOOST_ROOT)/libs/regex/index.htm ] [ regex-test-run snippets/partial_regex_iterate.cpp : $(BOOST_ROOT)/libs/regex/index.htm ] [ regex-test-run snippets/partial_regex_match.cpp : 1234-5678-8765-4 ] -[ regex-test-run snippets/regex_grep_example_1.cpp : $(BOOST_ROOT)/boost/rational.hpp ] -[ regex-test-run snippets/regex_grep_example_2.cpp : $(BOOST_ROOT)/boost/rational.hpp ] -[ regex-test-run snippets/regex_grep_example_3.cpp : $(BOOST_ROOT)/boost/rational.hpp ] -[ regex-test-run snippets/regex_grep_example_4.cpp : $(BOOST_ROOT)/boost/rational.hpp ] +[ regex-test-run snippets/regex_grep_example_1.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ] +[ regex-test-run snippets/regex_grep_example_2.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ] +[ regex-test-run snippets/regex_grep_example_3.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ] +[ regex-test-run snippets/regex_grep_example_4.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ] [ regex-test-run snippets/regex_match_example.cpp : -auto ] -[ regex-test-run snippets/regex_merge_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ] -[ regex-test-run snippets/regex_replace_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ] -[ regex-test-run snippets/regex_search_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ] +[ regex-test-run snippets/regex_merge_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ] +[ regex-test-run snippets/regex_replace_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ] +[ regex-test-run snippets/regex_search_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ] [ regex-test-run snippets/regex_split_example_1.cpp : -auto ] [ regex-test-run snippets/regex_split_example_2.cpp : $(BOOST_ROOT)/libs/regex/doc/html/index.html ] [ regex-test-run snippets/regex_token_iterator_eg_1.cpp : -auto ] [ regex-test-run snippets/regex_token_iterator_eg_2.cpp : $(BOOST_ROOT)/libs/regex/doc/html/index.html ] -[ regex-test-run snippets/regex_iterator_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ] +[ regex-test-run snippets/regex_iterator_example.cpp : $(BOOST_ROOT)/boost/regex/v5/regex_token_iterator.hpp ] [ run snippets/captures_example.cpp ../test/captures//boost_regex_extra : : : multi BOOST_REGEX_MATCH_EXTRA=1 ] diff --git a/include/boost/regex/concepts.hpp b/include/boost/regex/concepts.hpp index 2eafac1b..0f88cdc9 100644 --- a/include/boost/regex/concepts.hpp +++ b/include/boost/regex/concepts.hpp @@ -127,6 +127,9 @@ bool operator == (const allocator_architype&, const allocator_architype&) template bool operator != (const allocator_architype&, const allocator_architype&) { return false; } +template +void consume_type() {} + namespace boost{ // // regex_traits_architype: @@ -371,6 +374,8 @@ struct BaseRegexConcept e1 = except.code(); typedef typename Regex::value_type regex_value_type; + regex_value_type val{}; + ignore_unused_variable_warning(val); function_requires< RegexTraitsConcept > >(); function_requires< BaseRegexConcept > >(); } @@ -446,15 +451,25 @@ struct BaseRegexConcept // match_results tests - some typedefs are not used, however these // guarante that they exist (some compilers may warn on non-usage) typedef typename match_results_type::value_type mr_value_type; + consume_type(); typedef typename match_results_type::const_reference mr_const_reference; + consume_type(); typedef typename match_results_type::reference mr_reference; + consume_type(); typedef typename match_results_type::const_iterator mr_const_iterator; + consume_type(); typedef typename match_results_type::iterator mr_iterator; + consume_type(); typedef typename match_results_type::difference_type mr_difference_type; + consume_type(); typedef typename match_results_type::size_type mr_size_type; + consume_type(); typedef typename match_results_type::allocator_type mr_allocator_type; + consume_type(); typedef typename match_results_type::char_type mr_char_type; + consume_type(); typedef typename match_results_type::string_type mr_string_type; + consume_type(); match_results_type m1; mr_allocator_type at; diff --git a/include/boost/regex/v5/u32regex_iterator.hpp b/include/boost/regex/v5/u32regex_iterator.hpp index 6677019a..608cd176 100644 --- a/include/boost/regex/v5/u32regex_iterator.hpp +++ b/include/boost/regex/v5/u32regex_iterator.hpp @@ -35,6 +35,7 @@ class u32regex_iterator_implementation public: u32regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f) : base(), end(last), re(*p), flags(f){} + u32regex_iterator_implementation(const u32regex_iterator_implementation&) = default; bool init(BidirectionalIterator first) { base = first; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9d98c1e8..0c0548a5 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -116,11 +116,11 @@ run object_cache/object_cache_test.cpp : : : [ check-target-builds ../build//is_ run config_info/regex_config_info.cpp ../build//boost_regex/static : : : always_show_run_output ; run config_info/regex_config_info.cpp ../build//boost_regex : : : always_show_run_output : regex_dll_config_info ; run collate_info/collate_info.cpp ../build//boost_regex : : : always_show_run_output : test_collate_info ; -link concepts/concept_check.cpp : [ check-target-builds ../build//is_legacy_03 : : ../build//boost_regex ] ; -link concepts/concept_check.cpp : BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : no ] : standalone_concept_check ; -link concepts/icu_concept_check.cpp : BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : ../build//boost_regex ] ; -link concepts/icu_concept_check.cpp : [ check-target-builds ../build//is_legacy_03 : : no ] : standalone_icu_concept_check ; -link concepts/range_concept_check.cpp : [ check-target-builds ../build//is_legacy_03 : : ../build//boost_regex ] ; +link concepts/concept_check.cpp : [ check-target-builds ../build//is_legacy_03 : : ../build//boost_regex ] gcc:-Wno-deprecated-copy ; +link concepts/concept_check.cpp : BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : no ] gcc:-Wno-deprecated-copy : standalone_concept_check ; +link concepts/icu_concept_check.cpp : BOOST_REGEX_STANDALONE [ check-target-builds ../build//is_legacy_03 : : ../build//boost_regex ] gcc:-Wno-deprecated-copy ; +link concepts/icu_concept_check.cpp : [ check-target-builds ../build//is_legacy_03 : : no ] gcc:-Wno-deprecated-copy : standalone_icu_concept_check ; +link concepts/range_concept_check.cpp : [ check-target-builds ../build//is_legacy_03 : : ../build//boost_regex ] gcc:-Wno-deprecated-copy ; run concepts/test_bug_11988.cpp : : : [ check-target-builds ../build//is_legacy_03 : : ../build//boost_regex ] ; run captures/captures_test.cpp ../build//icu_options : : : multi BOOST_REGEX_MATCH_EXTRA=1 BOOST_REGEX_NO_LIB=1 [ check-target-builds ../build//is_legacy_03 : : ../build//boost_regex ] : captures_test ;