forked from boostorg/range
Compare commits
11 Commits
svn-branch
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
cbbaaa7e51 | |||
c54e15d374 | |||
fd448ffa31 | |||
21b558fe5e | |||
33c8f3e3ec | |||
523f8a5926 | |||
3bd0d886c4 | |||
e46eae8144 | |||
12cf02586c | |||
ee024f588b | |||
8e715b3810 |
@ -727,7 +727,7 @@ class=identifier>T</span><span class=special>& </span><span class=identifier
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
(C) Copyright Thorsten Ottosen 2003-2004. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
|
||||
</p>
|
||||
<br>
|
||||
<br>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
// Copyright Thorsten Ottosen 2003-2005. 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)
|
||||
*/
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <iterator> // for std::iterator_traits, std::distance()
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
(C) Copyright Thorsten Ottosen 2003-2004. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -116,7 +116,7 @@ Cool indeed!
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
(C) Copyright Thorsten Ottosen 2003-2004. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -154,7 +154,7 @@
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
(C) Copyright Thorsten Ottosen 2003-2004. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -61,7 +61,7 @@ C++ standard: <blockquote>
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
(C) Copyright Thorsten Ottosen 2003-2006
|
||||
(C) Copyright Thorsten Ottosen 2003-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -146,7 +146,7 @@ Notice that we have to
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
(C) Copyright Thorsten Ottosen 2003-2004. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -75,7 +75,7 @@ href="http://boost.sourceforge.net/regression-logs/developer/range.html">here</a
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
(C) Copyright Thorsten Ottosen 2003-2004. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -530,7 +530,7 @@ href="../../iterator/doc/new-iter-concepts.html#random-access-traversal-iterator
|
||||
</TR>
|
||||
<tr >
|
||||
<TD nowrap>Copyright © 2004</TD>
|
||||
<TD>Thorsten Ottosen.
|
||||
<TD>Thorsten Ottosen. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
|
||||
</TABLE>
|
||||
|
||||
<br>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
#// Copyright Thorsten Ottosen 2003-2005. 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)
|
||||
*/
|
||||
|
||||
pre{
|
||||
BORDER-RIGHT: gray 1pt solid;
|
||||
PADDING-RIGHT: 2pt;
|
||||
|
@ -104,7 +104,7 @@
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
(C) Copyright Thorsten Ottosen 2003-2004. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -352,7 +352,7 @@ store the result
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
(C) Copyright Thorsten Ottosen 2003-2004
|
||||
(C) Copyright Thorsten Ottosen 2003-2004. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
@ -43,7 +43,7 @@ namespace boost
|
||||
#else
|
||||
inline const wchar_t* str_end( const wchar_t* s, const wchar_t* )
|
||||
{
|
||||
if( s == 0 && s[0] == 0 )
|
||||
if( s == 0 || s[0] == 0 )
|
||||
return s;
|
||||
while( *++s != 0 )
|
||||
;
|
||||
|
@ -261,8 +261,12 @@ namespace boost
|
||||
{
|
||||
if( singular )
|
||||
return 0;
|
||||
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
|
||||
return std::distance<IteratorT>( m_Begin, m_End );
|
||||
#else
|
||||
return std::distance( m_Begin, m_End );
|
||||
#endif
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
|
41
test/Jamfile
41
test/Jamfile
@ -1,41 +0,0 @@
|
||||
# Boost.Range library
|
||||
#
|
||||
# Copyright Thorsten Ottosen 2003-2004. 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/
|
||||
#
|
||||
|
||||
subproject libs/range/test ;
|
||||
|
||||
import testing ;
|
||||
|
||||
rule range-test ( name : includes * )
|
||||
{
|
||||
return [
|
||||
run $(name).cpp
|
||||
<lib>../../test/build/boost_unit_test_framework
|
||||
:
|
||||
:
|
||||
: <include>$(BOOST_ROOT)
|
||||
$(includes)
|
||||
] ;
|
||||
}
|
||||
|
||||
test-suite range :
|
||||
[ range-test array ]
|
||||
[ range-test iterator_pair ]
|
||||
[ range-test std_container ]
|
||||
[ range-test string ]
|
||||
[ range-test iterator_range ]
|
||||
[ range-test sub_range ]
|
||||
[ range-test partial_workaround ]
|
||||
[ range-test algorithm_example ]
|
||||
[ range-test reversible_range ]
|
||||
[ range-test const_ranges ]
|
||||
[ range-test extension_mechanism ]
|
||||
# [ range-test mfc : <include>$(VC71_ROOT)/atlmfc/include ]
|
||||
;
|
||||
|
@ -11,7 +11,7 @@
|
||||
rule range-test ( name : includes * )
|
||||
{
|
||||
return [
|
||||
run $(name).cpp /boost/test//boost_unit_test_framework
|
||||
run $(name).cpp /boost/test//boost_unit_test_framework/<link>static
|
||||
:
|
||||
:
|
||||
: $(includes)
|
||||
|
@ -69,7 +69,7 @@ namespace Foo
|
||||
}
|
||||
|
||||
|
||||
inline X::iterator boost_range_end( X& x )
|
||||
inline X::iterator boost_range_end( X& x )
|
||||
{
|
||||
return x.vec.end();
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
|
||||
void check_reference_type();
|
||||
|
||||
void check_iterator_range()
|
||||
@ -94,7 +94,7 @@ void check_iterator_range()
|
||||
rrr = make_iterator_range( rrr, -1, 1 );
|
||||
BOOST_CHECK( rrr == str );
|
||||
|
||||
check_reference_type();
|
||||
check_reference_type();
|
||||
}
|
||||
|
||||
|
||||
@ -124,10 +124,10 @@ int test_iter_range( Container& a_cont )
|
||||
typedef BOOST_DEDUCED_TYPENAME range_result_iterator<Container>::type citer_type;
|
||||
typedef iterator_range<citer_type> riter_type;
|
||||
riter_type a_riter( make_iterator_range( a_cont ) );
|
||||
a_riter.front();
|
||||
a_riter.back();
|
||||
int i = a_riter[0];
|
||||
return i;
|
||||
a_riter.front();
|
||||
a_riter.back();
|
||||
int i = a_riter[0];
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,17 +90,6 @@ void check_sub_range()
|
||||
s.empty();
|
||||
r.size();
|
||||
s.size();
|
||||
|
||||
irange singular_irange;
|
||||
BOOST_CHECK( singular_irange.empty() );
|
||||
BOOST_CHECK( singular_irange.size() == 0 );
|
||||
|
||||
srange singular_srange;
|
||||
BOOST_CHECK( singular_srange.empty() );
|
||||
BOOST_CHECK( singular_srange.size() == 0 );
|
||||
|
||||
BOOST_CHECK( empty( singular_irange ) );
|
||||
BOOST_CHECK( empty( singular_srange ) );
|
||||
|
||||
srange rr = make_iterator_range( str );
|
||||
BOOST_CHECK( rr.equal( r ) );
|
||||
|
Reference in New Issue
Block a user