mirror of
https://github.com/boostorg/algorithm.git
synced 2025-06-25 20:11:50 +02:00
Compare commits
12 Commits
boost-1.75
...
boost-1.34
Author | SHA1 | Date | |
---|---|---|---|
9b067fde76 | |||
1a02969303 | |||
6309379618 | |||
37581bac55 | |||
a71a4ed5b1 | |||
c509c3fbad | |||
d8683f2498 | |||
7c0101aa51 | |||
6f3e85528f | |||
8af639b7cf | |||
d9bc7e800b | |||
b4ed9beb90 |
@ -20,6 +20,7 @@
|
|||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
#include <boost/algorithm/string/find.hpp>
|
#include <boost/algorithm/string/find.hpp>
|
||||||
#include <boost/algorithm/string/split.hpp>
|
#include <boost/algorithm/string/split.hpp>
|
||||||
|
#include <boost/algorithm/string/join.hpp>
|
||||||
#include <boost/algorithm/string/replace.hpp>
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
#include <boost/algorithm/string/erase.hpp>
|
#include <boost/algorithm/string/erase.hpp>
|
||||||
#include <boost/algorithm/string/classification.hpp>
|
#include <boost/algorithm/string/classification.hpp>
|
||||||
|
@ -67,7 +67,7 @@ namespace boost {
|
|||||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||||
return std::toupper(Arg1)==std::toupper(Arg2);
|
return std::toupper(Arg1)==std::toupper(Arg2);
|
||||||
#else
|
#else
|
||||||
return std::toupper(Arg1,m_Loc)==std::toupper(Arg2,m_Loc);
|
return std::toupper<T1>(Arg1,m_Loc)==std::toupper<T2>(Arg2,m_Loc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ namespace boost {
|
|||||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||||
return std::toupper(Arg1)<std::toupper(Arg2);
|
return std::toupper(Arg1)<std::toupper(Arg2);
|
||||||
#else
|
#else
|
||||||
return std::toupper(Arg1,m_Loc)<std::toupper(Arg2,m_Loc);
|
return std::toupper<T1>(Arg1,m_Loc)<std::toupper<T2>(Arg2,m_Loc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ namespace boost {
|
|||||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||||
return std::toupper(Arg1)<=std::toupper(Arg2);
|
return std::toupper(Arg1)<=std::toupper(Arg2);
|
||||||
#else
|
#else
|
||||||
return std::toupper(Arg1,m_Loc)<=std::toupper(Arg2,m_Loc);
|
return std::toupper<T1>(Arg1,m_Loc)<=std::toupper<T2>(Arg2,m_Loc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ namespace boost {
|
|||||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||||
return std::tolower( Ch);
|
return std::tolower( Ch);
|
||||||
#else
|
#else
|
||||||
return std::tolower( Ch, m_Loc );
|
return std::tolower<CharT>( Ch, m_Loc );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
@ -53,7 +53,7 @@ namespace boost {
|
|||||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||||
return std::toupper( Ch);
|
return std::toupper( Ch);
|
||||||
#else
|
#else
|
||||||
return std::toupper( Ch, m_Loc );
|
return std::toupper<CharT>( Ch, m_Loc );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
@ -46,7 +46,7 @@ namespace boost {
|
|||||||
return std::use_facet< std::ctype<CharT> >(m_Locale).is( m_Type, Ch );
|
return std::use_facet< std::ctype<CharT> >(m_Locale).is( m_Type, Ch );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x582) && !defined(_USE_OLD_RW_STL)
|
||||||
template<>
|
template<>
|
||||||
bool operator()( char const Ch ) const
|
bool operator()( char const Ch ) const
|
||||||
{
|
{
|
||||||
|
@ -26,20 +26,17 @@ namespace boost {
|
|||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
typename InputT,
|
typename InputT,
|
||||||
typename FinderT,
|
|
||||||
typename FormatterT,
|
typename FormatterT,
|
||||||
typename FindResultT >
|
typename FindResultT >
|
||||||
inline OutputIteratorT find_format_copy_impl(
|
inline OutputIteratorT find_format_copy_impl(
|
||||||
OutputIteratorT Output,
|
OutputIteratorT Output,
|
||||||
const InputT& Input,
|
const InputT& Input,
|
||||||
FinderT Finder,
|
|
||||||
FormatterT Formatter,
|
FormatterT Formatter,
|
||||||
const FindResultT& FindResult )
|
const FindResultT& FindResult )
|
||||||
{
|
{
|
||||||
return find_format_copy_impl2(
|
return find_format_copy_impl2(
|
||||||
Output,
|
Output,
|
||||||
Input,
|
Input,
|
||||||
Finder,
|
|
||||||
Formatter,
|
Formatter,
|
||||||
FindResult,
|
FindResult,
|
||||||
Formatter(FindResult) );
|
Formatter(FindResult) );
|
||||||
@ -48,14 +45,12 @@ namespace boost {
|
|||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
typename InputT,
|
typename InputT,
|
||||||
typename FinderT,
|
|
||||||
typename FormatterT,
|
typename FormatterT,
|
||||||
typename FindResultT,
|
typename FindResultT,
|
||||||
typename FormatResultT >
|
typename FormatResultT >
|
||||||
inline OutputIteratorT find_format_copy_impl2(
|
inline OutputIteratorT find_format_copy_impl2(
|
||||||
OutputIteratorT Output,
|
OutputIteratorT Output,
|
||||||
const InputT& Input,
|
const InputT& Input,
|
||||||
FinderT Finder,
|
|
||||||
FormatterT Formatter,
|
FormatterT Formatter,
|
||||||
const FindResultT& FindResult,
|
const FindResultT& FindResult,
|
||||||
const FormatResultT& FormatResult )
|
const FormatResultT& FormatResult )
|
||||||
@ -91,18 +86,15 @@ namespace boost {
|
|||||||
|
|
||||||
template<
|
template<
|
||||||
typename InputT,
|
typename InputT,
|
||||||
typename FinderT,
|
|
||||||
typename FormatterT,
|
typename FormatterT,
|
||||||
typename FindResultT >
|
typename FindResultT >
|
||||||
inline InputT find_format_copy_impl(
|
inline InputT find_format_copy_impl(
|
||||||
const InputT& Input,
|
const InputT& Input,
|
||||||
FinderT Finder,
|
|
||||||
FormatterT Formatter,
|
FormatterT Formatter,
|
||||||
const FindResultT& FindResult)
|
const FindResultT& FindResult)
|
||||||
{
|
{
|
||||||
return find_format_copy_impl2(
|
return find_format_copy_impl2(
|
||||||
Input,
|
Input,
|
||||||
Finder,
|
|
||||||
Formatter,
|
Formatter,
|
||||||
FindResult,
|
FindResult,
|
||||||
Formatter(FindResult) );
|
Formatter(FindResult) );
|
||||||
@ -110,13 +102,11 @@ namespace boost {
|
|||||||
|
|
||||||
template<
|
template<
|
||||||
typename InputT,
|
typename InputT,
|
||||||
typename FinderT,
|
|
||||||
typename FormatterT,
|
typename FormatterT,
|
||||||
typename FindResultT,
|
typename FindResultT,
|
||||||
typename FormatResultT >
|
typename FormatResultT >
|
||||||
inline InputT find_format_copy_impl2(
|
inline InputT find_format_copy_impl2(
|
||||||
const InputT& Input,
|
const InputT& Input,
|
||||||
FinderT Finder,
|
|
||||||
FormatterT Formatter,
|
FormatterT Formatter,
|
||||||
const FindResultT& FindResult,
|
const FindResultT& FindResult,
|
||||||
const FormatResultT& FormatResult)
|
const FormatResultT& FormatResult)
|
||||||
@ -151,18 +141,15 @@ namespace boost {
|
|||||||
|
|
||||||
template<
|
template<
|
||||||
typename InputT,
|
typename InputT,
|
||||||
typename FinderT,
|
|
||||||
typename FormatterT,
|
typename FormatterT,
|
||||||
typename FindResultT >
|
typename FindResultT >
|
||||||
inline void find_format_impl(
|
inline void find_format_impl(
|
||||||
InputT& Input,
|
InputT& Input,
|
||||||
FinderT Finder,
|
|
||||||
FormatterT Formatter,
|
FormatterT Formatter,
|
||||||
const FindResultT& FindResult)
|
const FindResultT& FindResult)
|
||||||
{
|
{
|
||||||
find_format_impl2(
|
find_format_impl2(
|
||||||
Input,
|
Input,
|
||||||
Finder,
|
|
||||||
Formatter,
|
Formatter,
|
||||||
FindResult,
|
FindResult,
|
||||||
Formatter(FindResult) );
|
Formatter(FindResult) );
|
||||||
@ -170,13 +157,11 @@ namespace boost {
|
|||||||
|
|
||||||
template<
|
template<
|
||||||
typename InputT,
|
typename InputT,
|
||||||
typename FinderT,
|
|
||||||
typename FormatterT,
|
typename FormatterT,
|
||||||
typename FindResultT,
|
typename FindResultT,
|
||||||
typename FormatResultT >
|
typename FormatResultT >
|
||||||
inline void find_format_impl2(
|
inline void find_format_impl2(
|
||||||
InputT& Input,
|
InputT& Input,
|
||||||
FinderT,
|
|
||||||
FormatterT Formatter,
|
FormatterT Formatter,
|
||||||
const FindResultT& FindResult,
|
const FindResultT& FindResult,
|
||||||
const FormatResultT& FormatResult)
|
const FormatResultT& FormatResult)
|
||||||
|
@ -71,7 +71,6 @@ namespace boost {
|
|||||||
return detail::find_format_copy_impl(
|
return detail::find_format_copy_impl(
|
||||||
Output,
|
Output,
|
||||||
Input,
|
Input,
|
||||||
Finder,
|
|
||||||
Formatter,
|
Formatter,
|
||||||
Finder( begin(Input), end(Input) ) );
|
Finder( begin(Input), end(Input) ) );
|
||||||
}
|
}
|
||||||
@ -100,7 +99,6 @@ namespace boost {
|
|||||||
|
|
||||||
return detail::find_format_copy_impl(
|
return detail::find_format_copy_impl(
|
||||||
Input,
|
Input,
|
||||||
Finder,
|
|
||||||
Formatter,
|
Formatter,
|
||||||
Finder(begin(Input), end(Input)));
|
Finder(begin(Input), end(Input)));
|
||||||
}
|
}
|
||||||
@ -134,7 +132,6 @@ namespace boost {
|
|||||||
|
|
||||||
detail::find_format_impl(
|
detail::find_format_impl(
|
||||||
Input,
|
Input,
|
||||||
Finder,
|
|
||||||
Formatter,
|
Formatter,
|
||||||
Finder(begin(Input), end(Input)));
|
Finder(begin(Input), end(Input)));
|
||||||
}
|
}
|
||||||
|
@ -584,7 +584,7 @@ namespace boost {
|
|||||||
|
|
||||||
// Construct container to hold the result
|
// Construct container to hold the result
|
||||||
ResultT Result;
|
ResultT Result;
|
||||||
|
|
||||||
|
|
||||||
// Roll to the first element that will be added
|
// Roll to the first element that will be added
|
||||||
while(
|
while(
|
||||||
@ -630,6 +630,14 @@ namespace boost {
|
|||||||
using algorithm::find_all_regex;
|
using algorithm::find_all_regex;
|
||||||
using algorithm::split_regex;
|
using algorithm::split_regex;
|
||||||
|
|
||||||
|
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||||
|
using algorithm::join_if;
|
||||||
|
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||||
|
using algorithm::join_if_regex;
|
||||||
|
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
# Boost.Minmax Library Example Jamfile
|
|
||||||
#
|
|
||||||
# Copyright (C) 2002--2004, Herve Bronnimann
|
|
||||||
#
|
|
||||||
# Use, modification, and distribution is 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)
|
|
||||||
#
|
|
||||||
|
|
||||||
subproject libs/algorithm/minmax/example ;
|
|
||||||
|
|
||||||
exe minmax_ex : minmax_ex.cpp ;
|
|
||||||
exe minmax_timer : minmax_timer.cpp ;
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
# Boost.Minmax Library Test Jamfile
|
|
||||||
#
|
|
||||||
# Copyright (C) 2002--2004, Herve Bronnimann
|
|
||||||
#
|
|
||||||
# Use, modification, and distribution is 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)
|
|
||||||
#
|
|
||||||
|
|
||||||
subproject libs/algorithm/minmax/test ;
|
|
||||||
|
|
||||||
# bring in rules for testing
|
|
||||||
import testing ;
|
|
||||||
|
|
||||||
# Make tests run by default.
|
|
||||||
DEPENDS all : test ;
|
|
||||||
|
|
||||||
{
|
|
||||||
test-suite algorithm/minmax
|
|
||||||
: [ run
|
|
||||||
minmax_element_test.cpp
|
|
||||||
: :
|
|
||||||
:
|
|
||||||
: minmax_element
|
|
||||||
]
|
|
||||||
[ run
|
|
||||||
minmax_test.cpp
|
|
||||||
: :
|
|
||||||
:
|
|
||||||
: minmax
|
|
||||||
]
|
|
||||||
;
|
|
||||||
}
|
|
@ -1,6 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
<section id="string_algo.concept" last-revision="$Date$">
|
<section id="string_algo.concept" last-revision="$Date$">
|
||||||
<title>Concepts</title>
|
<title>Concepts</title>
|
||||||
|
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
<section id="string_algo.credits" last-revision="$Date$">
|
<section id="string_algo.credits" last-revision="$Date$">
|
||||||
<title>Credits</title>
|
<title>Credits</title>
|
||||||
<section id="string_algo.ack">
|
<section id="string_algo.ack">
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
<section id="string_algo.design" last-revision="$Date$">
|
<section id="string_algo.design" last-revision="$Date$">
|
||||||
<title>Design Topics</title>
|
<title>Design Topics</title>
|
||||||
|
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
<section id="string_algo.env" last-revision="$Date$">
|
<section id="string_algo.env" last-revision="$Date$">
|
||||||
<title>Environment</title>
|
<title>Environment</title>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title> Concepts and External Concepts </title><meta http-equiv="Content-Type"content="text/html; charset=iso-8859-1"></head> <body><table ><tr ><td ><img src="../../../../boost.png" width="100%" border="0"></td><td ><h1 >Concepts and External Concepts</h1></td></tr></table><p >Generic programming in C++ is characterized by the use of function and class templates where
|
|
||||||
the template parameter(s) must satisfy certain requirements.Often these
|
|
||||||
requirements are so important that we give them a name: we call
|
|
||||||
such a set of type requirements a <b>concept</b>. We say that a type <i>
|
|
||||||
conforms to a concept</i> or that it <i>is a model of a concept</i> if it
|
|
||||||
satisfies all of those requirements. The concept can be specified as a set
|
|
||||||
of member functions with well-defined semantics
|
|
||||||
and a set of nested typedefs with well-defined properties.</p><p >Often it much more flexible to provide free-standing functions and typedefs
|
|
||||||
which provides the exact same semantics (but a different syntax) as
|
|
||||||
specified
|
|
||||||
by the concept. This allows generic code to treat different types <i> as if
|
|
||||||
</i> they fulfilled the concept. In this case we say that the concept has
|
|
||||||
been <b> externalized </b> or that the new requirements constitutes an <b>external
|
|
||||||
concept </b>. We say that a type <i> conforms to an external concept </i>
|
|
||||||
or that it <i> is a model of an external concept </i>. A concept may exist
|
|
||||||
without a corresponding external concept and conversely.</p><p >Whenever a concept specifies a member function, the corresponding external
|
|
||||||
concept
|
|
||||||
must specify a free-standing function of the same name, same return type and
|
|
||||||
the same argument list except there is an extra first argument which must
|
|
||||||
be of the type (or a reference to that type) that is to fulfill the external
|
|
||||||
concept. If the corresonding member function has any cv-qulifiers, the
|
|
||||||
first argument must have the same cv-qualifiers. Whenever a concept
|
|
||||||
specifies a nested typedef, the corresponding external concept
|
|
||||||
specifies a <b>type-generator</b>, that is, a type with a nested typedef
|
|
||||||
named <code>type</code>. The type-generator has the name as the nested typedef with
|
|
||||||
<code>_of</code> appended.
|
|
||||||
The converse relationship of an external concept and its corresponding concept
|
|
||||||
also holds.</p><p ><b ><i >Example:</i></b></p><p >A type <code>T</code> fulfills the FooConcept if it
|
|
||||||
has the follwing public members:</p><code> void T::foo( int ) const; <br>
|
|
||||||
int T::bar(); <br>
|
|
||||||
typedef <i>implementation defined </i> foo_type;</code><p >The corresponding external concept is the ExternalFooConcept.</p><p >A type <code>T</code> fullfills the ExternalFooConcept if these
|
|
||||||
free-standing functions and type-generators exists:</p><code>void foo( const T&, int ); <br>
|
|
||||||
int bar( T& ); <br>
|
|
||||||
foo_type_of< T >::type;</code> <br> <br><hr size="1" ><h3 >Literature</h3><ul ><li > <a href="http://www.boost.org/more/generic_programming.html#type_generator" target="_self" >Type Generators</a> </li><li > <a href="http://www.boost.org/more/generic_programming.html#concept" target="_self" >Concepts</a> </li><li > <a href="http://www.sgi.com/tech/stl/stl_introduction.html" target="_self" >Concepts and SGI STL</a> </li></ul><hr size="1" ><p >© Thorsten Ottosen 2003-2004 (nesotto_AT_cs.auc.dk).
|
|
||||||
Permission to copy, use, modify, sell and distribute this software is granted provided this copyright notice appears
|
|
||||||
in all copies. This software is provided "as is" without express or implied warranty, and with no
|
|
||||||
claim as to its suitability for any purpose.</p><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></body></html>
|
|
||||||
<!-- Copyright Dezide Aps 2003-2004 -->
|
|
@ -1,6 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
<section id="string_algo.intro" last-revision="$Date$">
|
<section id="string_algo.intro" last-revision="$Date$">
|
||||||
<title>Introduction</title>
|
<title>Introduction</title>
|
||||||
|
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
<section id="string_algo.quickref" last-revision="$Date$">
|
<section id="string_algo.quickref" last-revision="$Date$">
|
||||||
<title>Quick Reference</title>
|
<title>Quick Reference</title>
|
||||||
|
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
<section id="string_algo.rationale" last-revision="$Date$">
|
<section id="string_algo.rationale" last-revision="$Date$">
|
||||||
<title>Rationale</title>
|
<title>Rationale</title>
|
||||||
|
|
||||||
|
@ -1,7 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
<section id="string_algo.release_notes" last-revision="$Date$">
|
<section id="string_algo.release_notes" last-revision="$Date$">
|
||||||
|
|
||||||
|
<using-namespace name="boost"/>
|
||||||
|
<using-namespace name="boost::algorithm"/>
|
||||||
|
|
||||||
<title>Release Notes</title>
|
<title>Release Notes</title>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
@ -13,5 +23,23 @@
|
|||||||
<para><emphasis role="bold">1.33</emphasis></para>
|
<para><emphasis role="bold">1.33</emphasis></para>
|
||||||
<para>Internal version of collection traits removed, library adapted to Boost.Range</para>
|
<para>Internal version of collection traits removed, library adapted to Boost.Range</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para><emphasis role="bold">1.34</emphasis></para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<functionname>lexicographical_compare()</functionname>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<functionname>join()</functionname> and <functionname>join_if()</functionname>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
New comparison predicates <code>is_less</code>, <code>is_not_greater</code>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
Negative indexes support (like Perl) in various algorihtms
|
||||||
|
(<code>*_head/tail</code>, <code>*_nth</code>).
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
<library name="String Algorithms" dirname="algorithm/string" xmlns:xi="http://www.w3.org/2001/XInclude"
|
<library name="String Algorithms" dirname="algorithm/string" xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
id="string_algo" last-revision="$Date$">
|
id="string_algo" last-revision="$Date$">
|
||||||
<libraryinfo>
|
<libraryinfo>
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
<section id="string_algo.usage" last-revision="$Date$">
|
<section id="string_algo.usage" last-revision="$Date$">
|
||||||
<title>Usage</title>
|
<title>Usage</title>
|
||||||
|
|
||||||
@ -283,9 +289,9 @@
|
|||||||
// aBC
|
// aBC
|
||||||
|
|
||||||
typedef split_iterator<string::iterator> string_split_iterator;
|
typedef split_iterator<string::iterator> string_split_iterator;
|
||||||
for(string_find_iterator It=
|
for(string_split_iterator It=
|
||||||
make_split_iterator(str1, first_finder("-*-", is_iequal()));
|
make_split_iterator(str1, first_finder("-*-", is_iequal()));
|
||||||
It!=string_find_iterator();
|
It!=string_split_iterator();
|
||||||
++It)
|
++It)
|
||||||
{
|
{
|
||||||
cout << copy_range<std::string>(*It) << endl;
|
cout << copy_range<std::string>(*It) << endl;
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
# Boost string_algo library examples Jamfile ---------------------------------
|
|
||||||
#
|
|
||||||
# Copyright Pavol Droba 2002-2003. Use, modification and
|
|
||||||
# distribution is 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)
|
|
||||||
#
|
|
||||||
# See http://www.boost.org for updates, documentation, and revision history.
|
|
||||||
|
|
||||||
subproject libs/algorithm/string/example ;
|
|
||||||
|
|
||||||
exe conv_example
|
|
||||||
:
|
|
||||||
conv_example.cpp
|
|
||||||
:
|
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
:
|
|
||||||
;
|
|
||||||
|
|
||||||
exe predicate_example
|
|
||||||
:
|
|
||||||
predicate_example.cpp
|
|
||||||
:
|
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
:
|
|
||||||
;
|
|
||||||
|
|
||||||
exe find_example
|
|
||||||
:
|
|
||||||
find_example.cpp
|
|
||||||
:
|
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
:
|
|
||||||
;
|
|
||||||
|
|
||||||
exe replace_example
|
|
||||||
:
|
|
||||||
replace_example.cpp
|
|
||||||
:
|
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
:
|
|
||||||
;
|
|
||||||
|
|
||||||
exe rle_example
|
|
||||||
:
|
|
||||||
rle_example.cpp
|
|
||||||
:
|
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
:
|
|
||||||
;
|
|
||||||
|
|
||||||
exe trim_example
|
|
||||||
:
|
|
||||||
trim_example.cpp
|
|
||||||
:
|
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
:
|
|
||||||
;
|
|
||||||
|
|
||||||
exe regex_example
|
|
||||||
:
|
|
||||||
regex_example.cpp
|
|
||||||
<lib>../../../regex/build/boost_regex
|
|
||||||
:
|
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
:
|
|
||||||
;
|
|
||||||
|
|
||||||
exe split_example
|
|
||||||
:
|
|
||||||
split_example.cpp
|
|
||||||
:
|
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
:
|
|
||||||
;
|
|
@ -1,9 +1,20 @@
|
|||||||
|
|
||||||
|
<!-- Copyright (c) 2002-2006 Pavol Droba.
|
||||||
|
Subject to the Boost Software License, Version 1.0.
|
||||||
|
(See accompanying file LICENSE-1.0 or http://www.boost.org/LICENSE-1.0)
|
||||||
|
-->
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="refresh" content="0; URL=../../../doc/html/string_algo.html">
|
<meta http-equiv="refresh" content="0; URL=../../../doc/html/string_algo.html">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
Automatic redirection failed, please go to
|
Automatic redirection failed, please go to
|
||||||
<a href="../../../doc/html/string_algo.html">../../doc/html/string_algo.html</a>
|
<a href="../../../doc/html/string_algo.html">../../doc/html/string_algo.html</a>
|
||||||
|
<hr>
|
||||||
|
<p><EFBFBD> Copyright Beman Dawes, 2001</p>
|
||||||
|
<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
file <a href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy
|
||||||
|
at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,85 +0,0 @@
|
|||||||
# Boost string_algo library test suite Jamfile ----------------------------
|
|
||||||
#
|
|
||||||
# Copyright Pavol Droba 2002-2003. Use, modification and
|
|
||||||
# distribution is 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)
|
|
||||||
#
|
|
||||||
# See http://www.boost.org for updates, documentation, and revision history.
|
|
||||||
|
|
||||||
subproject libs/algorithm/string/test ;
|
|
||||||
|
|
||||||
# bring in rules for testing
|
|
||||||
import testing ;
|
|
||||||
|
|
||||||
# Make tests run by default.
|
|
||||||
DEPENDS all : test ;
|
|
||||||
|
|
||||||
{
|
|
||||||
test-suite algorithm/string
|
|
||||||
: [ run
|
|
||||||
trim_test.cpp
|
|
||||||
: :
|
|
||||||
:
|
|
||||||
std::locale-support
|
|
||||||
std::facet-support
|
|
||||||
: trim
|
|
||||||
]
|
|
||||||
[ run
|
|
||||||
conv_test.cpp
|
|
||||||
: :
|
|
||||||
:
|
|
||||||
std::locale-support
|
|
||||||
std::facet-support
|
|
||||||
: conv
|
|
||||||
]
|
|
||||||
[ run
|
|
||||||
predicate_test.cpp
|
|
||||||
: :
|
|
||||||
:
|
|
||||||
std::locale-support
|
|
||||||
std::facet-support
|
|
||||||
: predicate
|
|
||||||
]
|
|
||||||
[ run
|
|
||||||
find_test.cpp
|
|
||||||
: :
|
|
||||||
:
|
|
||||||
std::locale-support
|
|
||||||
std::facet-support
|
|
||||||
: find
|
|
||||||
]
|
|
||||||
[ run
|
|
||||||
split_test.cpp
|
|
||||||
: :
|
|
||||||
:
|
|
||||||
std::locale-support
|
|
||||||
std::facet-support
|
|
||||||
: split
|
|
||||||
]
|
|
||||||
[ run
|
|
||||||
join_test.cpp
|
|
||||||
: :
|
|
||||||
:
|
|
||||||
std::locale-support
|
|
||||||
std::facet-support
|
|
||||||
: join
|
|
||||||
]
|
|
||||||
[ run
|
|
||||||
replace_test.cpp
|
|
||||||
: :
|
|
||||||
:
|
|
||||||
std::locale-support
|
|
||||||
std::facet-support
|
|
||||||
: replace
|
|
||||||
]
|
|
||||||
[ run
|
|
||||||
regex_test.cpp
|
|
||||||
<lib>../../../regex/build/boost_regex
|
|
||||||
: :
|
|
||||||
:
|
|
||||||
: regex
|
|
||||||
]
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
Reference in New Issue
Block a user