mirror of
https://github.com/boostorg/range.git
synced 2025-07-17 22:52:16 +02:00
*** empty log message ***
[SVN r26766]
This commit is contained in:
@ -84,7 +84,7 @@ namespace range_detail
|
||||
// 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
|
||||
inline const char* begin( const char* s )
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ namespace range_detail
|
||||
// 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
|
||||
inline char* end( char* s )
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -31,15 +31,6 @@
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
struct add_one
|
||||
{
|
||||
template< class T >
|
||||
T operator()( T r ) const
|
||||
{
|
||||
return r + 1;
|
||||
}
|
||||
};
|
||||
|
||||
void check_iterator_range()
|
||||
{
|
||||
|
||||
@ -108,7 +99,3 @@ test_suite* init_unit_test_suite( int argc, char* argv[] )
|
||||
return test;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
// For more information, see http://www.boost.org/libs/range/
|
||||
//
|
||||
|
||||
#define _MSL_USING_NAMESPACE 1
|
||||
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
@ -45,6 +46,8 @@ template< typename Container, typename T >
|
||||
BOOST_DEDUCED_TYPENAME boost::range_iterator<Container>::type
|
||||
find_mutable( Container& c, T value )
|
||||
{
|
||||
boost::size( c );
|
||||
boost::end( c );
|
||||
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
|
||||
find_const( const Container& c, T value )
|
||||
{
|
||||
boost::size( c );
|
||||
boost::end( c );
|
||||
return std::find( boost::begin( c ), boost::end( c ), value );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user