Compare commits

...

6 Commits

Author SHA1 Message Date
b2d616d789 Merge.
[SVN r43270]
2008-02-16 09:50:01 +00:00
2321b5c2fe Merge from trunk.
[SVN r43211]
2008-02-10 15:26:54 +00:00
b4b13ae470 Merge.
[SVN r43162]
2008-02-07 18:54:14 +00:00
fbde78a968 Merge.
[SVN r42905]
2008-01-21 20:15:02 +00:00
c1aea25e44 Merge from trunk, finally.
[SVN r41817]
2007-12-07 01:12:02 +00:00
b148e2fee6 Create a branch to fix links on.
[SVN r41573]
2007-12-02 10:07:42 +00:00
21 changed files with 163 additions and 70 deletions

View File

@ -1,3 +1,13 @@
#// 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) ;

View File

@ -493,7 +493,7 @@ class=identifier>T</span><span class=special>&amp; </span><span class=identifier
</p>
<p>
<code>as_literal()</code> can be used <i>internally</i> in string
algorithm librararies to such that arrays of characters are
algorithm librararies such that arrays of characters are
handled correctly.
</p>
<p>
@ -745,7 +745,13 @@ class=identifier>T</span><span class=special>&amp; </span><span class=identifier
<hr>
<p>
(C) Copyright Thorsten Ottosen 2003-2007
&copy; <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>
<br>
<br>

View File

@ -1,3 +1,13 @@
// 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()

View File

@ -41,9 +41,16 @@
<li> <a href="../test/array.cpp">array.cpp</a>
</ul>
<hr>
<p>
(C) Copyright Thorsten Ottosen 2003-2004
&copy; <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>
<br>

View File

@ -114,9 +114,16 @@ Cool indeed!
</ol>
<hr>
<hr>
<p>
(C) Copyright Thorsten Ottosen 2003-2004
&copy; <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>
<br>

View File

@ -173,7 +173,14 @@
<hr>
<p>
(C) Copyright Thorsten Ottosen 2003-2007
&copy; <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>
<br>

View File

@ -18,10 +18,10 @@
<h2 >History and Acknowledgement</h2><a name="History" ></a>
<p >
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.
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.
</p>
<p>
@ -61,7 +61,14 @@ C++ standard: <blockquote>
<hr>
<p>
(C) Copyright Thorsten Ottosen 2003-2006
&copy; <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>
<br>

View File

@ -63,8 +63,7 @@ free-standing functions so syntactic and/or semantic differences can be removed.
</ul>
</p>
<p >
Below are given a small example (the complete example can be found <a
<p > Below is 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>
@ -136,7 +135,14 @@ Notice that we have to
<hr>
<p>
(C) Copyright Thorsten Ottosen 2003-2007
&copy; <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>
<br>

View File

@ -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 of <a
In that case one must rely on <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,11 +73,18 @@ href="http://boost.sourceforge.net/regression-logs/developer/range.html">here</a
</ol>
</p>
<hr>
<hr>
<p>
(C) Copyright Thorsten Ottosen 2003-2004
&copy; <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>>
<br>
<br>
<br>

View File

@ -352,34 +352,16 @@ 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>
&copy; <a name="Copyright" id="Copyright">Copyright</a> Thorsten Ottosen 2008.
</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 &copy 2000</TD>
<TD><A HREF=http://www.boost.org/people/jeremy_siek.htm>Jeremy Siek</A>
</TR>
<tr >
<TD nowrap>Copyright &copy 2004-2007</TD>
<TD>Thorsten Ottosen.
</TABLE>
<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>

View File

@ -1,3 +1,14 @@
/*
// 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;

View File

@ -104,9 +104,15 @@
<hr>
<p>
(C) Copyright Thorsten Ottosen 2003-2004
&copy; <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>
<br>
<br>
<br>

View File

@ -33,11 +33,12 @@
</ul>
</ul>
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
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
Traversal Iterator</a> and should be used whenever fairly general code is needed.
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
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
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>
@ -349,10 +350,17 @@ store the result
</pre>
</p>
<hr>
<p>
(C) Copyright Thorsten Ottosen 2003-2007
</p>
<hr>
<p>
&copy; <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>
<br>
<br>

View File

@ -15,7 +15,7 @@
# pragma once
#endif
#if BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#ifdef 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

View File

@ -25,6 +25,8 @@ namespace boost
{
namespace range_detail
{
template <typename T>
inline void boost_range_silence_warning( const T& ) { }
/////////////////////////////////////////////////////////////////////
// end() help
@ -82,12 +84,14 @@ 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;
}

View File

@ -25,12 +25,10 @@ namespace boost
//////////////////////////////////////////////////////////////////////
template< typename T, std::size_t sz >
char&
sizer( const T BOOST_RANGE_ARRAY_REF()[sz] )[sz];
char (& sizer( const T BOOST_RANGE_ARRAY_REF()[sz] ) )[sz];
template< typename T, std::size_t sz >
char&
sizer( T BOOST_RANGE_ARRAY_REF()[sz] )[sz];
char (& sizer( T BOOST_RANGE_ARRAY_REF()[sz] ) )[sz];
} // namespace 'boost'

View File

@ -11,8 +11,15 @@
#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP
#define BOOST_RANGE_ITERATOR_RANGE_HPP
// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch.
#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.
#ifndef BOOST_OLD_IOSTREAMS
# if defined(__STL_CONFIG_H) && \
!defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
@ -21,7 +28,6 @@
# endif
#endif // #ifndef BOOST_OLD_IOSTREAMS
#include <boost/detail/workaround.hpp>
#include <boost/range/functions.hpp>
#include <boost/range/iterator.hpp>
#include <boost/range/difference_type.hpp>
@ -38,10 +44,6 @@
#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
@ -639,5 +641,9 @@ namespace boost
#undef BOOST_OLD_IOSTREAMS
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
#pragma warning( pop )
#endif
#endif

View File

@ -11,10 +11,12 @@
#ifndef BOOST_RANGE_SUB_RANGE_HPP
#define BOOST_RANGE_SUB_RANGE_HPP
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
#pragma warning( push )
#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>
@ -44,7 +46,7 @@ namespace boost
sub_range() : base()
{ }
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) )
sub_range( const sub_range& r )
: base( static_cast<const base&>( r ) )
{ }
@ -161,5 +163,9 @@ namespace boost
} // namespace 'boost'
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
#pragma warning( pop )
#endif
#endif

View File

@ -1 +0,0 @@

View File

View File

@ -10,6 +10,8 @@
#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
@ -30,7 +32,6 @@
#include <boost/static_assert.hpp>
#include <boost/type_traits.hpp>
#include <boost/test/test_tools.hpp>
#include <iostream>
#include <vector>
@ -91,6 +92,11 @@ 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