Compare commits

..

12 Commits

Author SHA1 Message Date
d46a4468e1 Branch for 2nd try at V2 removal
[SVN r77497]
2012-03-23 12:04:44 +00:00
1cb6a99c80 eliminated unit_test_framework
[SVN r74719]
2011-10-05 09:13:05 +00:00
c4bd4bf4ce Remove tabs.
[SVN r72190]
2011-05-26 18:23:57 +00:00
41b76f8f5c [boost][range] - Ticket 5236 - Improved test coverage to ensure that the result for a random access strided range is consistent with that of a bidirectional strided range.
[SVN r72108]
2011-05-22 22:15:14 +00:00
846f11a96c [boost][range] - Ticket 5236 - Strided reversing past begin issue resolved.
[SVN r72107]
2011-05-22 22:06:30 +00:00
8810c4c4aa [boost][range] - Ticket 5547 - Boost.Range join() ambiguous with Boost.Algorithm join() function. Put the Boost.Range join function into the boost::range namespace and brought out with 'using'
[SVN r72106]
2011-05-22 21:19:53 +00:00
91428c2110 [boost][range] - Ticket 5530 - adaptor example fails to compile. This change adds tests for all of the .cpp example files for the range adaptors, and fixes a few small issues with the examples shown by the new tests.
[SVN r72104]
2011-05-22 21:03:01 +00:00
44c26a3356 [boost][range] - Ticket 5486 - Removal of unnecessary variables from adjacent_filtered_range. This removes the requirement for the predicate to be default constructible.
[SVN r72102]
2011-05-22 20:33:06 +00:00
b06fca8378 [boost][range] - Ticket 5556 - is_sorted namespace issue under GCC 4.5
[SVN r72101]
2011-05-22 20:20:20 +00:00
3b3889b70f [boost][range] - Ticket 5485 - doubly defined BOOST_DEFINE_RANGE_ADAPTOR_1 macro.
[SVN r72098]
2011-05-22 20:01:12 +00:00
5ed6116490 [boost][range] - ticket 5544 - fix for termination of irange - done properly for negative step sizes.
[SVN r72097]
2011-05-22 19:59:59 +00:00
df1a3a334f [boost][range] - ticket 5544 - fix for termination of irange.
[SVN r72070]
2011-05-22 11:16:53 +00:00
9 changed files with 68 additions and 68 deletions

View File

@ -15,7 +15,7 @@
# pragma once
#endif
#if _MSC_VER == 1300 // experiment
#if defined(_MSC_VER) && (_MSC_VER == 1300)
#include <boost/range/detail/collection_traits.hpp>
#include <boost/range/iterator_range.hpp>
@ -28,6 +28,6 @@
#include <boost/range/iterator_range.hpp>
#include <boost/range/sub_range.hpp>
#endif // _MSC_VER == 1300 // experiment
#endif // _MSC_VER == 1300
#endif

View File

@ -25,7 +25,7 @@
#include <boost/detail/workaround.hpp>
#include <cstring>
#ifndef BOOST_NO_CWCHAR
#ifndef BOOST_NO_CWCHAR
#include <cwchar>
#endif
@ -38,41 +38,41 @@ namespace boost
return strlen( s );
}
#ifndef BOOST_NO_CWCHAR
#ifndef BOOST_NO_CWCHAR
inline std::size_t length( const wchar_t* s )
{
return wcslen( s );
}
#endif
#endif
//
// Remark: the compiler cannot choose between T* and T[sz]
// overloads, so we must put the T* internal to the
// unconstrained version.
//
//
inline bool is_char_ptr( char* )
{
return true;
}
inline bool is_char_ptr( const char* )
{
return true;
}
#ifndef BOOST_NO_CWCHAR
#ifndef BOOST_NO_CWCHAR
inline bool is_char_ptr( wchar_t* )
{
return true;
}
inline bool is_char_ptr( const wchar_t* )
{
return true;
}
#endif
template< class T >
inline long is_char_ptr( T /* r */ )
{
@ -80,30 +80,30 @@ namespace boost
}
template< class T >
inline iterator_range<T*>
inline iterator_range<T*>
make_range( T* const r, bool )
{
return iterator_range<T*>( r, r + length(r) );
}
template< class T >
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<T>::type>
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<T>::type>
make_range( T& r, long )
{
return boost::make_iterator_range( r );
}
}
template< class Range >
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type>
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type>
as_literal( Range& r )
{
return range_detail::make_range( r, range_detail::is_char_ptr(r) );
}
template< class Range >
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type>
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type>
as_literal( const Range& r )
{
return range_detail::make_range( r, range_detail::is_char_ptr(r) );
@ -112,9 +112,9 @@ namespace boost
template< class Char, std::size_t sz >
inline iterator_range<Char*> as_literal( Char (&arr)[sz] )
{
return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );
return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );
}
template< class Char, std::size_t sz >
inline iterator_range<const Char*> as_literal( const Char (&arr)[sz] )
{

View File

@ -21,13 +21,13 @@
#include <wchar.h>
#endif
namespace boost
namespace boost
{
namespace range_detail
{
template <typename T>
inline void boost_range_silence_warning( const T& ) { }
/////////////////////////////////////////////////////////////////////
// end() help
/////////////////////////////////////////////////////////////////////
@ -36,7 +36,7 @@ namespace boost
{
return s + strlen( s );
}
#ifndef BOOST_NO_CWCHAR
inline const wchar_t* str_end( const wchar_t* s, const wchar_t* )
{
@ -51,7 +51,7 @@ namespace boost
;
return s;
}
#endif
#endif
template< class Char >
inline Char* str_end( Char* s )
@ -64,7 +64,7 @@ namespace boost
{
return boost_range_array + sz;
}
template< class T, std::size_t sz >
inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] )
{
@ -74,7 +74,7 @@ namespace boost
/////////////////////////////////////////////////////////////////////
// size() help
/////////////////////////////////////////////////////////////////////
template< class Char >
inline std::size_t str_size( const Char* const& s )
{
@ -96,7 +96,7 @@ namespace boost
}
} // namespace 'range_detail'
} // namespace 'boost'

View File

@ -25,46 +25,46 @@
namespace boost
{
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
namespace range_detail_vc7_1
{
template< typename C, typename Sig = void(C) >
struct range_iterator
{
typedef BOOST_RANGE_DEDUCED_TYPENAME
mpl::eval_if_c< is_const<C>::value,
range_const_iterator< typename remove_const<C>::type >,
range_mutable_iterator<C> >::type type;
};
template< typename C, typename T >
struct range_iterator< C, void(T[]) >
{
typedef T* type;
};
}
#endif
namespace range_detail_vc7_1
{
template< typename C, typename Sig = void(C) >
struct range_iterator
{
typedef BOOST_RANGE_DEDUCED_TYPENAME
mpl::eval_if_c< is_const<C>::value,
range_const_iterator< typename remove_const<C>::type >,
range_mutable_iterator<C> >::type type;
};
template< typename C, typename T >
struct range_iterator< C, void(T[]) >
{
typedef T* type;
};
}
#endif
template< typename C >
struct range_iterator
{
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
typedef BOOST_RANGE_DEDUCED_TYPENAME
range_detail_vc7_1::range_iterator<C>::type type;
#else
typedef BOOST_RANGE_DEDUCED_TYPENAME
range_detail_vc7_1::range_iterator<C>::type type;
#else
typedef BOOST_RANGE_DEDUCED_TYPENAME
mpl::eval_if_c< is_const<C>::value,
typedef BOOST_RANGE_DEDUCED_TYPENAME
mpl::eval_if_c< is_const<C>::value,
range_const_iterator< typename remove_const<C>::type >,
range_mutable_iterator<C> >::type type;
#endif
#endif
};
} // namespace boost
//#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

View File

@ -172,9 +172,9 @@ void check_adl_conformance()
BOOST_CHECK_EQUAL( boost_test::begin( r6 ), global_namespace );
}
#include <boost/test/included/unit_test_framework.hpp>
#include <boost/test/included/unit_test.hpp>
using boost::unit_test_framework::test_suite;
using boost::unit_test::test_suite;
test_suite* init_unit_test_suite( int argc, char* argv[] )
{

View File

@ -18,7 +18,7 @@
#include <boost/range/begin.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/test/test_tools.hpp>
#include <boost/test/included/unit_test_framework.hpp>
#include <boost/test/included/unit_test.hpp>
namespace mock_std
{
@ -104,12 +104,12 @@ namespace
}
}
using boost::unit_test_framework::test_suite;
using boost::unit_test::test_suite;
boost::unit_test_framework::test_suite*
boost::unit_test::test_suite*
init_unit_test_suite( int argc, char* argv[] )
{
boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE( "Range Test Suite - begin() ADL namespace barrier" );
boost::unit_test::test_suite* test = BOOST_TEST_SUITE( "Range Test Suite - begin() ADL namespace barrier" );
test->add( BOOST_TEST_CASE( &test_range_begin ) );

View File

@ -53,9 +53,9 @@ void compat1()
iterator_of< std::vector<int> >::type i = v.begin();
}
#include <boost/test/included/unit_test_framework.hpp>
#include <boost/test/included/unit_test.hpp>
using boost::unit_test_framework::test_suite;
using boost::unit_test::test_suite;
test_suite* init_unit_test_suite( int argc, char* argv[] )
{

View File

@ -53,9 +53,9 @@ void compat1()
iterator_of< std::vector<int> >::type i = v.begin();
}
#include <boost/test/included/unit_test_framework.hpp>
#include <boost/test/included/unit_test.hpp>
using boost::unit_test_framework::test_suite;
using boost::unit_test::test_suite;
test_suite* init_unit_test_suite( int argc, char* argv[] )
{

View File

@ -18,7 +18,7 @@
#include <boost/range/end.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/test/test_tools.hpp>
#include <boost/test/included/unit_test_framework.hpp>
#include <boost/test/included/unit_test.hpp>
namespace mock_std
{
@ -104,12 +104,12 @@ namespace
}
}
using boost::unit_test_framework::test_suite;
using boost::unit_test::test_suite;
boost::unit_test_framework::test_suite*
boost::unit_test::test_suite*
init_unit_test_suite( int argc, char* argv[] )
{
boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE( "Range Test Suite - end() ADL namespace barrier" );
boost::unit_test::test_suite* test = BOOST_TEST_SUITE( "Range Test Suite - end() ADL namespace barrier" );
test->add( BOOST_TEST_CASE( &test_range_end_adl_avoidance ) );