forked from boostorg/range
[boost][range] - Merge trac resolutions from the trunk. The most notable change is the alteration of the size type to be unsigned. This is a potentially breaking change.
[SVN r78860]
This commit is contained in:
@ -11,7 +11,6 @@
|
||||
#define BOOST_RANGE_DETAIL_ANY_ITERATOR_HPP_INCLUDED
|
||||
|
||||
#include <boost/cast.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <boost/range/empty.hpp>
|
||||
#include <boost/range/detail/demote_iterator_traversal_tag.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/next_prior.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
41
include/boost/range/detail/size_type.hpp
Executable file → Normal file
41
include/boost/range/detail/size_type.hpp
Executable file → Normal file
@ -17,12 +17,19 @@
|
||||
// missing partial specialization workaround.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace boost
|
||||
namespace boost
|
||||
{
|
||||
namespace range_detail
|
||||
{
|
||||
namespace range_detail
|
||||
{
|
||||
template< typename T >
|
||||
struct range_size_type_;
|
||||
struct range_size_type_
|
||||
{
|
||||
template< typename C >
|
||||
struct pts
|
||||
{
|
||||
typedef std::size_t type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_size_type_<std_container_>
|
||||
@ -33,36 +40,14 @@ namespace boost
|
||||
typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
template<>
|
||||
struct range_size_type_<std_pair_>
|
||||
{
|
||||
template< typename P >
|
||||
struct pts
|
||||
{
|
||||
typedef std::size_t type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_size_type_<array_>
|
||||
{
|
||||
template< typename A >
|
||||
struct pts
|
||||
{
|
||||
typedef std::size_t 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;
|
||||
typedef typename range_detail::range_size_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user