mirror of
https://github.com/boostorg/range.git
synced 2025-07-29 20:37:25 +02:00
Merge pull request #97 from Kojoley/remove-broken-no_function_template_ordering-support
Remove broken BOOST_NO_FUNCTION_TEMPLATE_ORDERING workaround
This commit is contained in:
@ -28,8 +28,6 @@ namespace boost
|
||||
return boost::make_iterator_range( r );
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< class Range >
|
||||
inline boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type >
|
||||
as_array( const Range& r )
|
||||
@ -37,8 +35,6 @@ namespace boost
|
||||
return boost::make_iterator_range( r );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -15,10 +15,6 @@
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#include <boost/range/detail/as_literal.hpp>
|
||||
#else
|
||||
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/range/detail/str_types.hpp>
|
||||
|
||||
@ -165,6 +161,4 @@ namespace boost
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
#endif
|
||||
|
@ -17,10 +17,6 @@
|
||||
|
||||
#include <boost/range/config.hpp>
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#include <boost/range/detail/begin.hpp>
|
||||
#else
|
||||
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
@ -122,8 +118,6 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
|
||||
} // namespace range_adl_barrier
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_adl_barrier
|
||||
|
@ -1,33 +0,0 @@
|
||||
// Boost.Range library
|
||||
//
|
||||
// Copyright Thorsten Ottosen 2006. 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_AS_LITERAL_HPP
|
||||
#define BOOST_RANGE_DETAIL_AS_LITERAL_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/detail/detail_str.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
template< class Range >
|
||||
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type>
|
||||
as_literal( Range& r )
|
||||
{
|
||||
return ::boost::make_iterator_range( ::boost::range_detail::str_begin(r),
|
||||
::boost::range_detail::str_end(r) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -1,83 +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_BEGIN_HPP
|
||||
#define BOOST_RANGE_DETAIL_BEGIN_HPP
|
||||
|
||||
#include <boost/config.hpp> // BOOST_MSVC
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/range/detail/common.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace range_detail
|
||||
{
|
||||
template< typename T >
|
||||
struct range_begin;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// default
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_begin<std_container_>
|
||||
{
|
||||
template< typename C >
|
||||
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type fun( C& c )
|
||||
{
|
||||
return c.begin();
|
||||
};
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// pair
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_begin<std_pair_>
|
||||
{
|
||||
template< typename P >
|
||||
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type fun( const P& p )
|
||||
{
|
||||
return p.first;
|
||||
}
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// array
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_begin<array_>
|
||||
{
|
||||
template<typename T>
|
||||
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_value<T>::type* fun(T& t)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace 'range_detail'
|
||||
|
||||
namespace range_adl_barrier
|
||||
{
|
||||
template< typename C >
|
||||
BOOST_CONSTEXPR inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
|
||||
begin( C& c )
|
||||
{
|
||||
return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
|
||||
}
|
||||
}
|
||||
} // namespace 'boost'
|
||||
|
||||
|
||||
#endif
|
@ -187,8 +187,6 @@ namespace boost {
|
||||
return collection_traits<C>::function_type::empty( c );
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
//! Free-standing begin() function
|
||||
/*!
|
||||
Get the begin iterator of the container. Uses collection_traits.
|
||||
@ -233,32 +231,6 @@ namespace boost {
|
||||
return collection_traits<C>::function_type::end( c );
|
||||
}
|
||||
|
||||
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
//! Free-standing begin() function
|
||||
/*!
|
||||
\overload
|
||||
*/
|
||||
template< typename C >
|
||||
inline typename collection_traits<C>::result_iterator
|
||||
begin( C& c )
|
||||
{
|
||||
return collection_traits<C>::function_type::begin( c );
|
||||
}
|
||||
|
||||
//! Free-standing end() function
|
||||
/*!
|
||||
\overload
|
||||
*/
|
||||
template< typename C >
|
||||
inline typename collection_traits<C>::result_iterator
|
||||
end( C& c )
|
||||
{
|
||||
return collection_traits<C>::function_type::end( c );
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
} // namespace algorithm
|
||||
} // namespace boost
|
||||
|
||||
|
@ -63,8 +63,6 @@ namespace boost {
|
||||
return c.empty();
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename C >
|
||||
static iterator begin( C& c )
|
||||
{
|
||||
@ -89,22 +87,6 @@ namespace boost {
|
||||
return c.end();
|
||||
}
|
||||
|
||||
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename C >
|
||||
static result_iterator begin( C& c )
|
||||
{
|
||||
return c.begin();
|
||||
}
|
||||
|
||||
template< typename C >
|
||||
static result_iterator end( C& c )
|
||||
{
|
||||
return c.end();
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@ -347,8 +329,6 @@ namespace boost {
|
||||
}
|
||||
|
||||
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename A >
|
||||
static iterator begin( A& a )
|
||||
{
|
||||
@ -373,22 +353,6 @@ namespace boost {
|
||||
return a+array_length_type::length(a);
|
||||
}
|
||||
|
||||
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename A >
|
||||
static result_iterator begin( A& a )
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
template< typename A >
|
||||
static result_iterator end( A& a )
|
||||
{
|
||||
return a+array_length_type::length(a);
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@ -436,8 +400,6 @@ namespace boost {
|
||||
return p==0 || p[0]==0;
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename P >
|
||||
static iterator begin( P& p )
|
||||
{
|
||||
@ -468,24 +430,6 @@ namespace boost {
|
||||
return p+char_traits::length(p);
|
||||
}
|
||||
|
||||
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename P >
|
||||
static result_iterator begin( P& p )
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
||||
template< typename P >
|
||||
static result_iterator end( P& p )
|
||||
{
|
||||
if ( p==0 )
|
||||
return p;
|
||||
else
|
||||
return p+char_traits::length(p);
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
@ -1,376 +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_DETAIL_STR_HPP
|
||||
#define BOOST_RANGE_DETAIL_DETAIL_STR_HPP
|
||||
|
||||
#include <boost/config.hpp> // BOOST_MSVC
|
||||
#include <boost/range/iterator.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace range_detail
|
||||
{
|
||||
//
|
||||
// iterator
|
||||
//
|
||||
|
||||
template<>
|
||||
struct range_iterator_<char_array_>
|
||||
{
|
||||
template< typename T >
|
||||
struct pts
|
||||
{
|
||||
typedef BOOST_RANGE_DEDUCED_TYPENAME
|
||||
remove_extent<T>::type* type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_iterator_<char_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef char* type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_iterator_<const_char_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef const char* type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_iterator_<wchar_t_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef wchar_t* type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_iterator_<const_wchar_t_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef const wchar_t* type;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// const iterator
|
||||
//
|
||||
|
||||
template<>
|
||||
struct range_const_iterator_<char_array_>
|
||||
{
|
||||
template< typename T >
|
||||
struct pts
|
||||
{
|
||||
typedef const BOOST_RANGE_DEDUCED_TYPENAME
|
||||
remove_extent<T>::type* type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_const_iterator_<char_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef const char* type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_const_iterator_<const_char_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef const char* type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_const_iterator_<wchar_t_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef const wchar_t* type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_const_iterator_<const_wchar_t_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef const wchar_t* type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#include <boost/range/detail/begin.hpp>
|
||||
#include <boost/range/detail/end.hpp>
|
||||
#include <boost/range/detail/size_type.hpp>
|
||||
#include <boost/range/detail/value_type.hpp>
|
||||
#include <boost/range/detail/common.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace range_detail
|
||||
{
|
||||
//
|
||||
// str_begin()
|
||||
//
|
||||
template<>
|
||||
struct range_begin<char_ptr_>
|
||||
{
|
||||
static char* fun( char* s )
|
||||
{
|
||||
return s;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_begin<const_char_ptr_>
|
||||
{
|
||||
static const char* fun( const char* s )
|
||||
{
|
||||
return s;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_begin<wchar_t_ptr_>
|
||||
{
|
||||
|
||||
static wchar_t* fun( wchar_t* s )
|
||||
{
|
||||
return s;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_begin<const_wchar_t_ptr_>
|
||||
{
|
||||
static const wchar_t* fun( const wchar_t* s )
|
||||
{
|
||||
return s;
|
||||
}
|
||||
};
|
||||
|
||||
template< typename C >
|
||||
inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
|
||||
str_begin( C& c )
|
||||
{
|
||||
return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME
|
||||
range_detail::range<C>::type >::fun( c );
|
||||
}
|
||||
|
||||
//
|
||||
// str_end()
|
||||
//
|
||||
|
||||
template<>
|
||||
struct range_end<char_array_>
|
||||
{
|
||||
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 );
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_end<wchar_t_array_>
|
||||
{
|
||||
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 );
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_end<char_ptr_>
|
||||
{
|
||||
static char* fun( char* s )
|
||||
{
|
||||
return boost::range_detail::str_end( s );
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_end<const_char_ptr_>
|
||||
{
|
||||
static const char* fun( const char* s )
|
||||
{
|
||||
return boost::range_detail::str_end( s );
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_end<wchar_t_ptr_>
|
||||
{
|
||||
static wchar_t* fun( wchar_t* s )
|
||||
{
|
||||
return boost::range_detail::str_end( s );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<>
|
||||
struct range_end<const_wchar_t_ptr_>
|
||||
{
|
||||
static const wchar_t* fun( const wchar_t* s )
|
||||
{
|
||||
return boost::range_detail::str_end( s );
|
||||
}
|
||||
};
|
||||
|
||||
template< typename C >
|
||||
inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
|
||||
str_end( C& c )
|
||||
{
|
||||
return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME
|
||||
range_detail::range<C>::type >::fun( c );
|
||||
}
|
||||
|
||||
//
|
||||
// size_type
|
||||
//
|
||||
|
||||
template<>
|
||||
struct range_size_type_<char_array_>
|
||||
{
|
||||
template< typename A >
|
||||
struct pts
|
||||
{
|
||||
typedef std::size_t type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_size_type_<char_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef std::size_t type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_size_type_<const_char_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef std::size_t type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_size_type_<wchar_t_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef std::size_t type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_size_type_<const_wchar_t_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef std::size_t type;
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
// value_type
|
||||
//
|
||||
|
||||
template<>
|
||||
struct range_value_type_<char_array_>
|
||||
{
|
||||
template< typename T >
|
||||
struct pts
|
||||
{
|
||||
typedef char type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_value_type_<char_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef char type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_value_type_<const_char_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef const char type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_value_type_<wchar_t_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef wchar_t type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_value_type_<const_wchar_t_ptr_>
|
||||
{
|
||||
template< typename S >
|
||||
struct pts
|
||||
{
|
||||
typedef const wchar_t type;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace 'range_detail'
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
|
||||
#endif
|
@ -1,86 +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_END_HPP
|
||||
#define BOOST_RANGE_DETAIL_END_HPP
|
||||
|
||||
#include <boost/config.hpp> // BOOST_MSVC
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/range/detail/implementation_help.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/range/detail/common.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_detail
|
||||
{
|
||||
template< typename T >
|
||||
struct range_end;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// default
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_end<std_container_>
|
||||
{
|
||||
template< typename C >
|
||||
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
|
||||
fun( C& c )
|
||||
{
|
||||
return c.end();
|
||||
};
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// pair
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_end<std_pair_>
|
||||
{
|
||||
template< typename P >
|
||||
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type
|
||||
fun( const P& p )
|
||||
{
|
||||
return p.second;
|
||||
}
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// array
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct range_end<array_>
|
||||
{
|
||||
template<typename T>
|
||||
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t)
|
||||
{
|
||||
return t + remove_extent<T>::size;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace 'range_detail'
|
||||
|
||||
namespace range_adl_barrier
|
||||
{
|
||||
template< typename C >
|
||||
BOOST_CONSTEXPR inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
|
||||
end( C& c )
|
||||
{
|
||||
return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
|
||||
}
|
||||
} // namespace range_adl_barrier
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif
|
@ -1,157 +0,0 @@
|
||||
// Boost.Range library
|
||||
//
|
||||
// Copyright Jonathan Turkanis 2005. 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_REMOVE_BOUNDS_HPP
|
||||
#define BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP
|
||||
|
||||
#include <boost/config.hpp> // MSVC, NO_INTRINSIC_WCHAR_T, put size_t in std.
|
||||
#include <cstddef>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_detail
|
||||
{
|
||||
|
||||
template< typename Case1 = mpl::true_,
|
||||
typename Type1 = mpl::void_,
|
||||
typename Case2 = mpl::true_,
|
||||
typename Type2 = mpl::void_,
|
||||
typename Case3 = mpl::true_,
|
||||
typename Type3 = mpl::void_,
|
||||
typename Case4 = mpl::true_,
|
||||
typename Type4 = mpl::void_,
|
||||
typename Case5 = mpl::true_,
|
||||
typename Type5 = mpl::void_,
|
||||
typename Case6 = mpl::true_,
|
||||
typename Type6 = mpl::void_,
|
||||
typename Case7 = mpl::true_,
|
||||
typename Type7 = mpl::void_,
|
||||
typename Case8 = mpl::true_,
|
||||
typename Type8 = mpl::void_,
|
||||
typename Case9 = mpl::true_,
|
||||
typename Type9 = mpl::void_,
|
||||
typename Case10 = mpl::true_,
|
||||
typename Type10 = mpl::void_,
|
||||
typename Case11 = mpl::true_,
|
||||
typename Type11 = mpl::void_,
|
||||
typename Case12 = mpl::true_,
|
||||
typename Type12 = mpl::void_,
|
||||
typename Case13 = mpl::true_,
|
||||
typename Type13 = mpl::void_,
|
||||
typename Case14 = mpl::true_,
|
||||
typename Type14 = mpl::void_,
|
||||
typename Case15 = mpl::true_,
|
||||
typename Type15 = mpl::void_,
|
||||
typename Case16 = mpl::true_,
|
||||
typename Type16 = mpl::void_,
|
||||
typename Case17 = mpl::true_,
|
||||
typename Type17 = mpl::void_,
|
||||
typename Case18 = mpl::true_,
|
||||
typename Type18 = mpl::void_,
|
||||
typename Case19 = mpl::true_,
|
||||
typename Type19 = mpl::void_,
|
||||
typename Case20 = mpl::true_,
|
||||
typename Type20 = mpl::void_>
|
||||
struct select {
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
Case1, mpl::identity<Type1>, mpl::eval_if<
|
||||
Case2, mpl::identity<Type2>, mpl::eval_if<
|
||||
Case3, mpl::identity<Type3>, mpl::eval_if<
|
||||
Case4, mpl::identity<Type4>, mpl::eval_if<
|
||||
Case5, mpl::identity<Type5>, mpl::eval_if<
|
||||
Case6, mpl::identity<Type6>, mpl::eval_if<
|
||||
Case7, mpl::identity<Type7>, mpl::eval_if<
|
||||
Case8, mpl::identity<Type8>, mpl::eval_if<
|
||||
Case9, mpl::identity<Type9>, mpl::if_<
|
||||
Case10, Type10, mpl::void_ > > > > > > > > >
|
||||
>::type result1;
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
Case11, mpl::identity<Type11>, mpl::eval_if<
|
||||
Case12, mpl::identity<Type12>, mpl::eval_if<
|
||||
Case13, mpl::identity<Type13>, mpl::eval_if<
|
||||
Case14, mpl::identity<Type14>, mpl::eval_if<
|
||||
Case15, mpl::identity<Type15>, mpl::eval_if<
|
||||
Case16, mpl::identity<Type16>, mpl::eval_if<
|
||||
Case17, mpl::identity<Type17>, mpl::eval_if<
|
||||
Case18, mpl::identity<Type18>, mpl::eval_if<
|
||||
Case19, mpl::identity<Type19>, mpl::if_<
|
||||
Case20, Type20, mpl::void_ > > > > > > > > >
|
||||
> result2;
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_same<result1, mpl::void_>,
|
||||
result2,
|
||||
mpl::identity<result1>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct remove_extent {
|
||||
static T* ar;
|
||||
BOOST_STATIC_CONSTANT(std::size_t, size = sizeof(*ar) / sizeof((*ar)[0]));
|
||||
|
||||
typedef typename
|
||||
select<
|
||||
is_same<T, bool[size]>, bool,
|
||||
is_same<T, char[size]>, char,
|
||||
is_same<T, signed char[size]>, signed char,
|
||||
is_same<T, unsigned char[size]>, unsigned char,
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
is_same<T, wchar_t[size]>, wchar_t,
|
||||
#endif
|
||||
is_same<T, short[size]>, short,
|
||||
is_same<T, unsigned short[size]>, unsigned short,
|
||||
is_same<T, int[size]>, int,
|
||||
is_same<T, unsigned int[size]>, unsigned int,
|
||||
is_same<T, long[size]>, long,
|
||||
is_same<T, unsigned long[size]>, unsigned long,
|
||||
is_same<T, float[size]>, float,
|
||||
is_same<T, double[size]>, double,
|
||||
is_same<T, long double[size]>, long double
|
||||
>::type result1;
|
||||
typedef typename
|
||||
select<
|
||||
is_same<T, const bool[size]>, const bool,
|
||||
is_same<T, const char[size]>, const char,
|
||||
is_same<T, const signed char[size]>, const signed char,
|
||||
is_same<T, const unsigned char[size]>, const unsigned char,
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
is_same<T, const wchar_t[size]>, const wchar_t,
|
||||
#endif
|
||||
is_same<T, const short[size]>, const short,
|
||||
is_same<T, const unsigned short[size]>, const unsigned short,
|
||||
is_same<T, const int[size]>, const int,
|
||||
is_same<T, const unsigned int[size]>, const unsigned int,
|
||||
is_same<T, const long[size]>, const long,
|
||||
is_same<T, const unsigned long[size]>, const unsigned long,
|
||||
is_same<T, const float[size]>, const float,
|
||||
is_same<T, const double[size]>, const double,
|
||||
is_same<T, const long double[size]>, const long double
|
||||
> result2;
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_same<result1, mpl::void_>,
|
||||
result2,
|
||||
mpl::identity<result1>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
} // namespace 'range_detail'
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
|
||||
#endif
|
@ -1,55 +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_SIZE_TYPE_HPP
|
||||
#define BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
|
||||
|
||||
#include <boost/range/detail/common.hpp>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// missing partial specialization workaround.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_detail
|
||||
{
|
||||
template< typename T >
|
||||
struct range_size_type_
|
||||
{
|
||||
template< typename C >
|
||||
struct pts
|
||||
{
|
||||
typedef std::size_t type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_size_type_<std_container_>
|
||||
{
|
||||
template< typename C >
|
||||
struct pts
|
||||
{
|
||||
typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
template< typename C >
|
||||
class range_size
|
||||
{
|
||||
typedef typename range_detail::range<C>::type c_type;
|
||||
public:
|
||||
typedef typename range_detail::range_size_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,72 +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_VALUE_TYPE_HPP
|
||||
#define BOOST_RANGE_DETAIL_VALUE_TYPE_HPP
|
||||
|
||||
#include <boost/range/detail/common.hpp>
|
||||
#include <boost/range/detail/remove_extent.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// missing partial specialization workaround.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_detail
|
||||
{
|
||||
template< typename T >
|
||||
struct range_value_type_;
|
||||
|
||||
template<>
|
||||
struct range_value_type_<std_container_>
|
||||
{
|
||||
template< typename C >
|
||||
struct pts
|
||||
{
|
||||
typedef BOOST_RANGE_DEDUCED_TYPENAME C::value_type type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_value_type_<std_pair_>
|
||||
{
|
||||
template< typename P >
|
||||
struct pts
|
||||
{
|
||||
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::iterator_value< BOOST_RANGE_DEDUCED_TYPENAME P::first_type >::type type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_value_type_<array_>
|
||||
{
|
||||
template< typename T >
|
||||
struct pts
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME remove_extent<T>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template< typename C >
|
||||
class range_value
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
|
||||
public:
|
||||
typedef BOOST_DEDUCED_TYPENAME range_detail::range_value_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -17,10 +17,6 @@
|
||||
|
||||
#include <boost/range/config.hpp>
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#include <boost/range/detail/end.hpp>
|
||||
#else
|
||||
|
||||
#include <boost/range/detail/implementation_help.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/range/const_iterator.hpp>
|
||||
@ -116,8 +112,6 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
|
||||
} // namespace range_adl_barrier
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_adl_barrier
|
||||
|
@ -637,8 +637,6 @@ public:
|
||||
return iterator_range_detail::greater_or_equal_than( l, r );
|
||||
}
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#else
|
||||
template< class Iterator1T, class Iterator2T >
|
||||
inline bool
|
||||
operator==( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r )
|
||||
@ -743,8 +741,6 @@ public:
|
||||
return iterator_range_detail::greater_or_equal_than( l, r );
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
// iterator range utilities -----------------------------------------//
|
||||
|
||||
//! iterator_range construct helper
|
||||
@ -769,17 +765,6 @@ public:
|
||||
return iterator_range<IteratorT>(first, boost::next(first, n));
|
||||
}
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename Range >
|
||||
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
|
||||
make_iterator_range( Range& r )
|
||||
{
|
||||
return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
|
||||
( boost::begin( r ), boost::end( r ) );
|
||||
}
|
||||
|
||||
#else
|
||||
//! iterator_range construct helper
|
||||
/*!
|
||||
Construct an \c iterator_range from a \c Range containing the begin
|
||||
@ -801,8 +786,6 @@ public:
|
||||
( r, iterator_range_detail::const_range_tag() );
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
namespace iterator_range_detail
|
||||
{
|
||||
template< class Range >
|
||||
@ -827,19 +810,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< class Range >
|
||||
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
|
||||
make_iterator_range( Range& r,
|
||||
BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
|
||||
BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
|
||||
{
|
||||
return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template< class Range >
|
||||
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
|
||||
make_iterator_range( Range& r,
|
||||
@ -858,8 +828,6 @@ public:
|
||||
return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
//! copy a range into a sequence
|
||||
/*!
|
||||
Construct a new sequence of the specified type from the elements
|
||||
|
@ -21,17 +21,6 @@
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< class C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
||||
rbegin( C& c )
|
||||
{
|
||||
return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( boost::end( c ) );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template< class C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
||||
rbegin( C& c )
|
||||
@ -50,8 +39,6 @@ rbegin( const C& c )
|
||||
return iter_type( boost::end( c ) );
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< class T >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
|
||||
const_rbegin( const T& r )
|
||||
|
@ -21,17 +21,6 @@
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< class C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
||||
rend( C& c )
|
||||
{
|
||||
return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( boost::begin( c ) );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template< class C >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
|
||||
rend( C& c )
|
||||
@ -50,8 +39,6 @@ rend( const C& c )
|
||||
return iter_type( boost::begin( c ) );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template< class T >
|
||||
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
|
||||
const_rend( const T& r )
|
||||
|
Reference in New Issue
Block a user