*** empty log message ***

[SVN r26766]
This commit is contained in:
Thorsten Jørgen Ottosen
2005-01-20 22:33:25 +00:00
parent eeb7bf0fe0
commit 92c375e173
5 changed files with 7 additions and 88 deletions

View File

@ -84,7 +84,7 @@ namespace range_detail
// string // string
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
#if BOOST_WORKAROUND(__MWERKS__, <= 0x3204 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) #if 1 || BOOST_WORKAROUND(__MWERKS__, <= 0x3204 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
// CW up to 9.3 and borland have troubles with function ordering // CW up to 9.3 and borland have troubles with function ordering
inline const char* begin( const char* s ) inline const char* begin( const char* s )
{ {

View File

@ -84,7 +84,7 @@ namespace range_detail
// string // string
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
#if BOOST_WORKAROUND(__MWERKS__, <= 0x3204 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) #if 1 || BOOST_WORKAROUND(__MWERKS__, <= 0x3204 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
// CW up to 9.3 and borland have troubles with function ordering // CW up to 9.3 and borland have troubles with function ordering
inline char* end( char* s ) inline char* end( char* s )
{ {

View File

@ -1,73 +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/
//
#include <boost/static_assert.hpp>
#include <boost/type_traits.hpp>
#include <boost/config.hpp>
enum Container {};
enum String {};
template< typename T >
struct range_iterator;
template<>
struct range_iterator<Container>
{
template< typename C >
struct pts
{
typedef BOOST_DEDUCED_TYPENAME C::iterator type;
};
};
template<>
struct range_iterator<String>
{
template< typename C >
struct pts
{
typedef C type;
};
};
template< typename C >
class iterator_of
{
public:
typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::BOOST_NESTED_TEMPLATE pts<C>::type type;
};
#include <vector>
void compat1()
{
std::vector<int> v;
iterator_of< std::vector<int> >::type i = v.begin();
}
#include <boost/test/included/unit_test_framework.hpp>
using boost::unit_test_framework::test_suite;
test_suite* init_unit_test_suite( int argc, char* argv[] )
{
test_suite* test = BOOST_TEST_SUITE( "Range Test Suite" );
test->add( BOOST_TEST_CASE( &compat1 ) );
return test;
}

View File

@ -31,15 +31,6 @@
using namespace boost; using namespace boost;
using namespace std; using namespace std;
struct add_one
{
template< class T >
T operator()( T r ) const
{
return r + 1;
}
};
void check_iterator_range() void check_iterator_range()
{ {
@ -108,7 +99,3 @@ test_suite* init_unit_test_suite( int argc, char* argv[] )
return test; return test;
} }

View File

@ -8,6 +8,7 @@
// For more information, see http://www.boost.org/libs/range/ // For more information, see http://www.boost.org/libs/range/
// //
#define _MSL_USING_NAMESPACE 1
#include <boost/detail/workaround.hpp> #include <boost/detail/workaround.hpp>
@ -45,6 +46,8 @@ template< typename Container, typename T >
BOOST_DEDUCED_TYPENAME boost::range_iterator<Container>::type BOOST_DEDUCED_TYPENAME boost::range_iterator<Container>::type
find_mutable( Container& c, T value ) find_mutable( Container& c, T value )
{ {
boost::size( c );
boost::end( c );
return std::find( boost::begin( c ), boost::end( c ), value ); return std::find( boost::begin( c ), boost::end( c ), value );
} }
@ -52,6 +55,8 @@ template< typename Container, typename T >
BOOST_DEDUCED_TYPENAME boost::range_const_iterator<Container>::type BOOST_DEDUCED_TYPENAME boost::range_const_iterator<Container>::type
find_const( const Container& c, T value ) find_const( const Container& c, T value )
{ {
boost::size( c );
boost::end( c );
return std::find( boost::begin( c ), boost::end( c ), value ); return std::find( boost::begin( c ), boost::end( c ), value );
} }