mirror of
https://github.com/boostorg/algorithm.git
synced 2025-12-07 17:49:24 +01:00
Compare commits
21 Commits
svn-branch
...
boost-1.37
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbb6522abb | ||
|
|
98a8b08afb | ||
|
|
fc0f3dcffc | ||
|
|
822636418b | ||
|
|
352e16aade | ||
|
|
89c76ea1bb | ||
|
|
50b5726a6f | ||
|
|
d4b95734dd | ||
|
|
05af96f84c | ||
|
|
5bdbb2b308 | ||
|
|
1a02969303 | ||
|
|
6309379618 | ||
|
|
37581bac55 | ||
|
|
a71a4ed5b1 | ||
|
|
c509c3fbad | ||
|
|
d8683f2498 | ||
|
|
7c0101aa51 | ||
|
|
6f3e85528f | ||
|
|
8af639b7cf | ||
|
|
d9bc7e800b | ||
|
|
b4ed9beb90 |
@@ -1,20 +0,0 @@
|
|||||||
#----------------------------------------------------------------------------
|
|
||||||
# This file was automatically generated from the original CMakeLists.txt file
|
|
||||||
# Add a variable to hold the headers for the library
|
|
||||||
set (lib_headers
|
|
||||||
algorithm
|
|
||||||
)
|
|
||||||
|
|
||||||
# Add a library target to the build system
|
|
||||||
boost_library_project(
|
|
||||||
algorithm
|
|
||||||
# SRCDIRS
|
|
||||||
TESTDIRS minmax/test string/test
|
|
||||||
HEADERS ${lib_headers}
|
|
||||||
# DOCDIRS
|
|
||||||
DESCRIPTION "A library of various algorithms."
|
|
||||||
MODULARIZED
|
|
||||||
AUTHORS "Pavol Droba <droba -at- topmail.sk>"
|
|
||||||
"Herve Bronnimann <hbr -at- poly.edu>"
|
|
||||||
# MAINTAINERS
|
|
||||||
)
|
|
||||||
@@ -171,7 +171,7 @@ namespace boost {
|
|||||||
// Check what kind of storage are we using right now
|
// Check what kind of storage are we using right now
|
||||||
if(use_fixed_storage(m_Size))
|
if(use_fixed_storage(m_Size))
|
||||||
{
|
{
|
||||||
// Using fixed storage, allocate new
|
// Using fixed storage, allocate new
|
||||||
set_value_type* pTemp=new set_value_type[Other.m_Size];
|
set_value_type* pTemp=new set_value_type[Other.m_Size];
|
||||||
DestStorage=pTemp;
|
DestStorage=pTemp;
|
||||||
m_Storage.m_dynSet=pTemp;
|
m_Storage.m_dynSet=pTemp;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ be enough. The present library solves both problems.</p>
|
|||||||
<tt>minmax</tt>
|
<tt>minmax</tt>
|
||||||
as straightforward extensions of the C++
|
as straightforward extensions of the C++
|
||||||
standard. As it returns a pair of <tt>const&</tt>, we must use the <a
|
standard. As it returns a pair of <tt>const&</tt>, we must use the <a
|
||||||
href="../../tuple/index.html">Boost.tuple</a> library to construct such
|
href=:../../../../tuple/index.html>Boost.tuple</a> library to construct such
|
||||||
pairs. (Please note: the intent is not to fix the known defaults of
|
pairs. (Please note: the intent is not to fix the known defaults of
|
||||||
<tt>std::min</tt>
|
<tt>std::min</tt>
|
||||||
and <tt>std::max</tt>, but to add one more algorithms that combines both; see the
|
and <tt>std::max</tt>, but to add one more algorithms that combines both; see the
|
||||||
@@ -158,9 +158,9 @@ identical to
|
|||||||
that they return the last instance of the largest element (and not the
|
that they return the last instance of the largest element (and not the
|
||||||
first, as <tt>first_min_element</tt> and <tt>last_max_element</tt> would).
|
first, as <tt>first_min_element</tt> and <tt>last_max_element</tt> would).
|
||||||
<p>The family of algorithms comprising <tt>first_min_first_max_element</tt>,
|
<p>The family of algorithms comprising <tt>first_min_first_max_element</tt>,
|
||||||
<tt>first_min_last_max_element</tt>,
|
<tt>first_min_first_max_element</tt>,
|
||||||
<tt>last_min_first_max_element</tt>,
|
<tt>first_min_first_max_element</tt>,
|
||||||
and <tt>last_min_last_max_element</tt> can be described generically as
|
and <tt>first_min_first_max_element</tt> can be described generically as
|
||||||
follows (using <i><tt>which</tt></i> and
|
follows (using <i><tt>which</tt></i> and
|
||||||
<i><tt>what</tt></i> for <tt>first</tt>
|
<i><tt>what</tt></i> for <tt>first</tt>
|
||||||
or <tt>last</tt>): <tt><i>which</i>_min_<i>what</i>_max_element</tt> finds
|
or <tt>last</tt>): <tt><i>which</i>_min_<i>what</i>_max_element</tt> finds
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
boost_additional_test_dependencies(algorithm BOOST_DEPENDS test)
|
|
||||||
|
|
||||||
boost_test_run(minmax_element_test)
|
|
||||||
boost_test_run(minmax_test)
|
|
||||||
@@ -54,23 +54,23 @@ void test(BOOST_EXPLICIT_TEMPLATE_TYPE(Value))
|
|||||||
less_count<Value> lc(counter);
|
less_count<Value> lc(counter);
|
||||||
|
|
||||||
// Test functionality
|
// Test functionality
|
||||||
tuple<Value const&, Value const&> result1 = boost::minmax(zero, one);
|
tuple<Value const&, Value const&> result1 = minmax(zero, one);
|
||||||
BOOST_CHECK_EQUAL( get<0>(result1), zero );
|
BOOST_CHECK_EQUAL( get<0>(result1), zero );
|
||||||
BOOST_CHECK_EQUAL( get<1>(result1), one );
|
BOOST_CHECK_EQUAL( get<1>(result1), one );
|
||||||
|
|
||||||
tuple<Value const&, Value const&> result2 = boost::minmax(one, zero);
|
tuple<Value const&, Value const&> result2 = minmax(one, zero);
|
||||||
BOOST_CHECK_EQUAL( get<0>(result2), zero );
|
BOOST_CHECK_EQUAL( get<0>(result2), zero );
|
||||||
BOOST_CHECK_EQUAL( get<1>(result2), one );
|
BOOST_CHECK_EQUAL( get<1>(result2), one );
|
||||||
|
|
||||||
// Test functionality and number of comparisons
|
// Test functionality and number of comparisons
|
||||||
lc.reset();
|
lc.reset();
|
||||||
tuple<Value const&, Value const&> result3 = boost::minmax(zero, one, lc );
|
tuple<Value const&, Value const&> result3 = minmax(zero, one, lc );
|
||||||
BOOST_CHECK_EQUAL( get<0>(result3), zero );
|
BOOST_CHECK_EQUAL( get<0>(result3), zero );
|
||||||
BOOST_CHECK_EQUAL( get<1>(result3), one );
|
BOOST_CHECK_EQUAL( get<1>(result3), one );
|
||||||
BOOST_CHECK_EQUAL( counter, 1 );
|
BOOST_CHECK_EQUAL( counter, 1 );
|
||||||
|
|
||||||
lc.reset();
|
lc.reset();
|
||||||
tuple<Value const&, Value const&> result4 = boost::minmax(one, zero, lc );
|
tuple<Value const&, Value const&> result4 = minmax(one, zero, lc );
|
||||||
BOOST_CHECK_EQUAL( get<0>(result4), zero );
|
BOOST_CHECK_EQUAL( get<0>(result4), zero );
|
||||||
BOOST_CHECK_EQUAL( get<1>(result4), one );
|
BOOST_CHECK_EQUAL( get<1>(result4), one );
|
||||||
BOOST_CHECK_EQUAL( counter, 1);
|
BOOST_CHECK_EQUAL( counter, 1);
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
boost_module(algorithm DEPENDS regex concept_check range)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -10,10 +10,7 @@
|
|||||||
import toolset ;
|
import toolset ;
|
||||||
toolset.using doxygen ;
|
toolset.using doxygen ;
|
||||||
|
|
||||||
boostbook string_algo : string_algo.xml autodoc
|
boostbook string_algo : string_algo.xml autodoc ;
|
||||||
:
|
|
||||||
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
|
|
||||||
;
|
|
||||||
|
|
||||||
doxygen autodoc
|
doxygen autodoc
|
||||||
:
|
:
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
boost_additional_test_dependencies(algorithm BOOST_DEPENDS test)
|
|
||||||
|
|
||||||
|
|
||||||
boost_test_run(trim_test)
|
|
||||||
boost_test_run(conv_test)
|
|
||||||
boost_test_run(predicate_test)
|
|
||||||
boost_test_run(find_test)
|
|
||||||
boost_test_run(split_test)
|
|
||||||
boost_test_run(join_test)
|
|
||||||
boost_test_run(replace_test)
|
|
||||||
boost_test_run(regex_test DEPENDS boost_regex SHARED)
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user