forked from boostorg/range
Compare commits
41 Commits
svn-branch
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
3c1bbeed1e | |||
14a9a1906b | |||
f65c137e73 | |||
8085605217 | |||
0eb365edbe | |||
2e0d7eab4a | |||
637dc618d1 | |||
dd1459f221 | |||
ba96d075b2 | |||
a2f3a45214 | |||
6ac0cfe09c | |||
7b3857a9a8 | |||
2605b9ee45 | |||
1509d5603b | |||
93deddde63 | |||
68a63cab85 | |||
06c54ccd48 | |||
2e298b5e60 | |||
00e70244a5 | |||
3f98d69c94 | |||
4767db522b | |||
f6e555dda3 | |||
01826978d6 | |||
336c12b60f | |||
82768af3d2 | |||
8984de1c74 | |||
4db083cd6d | |||
f4cde208f2 | |||
d130dff5ec | |||
aa9158b199 | |||
bbd9fdb7bd | |||
17514e1d44 | |||
d759c23552 | |||
cf9ad808a6 | |||
028bff0c22 | |||
33a8016af3 | |||
24466ae189 | |||
c8ffe55ae5 | |||
a862a573df | |||
0b0dfc0e06 | |||
e0a76af0f9 |
@ -1,13 +1,3 @@
|
||||
#// Boost.Range library
|
||||
#//
|
||||
#// Copyright Thorsten Ottosen 2003-2008. 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)
|
||||
#//
|
||||
#// For more information, see http://www.boost.org/libs/range/
|
||||
#//
|
||||
|
||||
|
||||
use-project boost : $(BOOST_ROOT) ;
|
||||
|
||||
|
@ -493,7 +493,7 @@ class=identifier>T</span><span class=special>& </span><span class=identifier
|
||||
</p>
|
||||
<p>
|
||||
<code>as_literal()</code> can be used <i>internally</i> in string
|
||||
algorithm librararies such that arrays of characters are
|
||||
algorithm librararies to such that arrays of characters are
|
||||
handled correctly.
|
||||
</p>
|
||||
<p>
|
||||
@ -745,13 +745,7 @@ class=identifier>T</span><span class=special>& </span><span class=identifier
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
© <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file LICENSE_1_0.txt or copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
|
||||
(C) Copyright Thorsten Ottosen 2003-2007
|
||||
</p>
|
||||
<br>
|
||||
<br>
|
||||
|
@ -1,13 +1,3 @@
|
||||
// Boost.Range library
|
||||
//
|
||||
// Copyright Thorsten Ottosen 2003-2008. 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)
|
||||
//
|
||||
// For more information, see http://www.boost.org/libs/range/
|
||||
//
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <iterator> // for std::iterator_traits, std::distance()
|
||||
|
||||
|
@ -41,16 +41,9 @@
|
||||
<li> <a href="../test/array.cpp">array.cpp</a>
|
||||
</ul>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
© <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file LICENSE_1_0.txt or copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
11
doc/faq.html
11
doc/faq.html
@ -114,16 +114,9 @@ Cool indeed!
|
||||
</ol>
|
||||
|
||||
|
||||
<hr>
|
||||
<hr>
|
||||
<p>
|
||||
© <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file LICENSE_1_0.txt or copy
|
||||
at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -173,14 +173,7 @@
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
© <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file LICENSE_1_0.txt or copy
|
||||
at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
|
||||
(C) Copyright Thorsten Ottosen 2003-2007
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -18,10 +18,10 @@
|
||||
|
||||
<h2 >History and Acknowledgement</h2><a name="History" ></a>
|
||||
<p >
|
||||
The library was under way for a long time. Dietmar K<>hl originally intended
|
||||
to submit an <code >array_traits</code> class template which had most of
|
||||
the functionality present now, but only for arrays and standard containers.
|
||||
I believe this was back in 2001 or 2002.
|
||||
The library have been under way for a long time. Dietmar K<>hl originally
|
||||
intended to submit an <code >array_traits</code> class template which
|
||||
had most of the functionality present now, but only for arrays and standard
|
||||
containers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@ -61,14 +61,7 @@ C++ standard: <blockquote>
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
© <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file LICENSE_1_0.txt or copy
|
||||
at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
|
||||
(C) Copyright Thorsten Ottosen 2003-2006
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -63,7 +63,8 @@ free-standing functions so syntactic and/or semantic differences can be removed.
|
||||
|
||||
</ul>
|
||||
</p>
|
||||
<p > Below is given a small example (the complete example can be found <a
|
||||
<p >
|
||||
Below are given a small example (the complete example can be found <a
|
||||
href="../test/algorithm_example.cpp" target="_self" >here</a>): <blockquote>
|
||||
<pre >
|
||||
<span class=comment>
|
||||
@ -135,14 +136,7 @@ Notice that we have to
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
© <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file LICENSE_1_0.txt or copy
|
||||
at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
|
||||
(C) Copyright Thorsten Ottosen 2003-2007
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -35,7 +35,7 @@ href="http://boost.sourceforge.net/regression-logs/developer/range.html">here</a
|
||||
</p>
|
||||
<p >
|
||||
Notice also that some compilers cannot do function template ordering properly.
|
||||
In that case one must rely on <a
|
||||
In that case one must rely of <a
|
||||
href="boost_range.html#range_iterator"><code >range_iterator</code></a>
|
||||
and a single function definition instead of overloaded versions for const and
|
||||
non-const arguments.
|
||||
@ -73,18 +73,11 @@ href="http://boost.sourceforge.net/regression-logs/developer/range.html">here</a
|
||||
</ol>
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
<hr>
|
||||
<p>
|
||||
© <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file LICENSE_1_0.txt or copy
|
||||
at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
@ -352,16 +352,34 @@ href="../../iterator/doc/new-iter-concepts.html#random-access-traversal-iterator
|
||||
<p> <a href="../../concept_check/concept_check.htm">Boost Concept Check library</a></p>
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
© <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file LICENSE_1_0.txt or copy
|
||||
at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
<!--
|
||||
<h3>Notes</h3>
|
||||
|
||||
|
||||
<P>
|
||||
<A name="1">[1]</A>
|
||||
|
||||
The reference type does not have to be a real C++ reference. The requirements of
|
||||
the reference type is that it <i>behaves</i> like a real reference. Hence the
|
||||
reference type must be convertible to the value_type and assignment through
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<HR>
|
||||
<br>
|
||||
-->
|
||||
|
||||
<TABLE>
|
||||
<TR valign="top">
|
||||
<TD nowrap>Copyright © 2000</TD>
|
||||
<TD><A HREF=http://www.boost.org/people/jeremy_siek.htm>Jeremy Siek</A>
|
||||
</TR>
|
||||
<tr >
|
||||
<TD nowrap>Copyright © 2004-2007</TD>
|
||||
<TD>Thorsten Ottosen.
|
||||
</TABLE>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
@ -1,14 +1,3 @@
|
||||
/*
|
||||
// Boost.Range library
|
||||
//
|
||||
// Copyright Thorsten Ottosen 2003-2008. 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)
|
||||
//
|
||||
// For more information, see http://www.boost.org/libs/range/
|
||||
//
|
||||
*/
|
||||
pre{
|
||||
BORDER-RIGHT: gray 1pt solid;
|
||||
PADDING-RIGHT: 2pt;
|
||||
|
@ -104,15 +104,9 @@
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
© <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file LICENSE_1_0.txt or copy
|
||||
at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
@ -33,12 +33,11 @@
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
The <code>iterator_range</code> class is templated on a <a
|
||||
href="../../iterator/doc/new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators">Forward
|
||||
The <code>iterator_range</code> class is templated on an
|
||||
<a href="../../iterator/doc/new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators">Forward
|
||||
Traversal Iterator</a> and should be used whenever fairly general code is needed.
|
||||
The <code>sub_range</code> class is templated on a <a
|
||||
href="range.html#forward_range">Forward Range</a> and it is less general,
|
||||
but a bit easier to use since its template
|
||||
The <code>sub_range</code> class is templated on an <a href="range.html#forward_range">Forward
|
||||
Range</a> and it is less general, but a bit easier to use since its template
|
||||
argument is easier to specify. The biggest difference is, however, that a
|
||||
<code>sub_range</code> can propagate constness because it knows what a
|
||||
corresponding <code>const_iterator</code> is. </p>
|
||||
@ -350,17 +349,10 @@ store the result
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
© <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file LICENSE_1_0.txt or copy
|
||||
at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
<hr>
|
||||
<p>
|
||||
(C) Copyright Thorsten Ottosen 2003-2007
|
||||
</p>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
@ -15,7 +15,7 @@
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#if BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#include <boost/range/detail/as_literal.hpp>
|
||||
#else
|
||||
|
||||
@ -116,14 +116,14 @@ namespace boost
|
||||
|
||||
|
||||
template< class Char, std::size_t sz >
|
||||
inline iterator_range<const Char*> as_literal( const Char (&arr)[sz] )
|
||||
inline iterator_range<const Char*> as_literal( const Char (&arr)[sz] )
|
||||
{
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590)) && __BORLANDC__ >= 0x590
|
||||
return boost::make_iterator_range<const Char*>( arr, arr + sz - 1 );
|
||||
#else
|
||||
return boost::make_iterator_range( arr, arr + sz - 1 );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
@ -25,8 +25,6 @@ namespace boost
|
||||
{
|
||||
namespace range_detail
|
||||
{
|
||||
template <typename T>
|
||||
inline void boost_range_silence_warning( const T& ) { }
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// end() help
|
||||
@ -84,14 +82,12 @@ namespace boost
|
||||
template< class T, std::size_t sz >
|
||||
inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] )
|
||||
{
|
||||
boost_range_silence_warning( boost_range_array );
|
||||
return sz;
|
||||
}
|
||||
|
||||
template< class T, std::size_t sz >
|
||||
inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] )
|
||||
{
|
||||
boost_range_silence_warning( boost_range_array );
|
||||
return sz;
|
||||
}
|
||||
|
||||
|
@ -11,15 +11,8 @@
|
||||
#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP
|
||||
#define BOOST_RANGE_ITERATOR_RANGE_HPP
|
||||
|
||||
#include <boost/config.hpp> // Define __STL_CONFIG_H, if appropriate.
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4996 )
|
||||
#endif
|
||||
|
||||
// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch.
|
||||
#include <boost/config.hpp> // Define __STL_CONFIG_H, if appropriate.
|
||||
#ifndef BOOST_OLD_IOSTREAMS
|
||||
# if defined(__STL_CONFIG_H) && \
|
||||
!defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
|
||||
@ -28,13 +21,12 @@
|
||||
# endif
|
||||
#endif // #ifndef BOOST_OLD_IOSTREAMS
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
#include <boost/type_traits/is_abstract.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/range/functions.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/range/difference_type.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <iterator>
|
||||
#include <algorithm>
|
||||
#ifndef _STLP_NO_IOSTREAMS
|
||||
@ -46,6 +38,10 @@
|
||||
#endif // _STLP_NO_IOSTREAMS
|
||||
#include <cstddef>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
|
||||
#pragma warning( disable : 4996 )
|
||||
#endif
|
||||
|
||||
/*! \file
|
||||
Defines the \c iterator_class and related functions.
|
||||
\c iterator_range is a simple wrapper of iterator pair idiom. It provides
|
||||
@ -167,12 +163,6 @@ namespace boost
|
||||
//! iterator type
|
||||
typedef IteratorT iterator;
|
||||
|
||||
private: // for return value of operator()()
|
||||
typedef BOOST_DEDUCED_TYPENAME
|
||||
boost::mpl::if_< boost::is_abstract<value_type>,
|
||||
reference, value_type >::type abstract_value_type;
|
||||
|
||||
public:
|
||||
iterator_range() : m_Begin( iterator() ), m_End( iterator() )
|
||||
#ifndef NDEBUG
|
||||
, singular( true )
|
||||
@ -360,8 +350,8 @@ namespace boost
|
||||
// When storing transform iterators, operator[]()
|
||||
// fails because it returns by reference. Therefore
|
||||
// operator()() is provided for these cases.
|
||||
//
|
||||
abstract_value_type operator()( difference_type at ) const
|
||||
//
|
||||
value_type operator()( difference_type at ) const
|
||||
{
|
||||
BOOST_ASSERT( at >= 0 && at < size() );
|
||||
return m_Begin[at];
|
||||
@ -649,9 +639,5 @@ namespace boost
|
||||
|
||||
#undef BOOST_OLD_IOSTREAMS
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -11,12 +11,12 @@
|
||||
#ifndef BOOST_RANGE_SUB_RANGE_HPP
|
||||
#define BOOST_RANGE_SUB_RANGE_HPP
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
|
||||
#pragma warning( push )
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
|
||||
#pragma warning( disable : 4996 )
|
||||
#endif
|
||||
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/range/config.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
@ -46,7 +46,7 @@ namespace boost
|
||||
sub_range() : base()
|
||||
{ }
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) )
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
|
||||
sub_range( const sub_range& r )
|
||||
: base( static_cast<const base&>( r ) )
|
||||
{ }
|
||||
@ -163,9 +163,5 @@ namespace boost
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
0
test/compat1.cpp
Executable file
0
test/compat1.cpp
Executable file
@ -10,8 +10,6 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/range/detail/implementation_help.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
# pragma warn -8091 // supress warning in Boost.Test
|
||||
@ -32,6 +30,7 @@
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
@ -92,11 +91,6 @@ void check_partial_workaround()
|
||||
|
||||
void check_partial_workaround()
|
||||
{
|
||||
//
|
||||
// test if warnings are generated
|
||||
//
|
||||
std::size_t s = boost::range_detail::array_size( "foo" );
|
||||
BOOST_CHECK_EQUAL( s, 4u );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user