More cleanups

[SVN r31860]
This commit is contained in:
Douglas Gregor
2005-12-01 15:00:34 +00:00
parent bd34ecb841
commit 32847c6b64
9 changed files with 250 additions and 250 deletions
+4 -4
View File
@@ -47,8 +47,8 @@ namespace range_detail
}
template< typename C >
inline BOOST_DEDUCED_TYPENAME range_iterator<
typename remove_const<C>::type >::type
inline BOOST_DEDUCED_TYPENAME range_iterator<
typename remove_const<C>::type >::type
boost_range_begin( C& c )
{
return c.begin();
@@ -142,8 +142,8 @@ namespace range_detail
template< class T >
inline BOOST_DEDUCED_TYPENAME range_iterator<
typename remove_const<T>::type >::type begin( T& r )
inline BOOST_DEDUCED_TYPENAME range_iterator<
typename remove_const<T>::type >::type begin( T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__GNUC__, < 3) \
+12 -12
View File
@@ -21,13 +21,13 @@
namespace boost
{
template< class T >
struct range_difference
{
typedef BOOST_DEDUCED_TYPENAME iterator_difference<
BOOST_DEDUCED_TYPENAME range_const_iterator<T>::type >::type
type;
};
template< class T >
struct range_difference
{
typedef BOOST_DEDUCED_TYPENAME iterator_difference<
BOOST_DEDUCED_TYPENAME range_const_iterator<T>::type >::type
type;
};
}
//#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
@@ -43,13 +43,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct range_difference
{
typedef BOOST_DEDUCED_TYPENAME C::difference_type type;
};
//////////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////////
@@ -57,14 +57,14 @@ namespace boost
template< typename Iterator >
struct range_difference< std::pair<Iterator,Iterator> >
{
typedef BOOST_DEDUCED_TYPENAME
typedef BOOST_DEDUCED_TYPENAME
iterator_difference<Iterator>::type type;
};
template< typename Iterator >
struct range_difference< const std::pair<Iterator,Iterator> >
{
typedef BOOST_DEDUCED_TYPENAME
typedef BOOST_DEDUCED_TYPENAME
iterator_difference<Iterator>::type type;
};
+19 -19
View File
@@ -26,35 +26,35 @@
#include <boost/range/iterator.hpp>
#include <boost/range/const_iterator.hpp>
namespace boost
namespace boost
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__GNUC__, < 3) \
/**/
/**/
namespace range_detail
{
#endif
#endif
//////////////////////////////////////////////////////////////////////
// primary template
//////////////////////////////////////////////////////////////////////
template< typename C >
inline BOOST_DEDUCED_TYPENAME range_const_iterator<C>::type
boost_range_end( const C& c )
{
return c.end();
}
template< typename C >
inline BOOST_DEDUCED_TYPENAME range_iterator<
typename remove_const<C>::type >::type
inline BOOST_DEDUCED_TYPENAME range_iterator<
typename remove_const<C>::type >::type
boost_range_end( C& c )
{
return c.end();
}
//////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////
@@ -64,13 +64,13 @@ namespace range_detail
{
return p.second;
}
template< typename Iterator >
inline Iterator boost_range_end( std::pair<Iterator,Iterator>& p )
{
return p.second;
}
//////////////////////////////////////////////////////////////////////
// array
//////////////////////////////////////////////////////////////////////
@@ -78,13 +78,13 @@ namespace range_detail
template< typename T, std::size_t sz >
inline const T* boost_range_end( const T (&array)[sz] )
{
return range_detail::array_end<T,sz>( array );
return range_detail::array_end<T,sz>( array );
}
template< typename T, std::size_t sz >
inline T* boost_range_end( T (&array)[sz] )
{
return range_detail::array_end<T,sz>( array );
return range_detail::array_end<T,sz>( array );
}
//////////////////////////////////////////////////////////////////////
@@ -136,19 +136,19 @@ namespace range_detail
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__GNUC__, < 3) \
/**/
/**/
} // namespace 'range_detail'
#endif
template< class T >
inline BOOST_DEDUCED_TYPENAME range_iterator<
typename remove_const<T>::type >::type end( T& r )
inline BOOST_DEDUCED_TYPENAME range_iterator<
typename remove_const<T>::type >::type end( T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__GNUC__, < 3) \
/**/
using namespace range_detail;
#endif
#endif
return boost_range_end( r );
}
@@ -159,7 +159,7 @@ inline BOOST_DEDUCED_TYPENAME range_const_iterator<T>::type end( const T& r )
!BOOST_WORKAROUND(__GNUC__, < 3) \
/**/
using namespace range_detail;
#endif
#endif
return boost_range_end( r );
}
+6 -6
View File
@@ -26,7 +26,7 @@ namespace boost
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_result_iterator<C>::type
inline BOOST_DEDUCED_TYPENAME range_reverse_result_iterator<C>::type
rbegin( C& c )
{
return BOOST_DEDUCED_TYPENAME range_reverse_result_iterator<C>::type( end( c ) );
@@ -35,18 +35,18 @@ rbegin( C& c )
#else
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<
typename remove_const<C>::type >::type
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<
typename remove_const<C>::type >::type
rbegin( C& c )
{
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<
typename remove_const<C>::type >::type
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<
typename remove_const<C>::type >::type
iter_type;
return iter_type( end( c ) );
}
template< class C >
inline BOOST_DEDUCED_TYPENAME range_const_reverse_iterator<C>::type
inline BOOST_DEDUCED_TYPENAME range_const_reverse_iterator<C>::type
rbegin( const C& c )
{
typedef BOOST_DEDUCED_TYPENAME range_const_reverse_iterator<C>::type
+8 -8
View File
@@ -22,31 +22,31 @@
namespace boost
{
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_result_iterator<C>::type
inline BOOST_DEDUCED_TYPENAME range_reverse_result_iterator<C>::type
rend( C& c )
{
return BOOST_DEDUCED_TYPENAME range_reverse_result_iterator<C>::type( begin( c ) );
}
#else
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<
typename remove_const<C>::type >::type
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<
typename remove_const<C>::type >::type
rend( C& c )
{
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<
typename remove_const<C>::type >::type
typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<
typename remove_const<C>::type >::type
iter_type;
return iter_type( begin( c ) );
}
template< class C >
inline BOOST_DEDUCED_TYPENAME range_const_reverse_iterator<C>::type
inline BOOST_DEDUCED_TYPENAME range_const_reverse_iterator<C>::type
rend( const C& c )
{
typedef BOOST_DEDUCED_TYPENAME range_const_reverse_iterator<C>::type
+37 -37
View File
@@ -21,47 +21,47 @@
namespace boost
{
namespace range_detail
{
template< class T >
struct add_unsigned;
namespace range_detail
{
template< class T >
struct add_unsigned;
template<>
struct add_unsigned<short>
{
typedef unsigned short type;
};
template<>
struct add_unsigned<int>
{
typedef unsigned int type;
};
template<>
struct add_unsigned<short>
{
typedef unsigned short type;
};
template<>
struct add_unsigned<long>
{
typedef unsigned long type;
};
template<>
struct add_unsigned<int>
{
typedef unsigned int type;
};
template<>
struct add_unsigned<long>
{
typedef unsigned long type;
};
#ifdef BOOST_HAS_LONG_LONG
template<>
struct add_unsigned<long long>
{
typedef unsigned long long type;
};
template<>
struct add_unsigned<long long>
{
typedef unsigned long long type;
};
#endif
}
}
template< class T >
struct range_size
{
typedef BOOST_DEDUCED_TYPENAME range_detail::add_unsigned<
BOOST_DEDUCED_TYPENAME range_difference<T>::type >::type
type;
};
template< class T >
struct range_size
{
typedef BOOST_DEDUCED_TYPENAME range_detail::add_unsigned<
BOOST_DEDUCED_TYPENAME range_difference<T>::type >::type
type;
};
}
*/
@@ -77,13 +77,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct range_size
{
typedef BOOST_DEDUCED_TYPENAME C::size_type type;
};
//////////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////////
@@ -93,7 +93,7 @@ namespace boost
{
typedef std::size_t type;
};
template< typename Iterator >
struct range_size< const std::pair<Iterator,Iterator> >
{
+13 -13
View File
@@ -26,13 +26,13 @@
namespace boost
{
template< class T >
template< class T >
struct range_value
{
typedef BOOST_DEDUCED_TYPENAME iterator_value<
BOOST_DEDUCED_TYPENAME range_iterator<T>::type >::type
type;
};
{
typedef BOOST_DEDUCED_TYPENAME iterator_value<
BOOST_DEDUCED_TYPENAME range_iterator<T>::type >::type
type;
};
}
/*
@@ -45,13 +45,13 @@ namespace boost
//////////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////////
template< typename C >
struct range_value
{
typedef BOOST_DEDUCED_TYPENAME C::value_type type;
};
//////////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////////
@@ -59,15 +59,15 @@ namespace boost
template< typename Iterator >
struct range_value< std::pair<Iterator,Iterator> >
{
typedef BOOST_DEDUCED_TYPENAME
typedef BOOST_DEDUCED_TYPENAME
iterator_value<Iterator>::type type;
};
template< typename Iterator >
struct range_value< const std::pair<Iterator,Iterator> >
{
typedef BOOST_DEDUCED_TYPENAME
typedef BOOST_DEDUCED_TYPENAME
iterator_value<Iterator>::type type;
};
@@ -86,7 +86,7 @@ namespace boost
{
typedef const T type;
};
//////////////////////////////////////////////////////////////////////////
// string
//////////////////////////////////////////////////////////////////////////