forked from boostorg/range
Range: Remove obsolete MSVC version checks.
[SVN r85915]
This commit is contained in:
@ -15,19 +15,9 @@
|
|||||||
# pragma once
|
# pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER == 1300)
|
|
||||||
|
|
||||||
#include <boost/range/detail/collection_traits.hpp>
|
|
||||||
#include <boost/range/iterator_range.hpp>
|
|
||||||
#include <boost/range/sub_range.hpp>
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include <boost/range/functions.hpp>
|
#include <boost/range/functions.hpp>
|
||||||
#include <boost/range/metafunctions.hpp>
|
#include <boost/range/metafunctions.hpp>
|
||||||
#include <boost/range/iterator_range.hpp>
|
#include <boost/range/iterator_range.hpp>
|
||||||
#include <boost/range/sub_range.hpp>
|
#include <boost/range/sub_range.hpp>
|
||||||
|
|
||||||
#endif // _MSC_VER == 1300
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,18 +26,14 @@
|
|||||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||||
# define BOOST_RANGE_DEDUCED_TYPENAME typename
|
# define BOOST_RANGE_DEDUCED_TYPENAME typename
|
||||||
#else
|
#else
|
||||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) && !defined(_MSC_EXTENSIONS)
|
#define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME
|
||||||
# define BOOST_RANGE_DEDUCED_TYPENAME typename
|
|
||||||
# else
|
|
||||||
# define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT
|
#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT
|
||||||
#error "macro already defined!"
|
#error "macro already defined!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) || BOOST_WORKAROUND( __MWERKS__, <= 0x3003 )
|
#if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 )
|
||||||
#define BOOST_RANGE_NO_ARRAY_SUPPORT 1
|
#define BOOST_RANGE_NO_ARRAY_SUPPORT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,9 +15,6 @@
|
|||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
#include <boost/range/iterator.hpp>
|
#include <boost/range/iterator.hpp>
|
||||||
#include <boost/range/detail/common.hpp>
|
#include <boost/range/detail/common.hpp>
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1310)
|
|
||||||
# include <boost/range/value_type.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@ -62,19 +59,11 @@ namespace boost
|
|||||||
template<>
|
template<>
|
||||||
struct range_begin<array_>
|
struct range_begin<array_>
|
||||||
{
|
{
|
||||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
|
|
||||||
template< typename T, std::size_t sz >
|
|
||||||
static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
|
|
||||||
{
|
|
||||||
return boost_range_array;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static BOOST_RANGE_DEDUCED_TYPENAME range_value<T>::type* fun(T& t)
|
static BOOST_RANGE_DEDUCED_TYPENAME range_value<T>::type* fun(T& t)
|
||||||
{
|
{
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace 'range_detail'
|
} // namespace 'range_detail'
|
||||||
|
@ -14,15 +14,9 @@
|
|||||||
#include <boost/config.hpp> // BOOST_MSVC
|
#include <boost/config.hpp> // BOOST_MSVC
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
#include <boost/range/detail/implementation_help.hpp>
|
||||||
# include <boost/range/detail/vc6/end.hpp>
|
#include <boost/range/iterator.hpp>
|
||||||
#else
|
#include <boost/range/detail/common.hpp>
|
||||||
# include <boost/range/detail/implementation_help.hpp>
|
|
||||||
# include <boost/range/iterator.hpp>
|
|
||||||
# include <boost/range/detail/common.hpp>
|
|
||||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1310)
|
|
||||||
# include <boost/range/detail/remove_extent.hpp>
|
|
||||||
# endif
|
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@ -68,19 +62,11 @@ namespace boost
|
|||||||
template<>
|
template<>
|
||||||
struct range_end<array_>
|
struct range_end<array_>
|
||||||
{
|
{
|
||||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
|
|
||||||
template< typename T, std::size_t sz >
|
|
||||||
static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
|
|
||||||
{
|
|
||||||
return boost::range_detail::array_end( boost_range_array );
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t)
|
static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t)
|
||||||
{
|
{
|
||||||
return t + remove_extent<T>::size;
|
return t + remove_extent<T>::size;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace 'range_detail'
|
} // namespace 'range_detail'
|
||||||
@ -97,5 +83,4 @@ namespace boost
|
|||||||
|
|
||||||
} // namespace 'boost'
|
} // namespace 'boost'
|
||||||
|
|
||||||
# endif // VC6
|
|
||||||
#endif
|
#endif
|
||||||
|
23
include/boost/range/detail/size.hpp
Executable file → Normal file
23
include/boost/range/detail/size.hpp
Executable file → Normal file
@ -14,16 +14,10 @@
|
|||||||
|
|
||||||
#include <boost/config.hpp> // BOOST_MSVC
|
#include <boost/config.hpp> // BOOST_MSVC
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
#include <boost/range/detail/implementation_help.hpp>
|
||||||
# include <boost/range/detail/vc6/size.hpp>
|
#include <boost/range/detail/size_type.hpp>
|
||||||
#else
|
#include <boost/range/detail/common.hpp>
|
||||||
# include <boost/range/detail/implementation_help.hpp>
|
#include <iterator>
|
||||||
# include <boost/range/detail/size_type.hpp>
|
|
||||||
# include <boost/range/detail/common.hpp>
|
|
||||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
|
||||||
# include <boost/range/detail/remove_extent.hpp>
|
|
||||||
# endif
|
|
||||||
# include <iterator>
|
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@ -68,19 +62,11 @@ namespace boost
|
|||||||
template<>
|
template<>
|
||||||
struct range_size_<array_>
|
struct range_size_<array_>
|
||||||
{
|
{
|
||||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
template< typename T, std::size_t sz >
|
|
||||||
static std::size_t fun( T BOOST_RANGE_ARRAY_REF()[sz] )
|
|
||||||
{
|
|
||||||
return sz;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static std::size_t fun(T& t)
|
static std::size_t fun(T& t)
|
||||||
{
|
{
|
||||||
return remove_extent<T>::size;
|
return remove_extent<T>::size;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
@ -155,5 +141,4 @@ namespace boost
|
|||||||
|
|
||||||
} // namespace 'boost'
|
} // namespace 'boost'
|
||||||
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,170 +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/
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef BOOST_RANGE_DETAIL_VC6_END_HPP
|
|
||||||
#define BOOST_RANGE_DETAIL_VC6_END_HPP
|
|
||||||
|
|
||||||
#include <boost/range/detail/implementation_help.hpp>
|
|
||||||
#include <boost/range/detail/implementation_help.hpp>
|
|
||||||
#include <boost/range/result_iterator.hpp>
|
|
||||||
#include <boost/range/detail/common.hpp>
|
|
||||||
#include <boost/range/detail/remove_extent.hpp>
|
|
||||||
|
|
||||||
namespace boost
|
|
||||||
{
|
|
||||||
namespace range_detail
|
|
||||||
{
|
|
||||||
template< typename T >
|
|
||||||
struct range_end;
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// default
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_end<std_container_>
|
|
||||||
{
|
|
||||||
template< typename C >
|
|
||||||
struct inner {
|
|
||||||
static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<C>::type
|
|
||||||
fun( C& c )
|
|
||||||
{
|
|
||||||
return c.end();
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// pair
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_end<std_pair_>
|
|
||||||
{
|
|
||||||
template< typename P >
|
|
||||||
struct inner {
|
|
||||||
static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<P>::type
|
|
||||||
fun( const P& p )
|
|
||||||
{
|
|
||||||
return p.second;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// array
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_end<array_>
|
|
||||||
{
|
|
||||||
template< typename T >
|
|
||||||
struct inner {
|
|
||||||
static BOOST_DEDUCED_TYPENAME remove_extent<T>::type*
|
|
||||||
fun(T& t)
|
|
||||||
{
|
|
||||||
return t + remove_extent<T>::size;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_end<char_array_>
|
|
||||||
{
|
|
||||||
template< typename T >
|
|
||||||
struct inner {
|
|
||||||
static BOOST_DEDUCED_TYPENAME remove_extent<T>::type*
|
|
||||||
fun(T& t)
|
|
||||||
{
|
|
||||||
return t + remove_extent<T>::size;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_end<wchar_t_array_>
|
|
||||||
{
|
|
||||||
template< typename T >
|
|
||||||
struct inner {
|
|
||||||
static BOOST_DEDUCED_TYPENAME remove_extent<T>::type*
|
|
||||||
fun(T& t)
|
|
||||||
{
|
|
||||||
return t + remove_extent<T>::size;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// string
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_end<char_ptr_>
|
|
||||||
{
|
|
||||||
template< typename T >
|
|
||||||
struct inner {
|
|
||||||
static char* fun( char* s )
|
|
||||||
{
|
|
||||||
return boost::range_detail::str_end( s );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_end<const_char_ptr_>
|
|
||||||
{
|
|
||||||
template< typename T >
|
|
||||||
struct inner {
|
|
||||||
static const char* fun( const char* s )
|
|
||||||
{
|
|
||||||
return boost::range_detail::str_end( s );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_end<wchar_t_ptr_>
|
|
||||||
{
|
|
||||||
template< typename T >
|
|
||||||
struct inner {
|
|
||||||
static wchar_t* fun( wchar_t* s )
|
|
||||||
{
|
|
||||||
return boost::range_detail::str_end( s );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_end<const_wchar_t_ptr_>
|
|
||||||
{
|
|
||||||
template< typename T >
|
|
||||||
struct inner {
|
|
||||||
static const wchar_t* fun( const wchar_t* s )
|
|
||||||
{
|
|
||||||
return boost::range_detail::str_end( s );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace 'range_detail'
|
|
||||||
|
|
||||||
template< typename C >
|
|
||||||
inline BOOST_DEDUCED_TYPENAME range_result_iterator<C>::type
|
|
||||||
end( C& c )
|
|
||||||
{
|
|
||||||
return range_detail::range_end<range_detail::range<C>::type>::inner<C>::fun( c );
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace 'boost'
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,166 +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/
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef BOOST_RANGE_DETAIL_VC6_SIZE_HPP
|
|
||||||
#define BOOST_RANGE_DETAIL_VC6_SIZE_HPP
|
|
||||||
|
|
||||||
#include <boost/range/detail/implementation_help.hpp>
|
|
||||||
#include <boost/range/detail/size_type.hpp>
|
|
||||||
#include <boost/range/detail/common.hpp>
|
|
||||||
#include <boost/range/detail/remove_extent.hpp>
|
|
||||||
#include <iterator>
|
|
||||||
|
|
||||||
namespace boost
|
|
||||||
{
|
|
||||||
namespace range_detail
|
|
||||||
{
|
|
||||||
template< typename T >
|
|
||||||
struct range_size_;
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// default
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_size_<std_container_>
|
|
||||||
{
|
|
||||||
template< typename C >
|
|
||||||
struct inner {
|
|
||||||
static BOOST_RANGE_DEDUCED_TYPENAME C::size_type fun( const C& c )
|
|
||||||
{
|
|
||||||
return c.size();
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// pair
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_size_<std_pair_>
|
|
||||||
{
|
|
||||||
template< typename P >
|
|
||||||
struct inner {
|
|
||||||
static BOOST_RANGE_DEDUCED_TYPENAME range_size<P>::type
|
|
||||||
fun( const P& p )
|
|
||||||
{
|
|
||||||
return std::distance( p.first, p.second );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// array
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_size_<array_>
|
|
||||||
{
|
|
||||||
template<typename T>
|
|
||||||
struct inner {
|
|
||||||
static std::size_t fun(T& t)
|
|
||||||
{
|
|
||||||
return remove_extent<T>::size;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_size_<char_array_>
|
|
||||||
{
|
|
||||||
template<typename T>
|
|
||||||
struct inner {
|
|
||||||
static std::size_t fun(T& t)
|
|
||||||
{
|
|
||||||
return sizeof(T) / sizeof(T[0]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_size_<wchar_t_array_>
|
|
||||||
{
|
|
||||||
template<typename T>
|
|
||||||
struct inner {
|
|
||||||
static std::size_t fun(T& t)
|
|
||||||
{
|
|
||||||
return sizeof(T) / sizeof(T[0]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// string
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_size_<char_ptr_>
|
|
||||||
{
|
|
||||||
template<typename T>
|
|
||||||
struct inner {
|
|
||||||
static std::size_t fun( const char* s )
|
|
||||||
{
|
|
||||||
return boost::range_detail::str_size( s );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_size_<const_char_ptr_>
|
|
||||||
{
|
|
||||||
template<typename T>
|
|
||||||
struct inner {
|
|
||||||
static std::size_t fun( const char* s )
|
|
||||||
{
|
|
||||||
return boost::range_detail::str_size( s );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_size_<wchar_t_ptr_>
|
|
||||||
{
|
|
||||||
template<typename T>
|
|
||||||
struct inner {
|
|
||||||
static std::size_t fun( const wchar_t* s )
|
|
||||||
{
|
|
||||||
return boost::range_detail::str_size( s );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct range_size_<const_wchar_t_ptr_>
|
|
||||||
{
|
|
||||||
template<typename T>
|
|
||||||
struct inner {
|
|
||||||
static std::size_t fun( const wchar_t* s )
|
|
||||||
{
|
|
||||||
return boost::range_detail::str_size( s );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace 'range_detail'
|
|
||||||
|
|
||||||
|
|
||||||
template< typename C >
|
|
||||||
BOOST_RANGE_DEDUCED_TYPENAME range_size<C>::type
|
|
||||||
size( const C& c )
|
|
||||||
{
|
|
||||||
return range_detail::range_size_<range_detail::range<C>::type>::inner<C>::fun( c );
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace 'boost'
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -207,14 +207,12 @@ namespace boost
|
|||||||
m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
|
m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
this_type& operator=( const this_type& r )
|
this_type& operator=( const this_type& r )
|
||||||
{
|
{
|
||||||
m_Begin = r.begin();
|
m_Begin = r.begin();
|
||||||
m_End = r.end();
|
m_End = r.end();
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
template< class Iterator >
|
template< class Iterator >
|
||||||
iterator_range& operator=( const iterator_range<Iterator>& r )
|
iterator_range& operator=( const iterator_range<Iterator>& r )
|
||||||
|
Reference in New Issue
Block a user