mirror of
https://github.com/boostorg/algorithm.git
synced 2025-06-26 04:21:58 +02:00
Compare commits
19 Commits
boost-1.88
...
develop
Author | SHA1 | Date | |
---|---|---|---|
6eb48dd863 | |||
1395fe720c | |||
35a55238a7 | |||
7f07838f8b | |||
bbfcdf1322 | |||
5c8e6ce9ba | |||
0c0e84b112 | |||
81e46297b5 | |||
8189606c93 | |||
c63c45a932 | |||
1213b9fd1f | |||
b3b2ff4d0c | |||
14922e71c0 | |||
fcf95e504b | |||
6b1d2fc5ad | |||
dc14b69189 | |||
61fa3e461f | |||
3401f0398f | |||
1d9706feb7 |
11
Jamfile
11
Jamfile
@ -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 ;
|
|
42
build.jam
Normal file
42
build.jam
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# 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)
|
||||||
|
|
||||||
|
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
|
||||||
|
<include>include
|
||||||
|
;
|
||||||
|
|
||||||
|
explicit
|
||||||
|
[ alias boost_algorithm : : : : <library>$(boost_dependencies) ]
|
||||||
|
[ alias all : boost_algorithm test
|
||||||
|
example
|
||||||
|
minmax/example minmax/test
|
||||||
|
string/example string/test
|
||||||
|
]
|
||||||
|
;
|
||||||
|
|
||||||
|
call-if : boost-library algorithm
|
||||||
|
;
|
@ -18,11 +18,11 @@ using boostbook ;
|
|||||||
|
|
||||||
doxygen autodoc
|
doxygen autodoc
|
||||||
:
|
:
|
||||||
[ glob ../../../boost/algorithm/*.hpp
|
[ glob ../include/boost/algorithm/*.hpp
|
||||||
../../../boost/algorithm/searching/*.hpp
|
../include/boost/algorithm/searching/*.hpp
|
||||||
../../../boost/algorithm/cxx11/*.hpp
|
../include/boost/algorithm/cxx11/*.hpp
|
||||||
../../../boost/algorithm/cxx14/*.hpp
|
../include/boost/algorithm/cxx14/*.hpp
|
||||||
../../../boost/algorithm/cxx17/*.hpp
|
../include/boost/algorithm/cxx17/*.hpp
|
||||||
]
|
]
|
||||||
:
|
:
|
||||||
<doxygen:param>"PREDEFINED=\"BOOST_ALGORITHM_DOXYGEN=1\""
|
<doxygen:param>"PREDEFINED=\"BOOST_ALGORITHM_DOXYGEN=1\""
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
# See http://www.boost.org for updates, documentation, and revision history.
|
# See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
|
||||||
|
|
||||||
project /boost/algorithm/example
|
project
|
||||||
: requirements
|
: requirements
|
||||||
<include>../../../
|
<library>/boost/algorithm//boost_algorithm
|
||||||
<optimization>speed
|
<optimization>speed
|
||||||
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
||||||
<toolset>msvc:<define>NOMINMAX
|
<toolset>msvc:<define>NOMINMAX
|
||||||
|
@ -85,6 +85,22 @@ namespace boost {
|
|||||||
return detail::is_classifiedF(std::ctype_base::alpha, Loc);
|
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
|
//! is_cntrl predicate
|
||||||
/*!
|
/*!
|
||||||
Construct the \c is_classified predicate for the \c ctype_base::cntrl category.
|
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
|
// pull names to the boost namespace
|
||||||
using algorithm::is_classified;
|
using algorithm::is_classified;
|
||||||
using algorithm::is_space;
|
using algorithm::is_space;
|
||||||
|
#ifndef BOOST_NO_CXX11
|
||||||
|
using algorithm::is_blank;
|
||||||
|
#endif
|
||||||
using algorithm::is_alnum;
|
using algorithm::is_alnum;
|
||||||
using algorithm::is_alpha;
|
using algorithm::is_alpha;
|
||||||
using algorithm::is_cntrl;
|
using algorithm::is_cntrl;
|
||||||
|
@ -108,7 +108,6 @@ namespace boost {
|
|||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Loc A locale used for 'space' classification
|
\param Loc A locale used for 'space' classification
|
||||||
\return A trimmed copy of the input
|
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT>
|
template<typename SequenceT>
|
||||||
inline void trim_all(SequenceT& Input, const std::locale& Loc =std::locale())
|
inline void trim_all(SequenceT& Input, const std::locale& Loc =std::locale())
|
||||||
@ -191,7 +190,6 @@ namespace boost {
|
|||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Fill A string used to fill the inner spaces
|
\param Fill A string used to fill the inner spaces
|
||||||
\param Loc A locale used for 'space' classification
|
\param Loc A locale used for 'space' classification
|
||||||
\return A trimmed copy of the input
|
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename RangeT>
|
template<typename SequenceT, typename RangeT>
|
||||||
inline void trim_fill(SequenceT& Input, const RangeT& Fill, const std::locale& Loc =std::locale())
|
inline void trim_fill(SequenceT& Input, const RangeT& Fill, const std::locale& Loc =std::locale())
|
||||||
|
@ -7,6 +7,11 @@
|
|||||||
# http://www.boost.org/LICENSE_1_0.txt)
|
# http://www.boost.org/LICENSE_1_0.txt)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
project
|
||||||
|
: requirements
|
||||||
|
<library>/boost/algorithm//boost_algorithm
|
||||||
|
<library>/boost/timer//boost_timer ;
|
||||||
|
|
||||||
exe minmax_ex : minmax_ex.cpp ;
|
exe minmax_ex : minmax_ex.cpp ;
|
||||||
exe minmax_timer : minmax_timer.cpp ;
|
exe minmax_timer : minmax_timer.cpp ;
|
||||||
|
|
||||||
|
@ -9,9 +9,11 @@
|
|||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
|
project : requirements <library>/boost/algorithm//boost_algorithm ;
|
||||||
|
|
||||||
alias unit_test_framework
|
alias unit_test_framework
|
||||||
: # sources
|
: # sources
|
||||||
/boost//unit_test_framework
|
/boost/test//boost_unit_test_framework
|
||||||
;
|
;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -18,32 +18,32 @@ boostbook string_algo : string_algo.xml autodoc
|
|||||||
|
|
||||||
doxygen autodoc
|
doxygen autodoc
|
||||||
:
|
:
|
||||||
[ glob ../../../../boost/algorithm/string.hpp ]
|
[ glob ../../include/boost/algorithm/string.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string_regex.hpp ]
|
[ glob ../../include/boost/algorithm/string_regex.hpp ]
|
||||||
|
|
||||||
[ glob ../../../../boost/algorithm/string/classification.hpp ]
|
[ glob ../../include/boost/algorithm/string/classification.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/iterator_range.hpp ]
|
[ glob ../../include/boost/algorithm/string/iterator_range.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/sequence_traits.hpp ]
|
[ glob ../../include/boost/algorithm/string/sequence_traits.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/std_containers_traits.hpp ]
|
[ glob ../../include/boost/algorithm/string/std_containers_traits.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/concept.hpp ]
|
[ glob ../../include/boost/algorithm/string/concept.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/compare.hpp ]
|
[ glob ../../include/boost/algorithm/string/compare.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/constants.hpp ]
|
[ glob ../../include/boost/algorithm/string/constants.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/case_conv.hpp ]
|
[ glob ../../include/boost/algorithm/string/case_conv.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/find.hpp ]
|
[ glob ../../include/boost/algorithm/string/find.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/finder.hpp ]
|
[ glob ../../include/boost/algorithm/string/finder.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/find_iterator.hpp ]
|
[ glob ../../include/boost/algorithm/string/find_iterator.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/trim.hpp ]
|
[ glob ../../include/boost/algorithm/string/trim.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/predicate.hpp ]
|
[ glob ../../include/boost/algorithm/string/predicate.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/split.hpp ]
|
[ glob ../../include/boost/algorithm/string/split.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/iter_find.hpp ]
|
[ glob ../../include/boost/algorithm/string/iter_find.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/erase.hpp ]
|
[ glob ../../include/boost/algorithm/string/erase.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/join.hpp ]
|
[ glob ../../include/boost/algorithm/string/join.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/replace.hpp ]
|
[ glob ../../include/boost/algorithm/string/replace.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/find_format.hpp ]
|
[ glob ../../include/boost/algorithm/string/find_format.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/formatter.hpp ]
|
[ glob ../../include/boost/algorithm/string/formatter.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/regex.hpp ]
|
[ glob ../../include/boost/algorithm/string/regex.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/regex_find_format.hpp ]
|
[ glob ../../include/boost/algorithm/string/regex_find_format.hpp ]
|
||||||
[ glob ../../../../boost/algorithm/string/trim_all.hpp ]
|
[ glob ../../include/boost/algorithm/string/trim_all.hpp ]
|
||||||
:
|
:
|
||||||
<doxygen:param>HIDE_UNDOC_MEMBERS=YES
|
<doxygen:param>HIDE_UNDOC_MEMBERS=YES
|
||||||
<doxygen:param>EXTRACT_PRIVATE=NO
|
<doxygen:param>EXTRACT_PRIVATE=NO
|
||||||
|
@ -667,6 +667,13 @@
|
|||||||
<functionname>is_space()</functionname>
|
<functionname>is_space()</functionname>
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>is_blank</entry>
|
||||||
|
<entry>Recognize blanks</entry>
|
||||||
|
<entry>
|
||||||
|
<functionname>is_blank()</functionname>
|
||||||
|
</entry>
|
||||||
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>is_alnum</entry>
|
<entry>is_alnum</entry>
|
||||||
<entry>Recognize alphanumeric characters</entry>
|
<entry>Recognize alphanumeric characters</entry>
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#
|
#
|
||||||
# See http://www.boost.org for updates, documentation, and revision history.
|
# See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
|
||||||
|
project : requirements <library>/boost/algorithm//boost_algorithm ;
|
||||||
|
|
||||||
exe conv_example : conv_example.cpp ;
|
exe conv_example : conv_example.cpp ;
|
||||||
exe predicate_example : predicate_example.cpp ;
|
exe predicate_example : predicate_example.cpp ;
|
||||||
|
@ -9,9 +9,11 @@
|
|||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
|
project : requirements <library>/boost/algorithm//boost_algorithm ;
|
||||||
|
|
||||||
alias unit_test_framework
|
alias unit_test_framework
|
||||||
: # sources
|
: # sources
|
||||||
/boost//unit_test_framework
|
/boost/test//boost_unit_test_framework
|
||||||
;
|
;
|
||||||
|
|
||||||
test-suite algorithm/string
|
test-suite algorithm/string
|
||||||
|
@ -139,6 +139,11 @@ void classification_test()
|
|||||||
TEST_CLASS( is_any_of( "abc" ), "aaabbcc", "aaxb" );
|
TEST_CLASS( is_any_of( "abc" ), "aaabbcc", "aaxb" );
|
||||||
TEST_CLASS( is_from_range( 'a', 'c' ), "aaabbcc", "aaxb" );
|
TEST_CLASS( is_from_range( 'a', 'c' ), "aaabbcc", "aaxb" );
|
||||||
|
|
||||||
|
#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 " );
|
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" );
|
TEST_CLASS( ( !is_any_of("abc") && is_from_range('a','e') ) || is_space(), "d e", "abcde" );
|
||||||
|
|
||||||
|
@ -9,9 +9,11 @@
|
|||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
|
project : requirements <library>/boost/algorithm//boost_algorithm ;
|
||||||
|
|
||||||
alias unit_test_framework
|
alias unit_test_framework
|
||||||
: # sources
|
: # sources
|
||||||
/boost//unit_test_framework
|
/boost/test//boost_unit_test_framework
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user