From 1d9706feb796e955aabf115051ef91676a417fb6 Mon Sep 17 00:00:00 2001 From: glywk Date: Sat, 21 Jan 2023 00:42:52 +0100 Subject: [PATCH 01/19] Add is_blank classifier --- .../boost/algorithm/string/classification.hpp | 19 +++++++++++++++++++ string/doc/quickref.xml | 7 +++++++ string/test/predicate_test.cpp | 6 +++++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/include/boost/algorithm/string/classification.hpp b/include/boost/algorithm/string/classification.hpp index ca43602d4..83cdca529 100644 --- a/include/boost/algorithm/string/classification.hpp +++ b/include/boost/algorithm/string/classification.hpp @@ -85,6 +85,22 @@ namespace boost { return detail::is_classifiedF(std::ctype_base::alpha, Loc); } +#ifndef BOOST_NO_CXX11 + //! is_blank predicate + /*! + Construct the \c is_classified predicate for the \c ctype_base::blank category. + + \param Loc A locale used for classification + \return An instance of the \c is_classified predicate + \since c++11 + */ + inline detail::is_classifiedF + is_blank(const std::locale& Loc=std::locale()) + { + return detail::is_classifiedF(std::ctype_base::blank, Loc); + } +#endif + //! is_cntrl predicate /*! Construct the \c is_classified predicate for the \c ctype_base::cntrl category. @@ -294,6 +310,9 @@ namespace boost { // pull names to the boost namespace using algorithm::is_classified; using algorithm::is_space; +#ifndef BOOST_NO_CXX11 + using algorithm::is_blank; +#endif using algorithm::is_alnum; using algorithm::is_alpha; using algorithm::is_cntrl; diff --git a/string/doc/quickref.xml b/string/doc/quickref.xml index fe267e718..39a224b70 100644 --- a/string/doc/quickref.xml +++ b/string/doc/quickref.xml @@ -667,6 +667,13 @@ is_space() + + is_blank + Recognize blanks + + is_blank() + + is_alnum Recognize alphanumeric characters diff --git a/string/test/predicate_test.cpp b/string/test/predicate_test.cpp index ba1564e53..bc16e7bfa 100644 --- a/string/test/predicate_test.cpp +++ b/string/test/predicate_test.cpp @@ -138,7 +138,11 @@ void classification_test() TEST_CLASS( is_any_of( string("abc") ), "aaabbcc", "aaxb" ); TEST_CLASS( is_any_of( "abc" ), "aaabbcc", "aaxb" ); TEST_CLASS( is_from_range( 'a', 'c' ), "aaabbcc", "aaxb" ); - + +#ifndef BOOST_NO_CXX11 + TEST_CLASS( is_blank(), " \t", "\t \n\r" ); +#endif + TEST_CLASS( !is_classified(std::ctype_base::space), "...", "..\n\r\t " ); TEST_CLASS( ( !is_any_of("abc") && is_from_range('a','e') ) || is_space(), "d e", "abcde" ); From 3401f0398fc7417a1db470a37db8fa151cf83be9 Mon Sep 17 00:00:00 2001 From: jiayuehua <3423893+jiayuehua@users.noreply.github.com> Date: Mon, 8 May 2023 11:06:15 +0800 Subject: [PATCH 02/19] fix range-base gather algorithm --- include/boost/algorithm/gather.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/algorithm/gather.hpp b/include/boost/algorithm/gather.hpp index e777f8bd1..00f173397 100644 --- a/include/boost/algorithm/gather.hpp +++ b/include/boost/algorithm/gather.hpp @@ -1,4 +1,4 @@ -/* +/* Copyright 2008 Adobe Systems Incorporated Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -84,7 +84,7 @@ namespace boost { namespace algorithm { template < typename BidirectionalIterator, // models BidirectionalIterator typename Pred> // models UnaryPredicate -std::pair gather +std::pair gather ( BidirectionalIterator first, BidirectionalIterator last, BidirectionalIterator pivot, Pred pred ) { // The first call partitions everything up to (but not including) the pivot element, @@ -106,11 +106,11 @@ template < typename BidirectionalRange, // typename Pred> // Pred models UnaryPredicate std::pair< - typename boost::range_iterator::type, - typename boost::range_iterator::type> + typename boost::range_iterator::type, + typename boost::range_iterator::type> gather ( - const BidirectionalRange &range, - typename boost::range_iterator::type pivot, + BidirectionalRange &range, + typename boost::range_iterator::type pivot, Pred pred ) { return boost::algorithm::gather ( boost::begin ( range ), boost::end ( range ), pivot, pred ); From dc14b69189ae91ffb6bbbe96c60a9e3cdd41ab96 Mon Sep 17 00:00:00 2001 From: glywk Date: Thu, 27 Jul 2023 23:15:48 +0200 Subject: [PATCH 03/19] Add negative is_blank predicate tests --- string/test/predicate_test.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/string/test/predicate_test.cpp b/string/test/predicate_test.cpp index bc16e7bfa..2e1ebd7a6 100644 --- a/string/test/predicate_test.cpp +++ b/string/test/predicate_test.cpp @@ -141,6 +141,7 @@ void classification_test() #ifndef BOOST_NO_CXX11 TEST_CLASS( is_blank(), " \t", "\t \n\r" ); + TEST_CLASS( !is_blank(), "abc\n\v\f\r", "a x\t" ); #endif TEST_CLASS( !is_classified(std::ctype_base::space), "...", "..\n\r\t " ); From 6b1d2fc5ad97044496a43a1d0019f7ba9eca60e6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:27:02 -0500 Subject: [PATCH 04/19] Make the library modular usable. --- Jamfile | 11 ----------- build.jam | 36 ++++++++++++++++++++++++++++++++++++ example/Jamfile.v2 | 3 +-- minmax/test/Jamfile.v2 | 2 +- string/test/Jamfile.v2 | 2 +- test/Jamfile.v2 | 2 +- 6 files changed, 40 insertions(+), 16 deletions(-) delete mode 100644 Jamfile create mode 100644 build.jam diff --git a/Jamfile b/Jamfile deleted file mode 100644 index a2dbf99e6..000000000 --- a/Jamfile +++ /dev/null @@ -1,11 +0,0 @@ -# Boost.Algorithm Library Jamfile -# -# Copyright (c) 2018 James E. King III -# -# Use, modification, and distribution are subject to the -# Boost Software License, Version 1.0. (See accompanying file -# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -# please order by name to ease maintenance -build-project example ; -build-project test ; diff --git a/build.jam b/build.jam new file mode 100644 index 000000000..f62e633e3 --- /dev/null +++ b/build.jam @@ -0,0 +1,36 @@ +# Copyright René Ferdinand Rivera Morell 2023 +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import project ; + +project /boost/algorithm + : common-requirements + /boost/array//boost_array + /boost/assert//boost_assert + /boost/bind//boost_bind + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/core//boost_core + /boost/exception//boost_exception + /boost/function//boost_function + /boost/iterator//boost_iterator + /boost/mpl//boost_mpl + /boost/range//boost_range + /boost/regex//boost_regex + /boost/static_assert//boost_static_assert + /boost/throw_exception//boost_throw_exception + /boost/tuple//boost_tuple + /boost/type_traits//boost_type_traits + /boost/unordered//boost_unordered + include + ; + +explicit + [ alias boost_algorithm ] + [ alias all : boost_algorithm example test string/example string/test ] + ; + +call-if : boost-library algorithm + ; diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 64a405559..96163b68c 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -8,9 +8,8 @@ # See http://www.boost.org for updates, documentation, and revision history. -project /boost/algorithm/example +project : requirements - ../../../ speed msvc:_SCL_SECURE_NO_WARNINGS msvc:NOMINMAX diff --git a/minmax/test/Jamfile.v2 b/minmax/test/Jamfile.v2 index 384b35929..2e41d1ea1 100644 --- a/minmax/test/Jamfile.v2 +++ b/minmax/test/Jamfile.v2 @@ -11,7 +11,7 @@ import testing ; alias unit_test_framework : # sources - /boost//unit_test_framework + /boost/test//unit_test_framework ; { diff --git a/string/test/Jamfile.v2 b/string/test/Jamfile.v2 index 7f60df703..8e53f336c 100644 --- a/string/test/Jamfile.v2 +++ b/string/test/Jamfile.v2 @@ -11,7 +11,7 @@ import testing ; alias unit_test_framework : # sources - /boost//unit_test_framework + /boost/test//unit_test_framework ; test-suite algorithm/string diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index aef6bdb38..9c8d199ae 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -11,7 +11,7 @@ import testing ; alias unit_test_framework : # sources - /boost//unit_test_framework + /boost/test//unit_test_framework ; From fcf95e504bffcadfabb5f4159992a240423dfa5d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:12:36 -0500 Subject: [PATCH 05/19] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/build.jam b/build.jam index f62e633e3..91d63001b 100644 --- a/build.jam +++ b/build.jam @@ -7,23 +7,23 @@ import project ; project /boost/algorithm : common-requirements - /boost/array//boost_array - /boost/assert//boost_assert - /boost/bind//boost_bind - /boost/concept_check//boost_concept_check - /boost/config//boost_config - /boost/core//boost_core - /boost/exception//boost_exception - /boost/function//boost_function - /boost/iterator//boost_iterator - /boost/mpl//boost_mpl - /boost/range//boost_range - /boost/regex//boost_regex - /boost/static_assert//boost_static_assert - /boost/throw_exception//boost_throw_exception - /boost/tuple//boost_tuple - /boost/type_traits//boost_type_traits - /boost/unordered//boost_unordered + /boost/array//boost_array + /boost/assert//boost_assert + /boost/bind//boost_bind + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/core//boost_core + /boost/exception//boost_exception + /boost/function//boost_function + /boost/iterator//boost_iterator + /boost/mpl//boost_mpl + /boost/range//boost_range + /boost/regex//boost_regex + /boost/static_assert//boost_static_assert + /boost/throw_exception//boost_throw_exception + /boost/tuple//boost_tuple + /boost/type_traits//boost_type_traits + /boost/unordered//boost_unordered include ; From 14922e71c0faa4cda5ca9bfcc5cd7968fcda1b22 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 13 Apr 2024 11:15:55 -0500 Subject: [PATCH 06/19] Avoid global references to boost-root. --- doc/Jamfile.v2 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index bc67f7def..4d3319af0 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -16,18 +16,18 @@ using quickbook ; using doxygen ; using boostbook ; -doxygen autodoc - : - [ glob ../../../boost/algorithm/*.hpp - ../../../boost/algorithm/searching/*.hpp - ../../../boost/algorithm/cxx11/*.hpp - ../../../boost/algorithm/cxx14/*.hpp - ../../../boost/algorithm/cxx17/*.hpp +doxygen autodoc + : + [ glob ../include/boost/algorithm/*.hpp + ../include/boost/algorithm/searching/*.hpp + ../include/boost/algorithm/cxx11/*.hpp + ../include/boost/algorithm/cxx14/*.hpp + ../include/boost/algorithm/cxx17/*.hpp ] - : + : "PREDEFINED=\"BOOST_ALGORITHM_DOXYGEN=1\"" WARNINGS=YES # Default NO, but useful to see warnings, especially in a logfile. - ; + ; xml algorithm : algorithm.qbk ; @@ -36,7 +36,7 @@ boostbook standalone : algorithm : - autodoc + autodoc boost.root=../../../.. "boost.doxygen.reftitle=Boost.Algorithms C++ Reference" chapter.autolabel=0 From b3b2ff4d0ce8fe35bf84cffada5345c8588c2b24 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 13 Apr 2024 16:18:29 -0500 Subject: [PATCH 07/19] Remove relative references to boost-root in Jamfiles. --- string/doc/Jamfile.v2 | 58 +++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/string/doc/Jamfile.v2 b/string/doc/Jamfile.v2 index 9ddebb8b6..58fc21430 100644 --- a/string/doc/Jamfile.v2 +++ b/string/doc/Jamfile.v2 @@ -10,40 +10,40 @@ import toolset ; toolset.using doxygen ; -boostbook string_algo : string_algo.xml autodoc +boostbook string_algo : string_algo.xml autodoc : boost.root=../../../../.. pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html ; doxygen autodoc - : - [ glob ../../../../boost/algorithm/string.hpp ] - [ glob ../../../../boost/algorithm/string_regex.hpp ] - - [ glob ../../../../boost/algorithm/string/classification.hpp ] - [ glob ../../../../boost/algorithm/string/iterator_range.hpp ] - [ glob ../../../../boost/algorithm/string/sequence_traits.hpp ] - [ glob ../../../../boost/algorithm/string/std_containers_traits.hpp ] - [ glob ../../../../boost/algorithm/string/concept.hpp ] - [ glob ../../../../boost/algorithm/string/compare.hpp ] - [ glob ../../../../boost/algorithm/string/constants.hpp ] - [ glob ../../../../boost/algorithm/string/case_conv.hpp ] - [ glob ../../../../boost/algorithm/string/find.hpp ] - [ glob ../../../../boost/algorithm/string/finder.hpp ] - [ glob ../../../../boost/algorithm/string/find_iterator.hpp ] - [ glob ../../../../boost/algorithm/string/trim.hpp ] - [ glob ../../../../boost/algorithm/string/predicate.hpp ] - [ glob ../../../../boost/algorithm/string/split.hpp ] - [ glob ../../../../boost/algorithm/string/iter_find.hpp ] - [ glob ../../../../boost/algorithm/string/erase.hpp ] - [ glob ../../../../boost/algorithm/string/join.hpp ] - [ glob ../../../../boost/algorithm/string/replace.hpp ] - [ glob ../../../../boost/algorithm/string/find_format.hpp ] - [ glob ../../../../boost/algorithm/string/formatter.hpp ] - [ glob ../../../../boost/algorithm/string/regex.hpp ] - [ glob ../../../../boost/algorithm/string/regex_find_format.hpp ] - [ glob ../../../../boost/algorithm/string/trim_all.hpp ] + : + [ glob ../../include/boost/algorithm/string.hpp ] + [ glob ../../include/boost/algorithm/string_regex.hpp ] + + [ glob ../../include/boost/algorithm/string/classification.hpp ] + [ glob ../../include/boost/algorithm/string/iterator_range.hpp ] + [ glob ../../include/boost/algorithm/string/sequence_traits.hpp ] + [ glob ../../include/boost/algorithm/string/std_containers_traits.hpp ] + [ glob ../../include/boost/algorithm/string/concept.hpp ] + [ glob ../../include/boost/algorithm/string/compare.hpp ] + [ glob ../../include/boost/algorithm/string/constants.hpp ] + [ glob ../../include/boost/algorithm/string/case_conv.hpp ] + [ glob ../../include/boost/algorithm/string/find.hpp ] + [ glob ../../include/boost/algorithm/string/finder.hpp ] + [ glob ../../include/boost/algorithm/string/find_iterator.hpp ] + [ glob ../../include/boost/algorithm/string/trim.hpp ] + [ glob ../../include/boost/algorithm/string/predicate.hpp ] + [ glob ../../include/boost/algorithm/string/split.hpp ] + [ glob ../../include/boost/algorithm/string/iter_find.hpp ] + [ glob ../../include/boost/algorithm/string/erase.hpp ] + [ glob ../../include/boost/algorithm/string/join.hpp ] + [ glob ../../include/boost/algorithm/string/replace.hpp ] + [ glob ../../include/boost/algorithm/string/find_format.hpp ] + [ glob ../../include/boost/algorithm/string/formatter.hpp ] + [ glob ../../include/boost/algorithm/string/regex.hpp ] + [ glob ../../include/boost/algorithm/string/regex_find_format.hpp ] + [ glob ../../include/boost/algorithm/string/trim_all.hpp ] : HIDE_UNDOC_MEMBERS=YES EXTRACT_PRIVATE=NO @@ -53,7 +53,7 @@ doxygen autodoc SEARCH_INCLUDES=YES PREDEFINED="BOOST_STRING_TYPENAME=typename \"BOOST_STATIC_CONSTANT(type,var)=static const type var;\"" ; - + From 1213b9fd1f875ea2752b74844e88e40b3f7828f9 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:00 -0500 Subject: [PATCH 08/19] Add requires-b2 check to top-level build file. --- build.jam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.jam b/build.jam index 91d63001b..d72c8dda9 100644 --- a/build.jam +++ b/build.jam @@ -3,6 +3,8 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +require-b2 5.1 ; + import project ; project /boost/algorithm From c63c45a932fb1e4fbfea2066b79282d7ff00724e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:55 -0500 Subject: [PATCH 09/19] Bump B2 require to 5.2 --- build.jam | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.jam b/build.jam index d72c8dda9..d5b9263dc 100644 --- a/build.jam +++ b/build.jam @@ -3,9 +3,7 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -require-b2 5.1 ; - -import project ; +require-b2 5.2 ; project /boost/algorithm : common-requirements From 8189606c93b5bd4d136a9a9d9e6459fbe8b73fee Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:03 -0500 Subject: [PATCH 10/19] Update copyright dates. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index d5b9263dc..e8ae15d6f 100644 --- a/build.jam +++ b/build.jam @@ -1,4 +1,4 @@ -# Copyright René Ferdinand Rivera Morell 2023 +# Copyright René Ferdinand Rivera Morell 2023-2024 # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) From 81e46297b55f37fdf9e6a14a3d125820b4a7a69e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:22 -0500 Subject: [PATCH 11/19] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/build.jam b/build.jam index e8ae15d6f..6aac487e3 100644 --- a/build.jam +++ b/build.jam @@ -5,32 +5,35 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/array//boost_array + /boost/assert//boost_assert + /boost/bind//boost_bind + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/core//boost_core + /boost/exception//boost_exception + /boost/function//boost_function + /boost/iterator//boost_iterator + /boost/mpl//boost_mpl + /boost/range//boost_range + /boost/regex//boost_regex + /boost/static_assert//boost_static_assert + /boost/throw_exception//boost_throw_exception + /boost/tuple//boost_tuple + /boost/type_traits//boost_type_traits + /boost/unordered//boost_unordered ; + project /boost/algorithm : common-requirements - /boost/array//boost_array - /boost/assert//boost_assert - /boost/bind//boost_bind - /boost/concept_check//boost_concept_check - /boost/config//boost_config - /boost/core//boost_core - /boost/exception//boost_exception - /boost/function//boost_function - /boost/iterator//boost_iterator - /boost/mpl//boost_mpl - /boost/range//boost_range - /boost/regex//boost_regex - /boost/static_assert//boost_static_assert - /boost/throw_exception//boost_throw_exception - /boost/tuple//boost_tuple - /boost/type_traits//boost_type_traits - /boost/unordered//boost_unordered include ; explicit - [ alias boost_algorithm ] + [ alias boost_algorithm : : : : $(boost_dependencies) ] [ alias all : boost_algorithm example test string/example string/test ] ; call-if : boost-library algorithm ; + From 0c0e84b112d8e8b57c29bc56bcb9f8b6689c3597 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 27 Jul 2024 10:28:38 -0500 Subject: [PATCH 12/19] Adjust self dependencies as inter-lib deps no longer apply globally. --- build.jam | 7 +++++-- example/Jamfile.v2 | 1 + minmax/example/Jamfile | 2 ++ minmax/test/Jamfile.v2 | 6 ++++-- string/example/Jamfile | 1 + string/test/Jamfile.v2 | 22 ++++++++++++---------- test/Jamfile.v2 | 4 +++- 7 files changed, 28 insertions(+), 15 deletions(-) diff --git a/build.jam b/build.jam index 6aac487e3..49099290d 100644 --- a/build.jam +++ b/build.jam @@ -31,9 +31,12 @@ project /boost/algorithm explicit [ alias boost_algorithm : : : : $(boost_dependencies) ] - [ alias all : boost_algorithm example test string/example string/test ] + [ alias all : boost_algorithm test + example + minmax/example minmax/test + string/example string/test + ] ; call-if : boost-library algorithm ; - diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 96163b68c..ce3eca301 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -10,6 +10,7 @@ project : requirements + /boost/algorithm//boost_algorithm speed msvc:_SCL_SECURE_NO_WARNINGS msvc:NOMINMAX diff --git a/minmax/example/Jamfile b/minmax/example/Jamfile index d8650e042..56d771de6 100644 --- a/minmax/example/Jamfile +++ b/minmax/example/Jamfile @@ -7,6 +7,8 @@ # http://www.boost.org/LICENSE_1_0.txt) # +project : requirements /boost/algorithm//boost_algorithm ; + exe minmax_ex : minmax_ex.cpp ; exe minmax_timer : minmax_timer.cpp ; diff --git a/minmax/test/Jamfile.v2 b/minmax/test/Jamfile.v2 index 2e41d1ea1..cdc468cb8 100644 --- a/minmax/test/Jamfile.v2 +++ b/minmax/test/Jamfile.v2 @@ -9,17 +9,19 @@ import testing ; +project : requirements /boost/algorithm//boost_algorithm ; + alias unit_test_framework : # sources /boost/test//unit_test_framework - ; + ; { test-suite algorithm/minmax : [ run minmax_element_test.cpp unit_test_framework : : : : minmax_element ] [ run minmax_test.cpp unit_test_framework - : : : : minmax ] + : : : : minmax ] ; } diff --git a/string/example/Jamfile b/string/example/Jamfile index 74c923f8b..4cbe09d3d 100644 --- a/string/example/Jamfile +++ b/string/example/Jamfile @@ -7,6 +7,7 @@ # # See http://www.boost.org for updates, documentation, and revision history. +project : requirements /boost/algorithm//boost_algorithm ; exe conv_example : conv_example.cpp ; exe predicate_example : predicate_example.cpp ; diff --git a/string/test/Jamfile.v2 b/string/test/Jamfile.v2 index 8e53f336c..adbb275d1 100644 --- a/string/test/Jamfile.v2 +++ b/string/test/Jamfile.v2 @@ -9,31 +9,33 @@ import testing ; +project : requirements /boost/algorithm//boost_algorithm ; + alias unit_test_framework : # sources /boost/test//unit_test_framework - ; + ; test-suite algorithm/string - : [ run + : [ run trim_test.cpp unit_test_framework : : : : trim ] - [ run + [ run conv_test.cpp unit_test_framework : : : : conv ] - [ run + [ run predicate_test.cpp unit_test_framework : : : : predicate ] - [ run + [ run find_test.cpp unit_test_framework : : : @@ -51,23 +53,23 @@ test-suite algorithm/string : : join ] - [ run + [ run replace_test.cpp unit_test_framework : : : : replace ] - [ run + [ run regex_test.cpp unit_test_framework ../../../regex/build//boost_regex : : - : + : : regex ] - [ run + [ run find_format_test.cpp unit_test_framework : : - : + : : find_format ] ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9c8d199ae..581abff34 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -9,6 +9,8 @@ import testing ; +project : requirements /boost/algorithm//boost_algorithm ; + alias unit_test_framework : # sources /boost/test//unit_test_framework @@ -85,7 +87,7 @@ alias unit_test_framework # Is_partitioned_until tests [ run is_partitioned_until_test.cpp unit_test_framework : : : : is_partitioned_until_test ] - + # Apply_permutation tests [ run apply_permutation_test.cpp unit_test_framework : : : : apply_permutation_test ] # Find tests From 5c8e6ce9bac34e5597812845a309938c063e91bb Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 30 Jul 2024 08:03:47 -0500 Subject: [PATCH 13/19] Add timer dependency for minmax examples. --- minmax/example/Jamfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/minmax/example/Jamfile b/minmax/example/Jamfile index 56d771de6..9aa7e6982 100644 --- a/minmax/example/Jamfile +++ b/minmax/example/Jamfile @@ -7,7 +7,10 @@ # http://www.boost.org/LICENSE_1_0.txt) # -project : requirements /boost/algorithm//boost_algorithm ; +project + : requirements + /boost/algorithm//boost_algorithm + /boost/timer//boost_timer ; exe minmax_ex : minmax_ex.cpp ; exe minmax_timer : minmax_timer.cpp ; From bbfcdf1322b334546cf50b23d083a853b94773b6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 8 Aug 2024 21:45:19 -0500 Subject: [PATCH 14/19] Change Boost Test build refs to work with both old and modular test lib targets. --- minmax/test/Jamfile.v2 | 2 +- string/test/Jamfile.v2 | 2 +- test/Jamfile.v2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/minmax/test/Jamfile.v2 b/minmax/test/Jamfile.v2 index cdc468cb8..de74e2c64 100644 --- a/minmax/test/Jamfile.v2 +++ b/minmax/test/Jamfile.v2 @@ -13,7 +13,7 @@ project : requirements /boost/algorithm//boost_algorithm ; alias unit_test_framework : # sources - /boost/test//unit_test_framework + /boost/test//boost_unit_test_framework ; { diff --git a/string/test/Jamfile.v2 b/string/test/Jamfile.v2 index adbb275d1..8c9508504 100644 --- a/string/test/Jamfile.v2 +++ b/string/test/Jamfile.v2 @@ -13,7 +13,7 @@ project : requirements /boost/algorithm//boost_algorithm ; alias unit_test_framework : # sources - /boost/test//unit_test_framework + /boost/test//boost_unit_test_framework ; test-suite algorithm/string diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 581abff34..0c0f93360 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -13,7 +13,7 @@ project : requirements /boost/algorithm//boost_algorithm ; alias unit_test_framework : # sources - /boost/test//unit_test_framework + /boost/test//boost_unit_test_framework ; From 35a55238a735f0f0eb45e94bf3c1f69dc711d617 Mon Sep 17 00:00:00 2001 From: Alexandre Hamez Date: Mon, 13 Jan 2025 11:20:30 +0100 Subject: [PATCH 15/19] Fix documentation for trim_all and trim_fill --- include/boost/algorithm/string/trim_all.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/boost/algorithm/string/trim_all.hpp b/include/boost/algorithm/string/trim_all.hpp index a616f7f33..94f2522bc 100644 --- a/include/boost/algorithm/string/trim_all.hpp +++ b/include/boost/algorithm/string/trim_all.hpp @@ -108,7 +108,6 @@ namespace boost { \param Input An input sequence \param Loc A locale used for 'space' classification - \return A trimmed copy of the input */ template inline void trim_all(SequenceT& Input, const std::locale& Loc =std::locale()) @@ -191,7 +190,6 @@ namespace boost { \param Input An input sequence \param Fill A string used to fill the inner spaces \param Loc A locale used for 'space' classification - \return A trimmed copy of the input */ template inline void trim_fill(SequenceT& Input, const RangeT& Fill, const std::locale& Loc =std::locale()) From 7012619c8056b1b30f88bc57dd39c80c0018214f Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Mon, 5 May 2025 18:01:59 +0200 Subject: [PATCH 16/19] Add missing include --- include/boost/algorithm/searching/boyer_moore.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/boost/algorithm/searching/boyer_moore.hpp b/include/boost/algorithm/searching/boyer_moore.hpp index 80a5a4474..e3c00105c 100644 --- a/include/boost/algorithm/searching/boyer_moore.hpp +++ b/include/boost/algorithm/searching/boyer_moore.hpp @@ -10,6 +10,7 @@ #ifndef BOOST_ALGORITHM_BOYER_MOORE_SEARCH_HPP #define BOOST_ALGORITHM_BOYER_MOORE_SEARCH_HPP +#include // for std::reverse_copy #include // for std::iterator_traits #include From c9e890bb85daf30c92b975e3daed3af0dfcb74ae Mon Sep 17 00:00:00 2001 From: "James E. King III" Date: Mon, 23 Jun 2025 21:06:23 -0400 Subject: [PATCH 17/19] Fix minmax_timer build --- minmax/example/minmax_timer.cpp | 37 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/minmax/example/minmax_timer.cpp b/minmax/example/minmax_timer.cpp index 0ab51a8a4..41aecfcce 100644 --- a/minmax/example/minmax_timer.cpp +++ b/minmax/example/minmax_timer.cpp @@ -15,8 +15,10 @@ // What's the proper BOOST_ flag for vs #include -#include #include +#include +#include +#include template void tie(std::pair p, T1& min, T2& max) @@ -56,17 +58,19 @@ inline int opt_boost_minmax_count(int n) { int repeats = 10; #define TIMER( n, cmd , cmdname ) \ - t.restart(); \ - for (int i=0; i void test_minmax_element(CIterator first, CIterator last, int n, char* name) { typedef typename std::iterator_traits::value_type vtype; - boost::timer t; + boost::timer::cpu_timer t; std::cout << " ON " << name << " WITH OPERATOR<()\n"; TIMER( n, std::min_element(first, last), @@ -99,15 +103,11 @@ void test_minmax_element(CIterator first, CIterator last, int n, char* name) "boost::last_min_last_max_element" << name << " "); #define pred std::bind2nd( std::greater(), vtype(10) ) - TIMER( n, boost::min_element_if(first, last, pred), - "boost::min_element_if" << name << ""); - TIMER( n, boost::max_element_if(first, last, pred), - "boost::max_element_if" << name << ""); - TIMER( n, std::min_element(boost::make_filter_iterator(first, last, pred), - boost::make_filter_iterator(last, last, pred)), + TIMER( n, std::min_element(boost::make_filter_iterator(pred, first, last), + boost::make_filter_iterator(pred, last, last)), "std::min_element_with_filter_iterator" << name << ""); - TIMER( n, std::max_element(boost::make_filter_iterator(first, last, pred), - boost::make_filter_iterator(last, last, pred)), + TIMER( n, std::max_element(boost::make_filter_iterator(pred, first, last), + boost::make_filter_iterator(pred, last, last)), "std::max_element_if_with_filter_iterator" << name << ""); #undef pred @@ -199,10 +199,9 @@ void test(int n) test_range(first, last, n); } -int -main(char argc, char** argv) +int main(int argc, char** argv) { - int n = 100; + int n = 1000; if (argc > 1) n = atoi(argv[1]); if (argc > 2) repeats = atoi(argv[2]); From 4de0842c4739f10e175e4ea642c3083be1f6d7fb Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 25 Aug 2025 17:26:05 +0200 Subject: [PATCH 18/19] Update Link to regression test matrix in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d0d5752fa..80fb526c6 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ Distributed under the [Boost Software License, Version 1.0](http://www.boost.org Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests | :-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- | -[`master`](https://github.com/boostorg/algorithm/tree/master) | [![Build Status](https://travis-ci.org/boostorg/algorithm.svg?branch=master)](https://travis-ci.org/boostorg/algorithm) | [![Build status](https://ci.appveyor.com/api/projects/status/FIXME/branch/master?svg=true)](https://ci.appveyor.com/project/USER/PROJECT/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/99999/badge.svg)](https://scan.coverity.com/projects/boostorg-algorithm) | [![codecov](https://codecov.io/gh/boostorg/algorithm/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/algorithm/branch/master)| [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/algorithm.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/algorithm.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/algorithm.html) -[`develop`](https://github.com/boostorg/algorithm/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/algorithm.svg?branch=develop)](https://travis-ci.org/boostorg/algorithm) | [![Build status](https://ci.appveyor.com/api/projects/status/FIXME/branch/develop?svg=true)](https://ci.appveyor.com/project/USER/PROJECT/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/99999/badge.svg)](https://scan.coverity.com/projects/boostorg-algorithm) | [![codecov](https://codecov.io/gh/boostorg/algorithm/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/algorithm/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/algorithm.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/algorithm.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/algorithm.html) +[`master`](https://github.com/boostorg/algorithm/tree/master) | [![Build Status](https://travis-ci.org/boostorg/algorithm.svg?branch=master)](https://travis-ci.org/boostorg/algorithm) | [![Build status](https://ci.appveyor.com/api/projects/status/FIXME/branch/master?svg=true)](https://ci.appveyor.com/project/USER/PROJECT/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/99999/badge.svg)](https://scan.coverity.com/projects/boostorg-algorithm) | [![codecov](https://codecov.io/gh/boostorg/algorithm/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/algorithm/branch/master)| [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/algorithm.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/algorithm.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](https://regression.boost.io/master/developer/algorithm.html) +[`develop`](https://github.com/boostorg/algorithm/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/algorithm.svg?branch=develop)](https://travis-ci.org/boostorg/algorithm) | [![Build status](https://ci.appveyor.com/api/projects/status/FIXME/branch/develop?svg=true)](https://ci.appveyor.com/project/USER/PROJECT/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/99999/badge.svg)](https://scan.coverity.com/projects/boostorg-algorithm) | [![codecov](https://codecov.io/gh/boostorg/algorithm/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/algorithm/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/algorithm.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/algorithm.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](https://regression.boost.io/develop/developer/algorithm.html) ### Directories From fee839977269158676c5786389090dc9b438958d Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 22 Jan 2026 20:00:01 +0300 Subject: [PATCH 19/19] Remove dependencies on Boost.StaticAssert. Boost.StaticAssert has been merged into Boost.Config, so remove the dependency. --- CMakeLists.txt | 1 - build.jam | 1 - 2 files changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 806b689ee..d51d4bef7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,6 @@ target_link_libraries(boost_algorithm Boost::mpl Boost::range Boost::regex - Boost::static_assert Boost::throw_exception Boost::tuple Boost::type_traits diff --git a/build.jam b/build.jam index 49099290d..33b732316 100644 --- a/build.jam +++ b/build.jam @@ -18,7 +18,6 @@ constant boost_dependencies : /boost/mpl//boost_mpl /boost/range//boost_range /boost/regex//boost_regex - /boost/static_assert//boost_static_assert /boost/throw_exception//boost_throw_exception /boost/tuple//boost_tuple /boost/type_traits//boost_type_traits