mirror of
https://github.com/boostorg/iterator.git
synced 2025-05-09 23:23:54 +00:00
Added missing includes for use_default.
This commit is contained in:
parent
241c28018e
commit
fc99b7a15d
@ -3,18 +3,19 @@
|
|||||||
// accompanying file LICENSE_1_0.txt or copy at
|
// accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
#ifndef COUNTING_ITERATOR_DWA200348_HPP
|
#ifndef COUNTING_ITERATOR_DWA200348_HPP
|
||||||
# define COUNTING_ITERATOR_DWA200348_HPP
|
#define COUNTING_ITERATOR_DWA200348_HPP
|
||||||
|
|
||||||
# include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
# include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
# include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||||
# include <limits>
|
#include <limits>
|
||||||
# endif
|
#endif
|
||||||
# include <boost/type_traits/type_identity.hpp>
|
#include <boost/core/use_default.hpp>
|
||||||
# include <boost/detail/numeric_traits.hpp>
|
#include <boost/type_traits/type_identity.hpp>
|
||||||
# include <boost/iterator/iterator_adaptor.hpp>
|
#include <boost/detail/numeric_traits.hpp>
|
||||||
|
#include <boost/iterator/iterator_adaptor.hpp>
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace iterators {
|
namespace iterators {
|
||||||
@ -34,23 +35,23 @@ namespace detail
|
|||||||
struct is_numeric_impl
|
struct is_numeric_impl
|
||||||
{
|
{
|
||||||
|
|
||||||
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||||
|
|
||||||
BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits<T>::is_specialized);
|
BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits<T>::is_specialized);
|
||||||
|
|
||||||
# else
|
#else
|
||||||
|
|
||||||
# if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551))
|
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551))
|
||||||
BOOST_STATIC_CONSTANT(
|
BOOST_STATIC_CONSTANT(
|
||||||
bool, value = (
|
bool, value = (
|
||||||
std::is_convertible<int,T>::value
|
std::is_convertible<int,T>::value
|
||||||
&& std::is_convertible<T,int>::value
|
&& std::is_convertible<T,int>::value
|
||||||
));
|
));
|
||||||
# else
|
#else
|
||||||
BOOST_STATIC_CONSTANT(bool, value = std::is_arithmetic<T>::value);
|
BOOST_STATIC_CONSTANT(bool, value = std::is_arithmetic<T>::value);
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
# endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@ -58,7 +59,7 @@ namespace detail
|
|||||||
: std::integral_constant<bool, ::boost::iterators::detail::is_numeric_impl<T>::value>
|
: std::integral_constant<bool, ::boost::iterators::detail::is_numeric_impl<T>::value>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
# if defined(BOOST_HAS_LONG_LONG)
|
#if defined(BOOST_HAS_LONG_LONG)
|
||||||
template <>
|
template <>
|
||||||
struct is_numeric<boost::long_long_type>
|
struct is_numeric<boost::long_long_type>
|
||||||
: boost::true_type {};
|
: boost::true_type {};
|
||||||
@ -66,9 +67,9 @@ namespace detail
|
|||||||
template <>
|
template <>
|
||||||
struct is_numeric<boost::ulong_long_type>
|
struct is_numeric<boost::ulong_long_type>
|
||||||
: boost::true_type {};
|
: boost::true_type {};
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
# if defined(BOOST_HAS_INT128)
|
#if defined(BOOST_HAS_INT128)
|
||||||
template <>
|
template <>
|
||||||
struct is_numeric<boost::int128_type>
|
struct is_numeric<boost::int128_type>
|
||||||
: boost::true_type {};
|
: boost::true_type {};
|
||||||
@ -76,7 +77,7 @@ namespace detail
|
|||||||
template <>
|
template <>
|
||||||
struct is_numeric<boost::uint128_type>
|
struct is_numeric<boost::uint128_type>
|
||||||
: boost::true_type {};
|
: boost::true_type {};
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
// Some compilers fail to have a numeric_limits specialization
|
// Some compilers fail to have a numeric_limits specialization
|
||||||
template <>
|
template <>
|
||||||
@ -89,7 +90,7 @@ namespace detail
|
|||||||
typedef typename boost::detail::numeric_traits<T>::difference_type type;
|
typedef typename boost::detail::numeric_traits<T>::difference_type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
# if defined(BOOST_HAS_INT128)
|
#if defined(BOOST_HAS_INT128)
|
||||||
// std::numeric_limits, which is used by numeric_traits, is not specialized for __int128 in some standard libraries
|
// std::numeric_limits, which is used by numeric_traits, is not specialized for __int128 in some standard libraries
|
||||||
template <>
|
template <>
|
||||||
struct numeric_difference<boost::int128_type>
|
struct numeric_difference<boost::int128_type>
|
||||||
@ -102,7 +103,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
typedef boost::int128_type type;
|
typedef boost::int128_type type;
|
||||||
};
|
};
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
template <class Incrementable, class CategoryOrTraversal, class Difference>
|
template <class Incrementable, class CategoryOrTraversal, class Difference>
|
||||||
struct counting_iterator_base
|
struct counting_iterator_base
|
||||||
@ -129,10 +130,10 @@ namespace detail
|
|||||||
counting_iterator<Incrementable, CategoryOrTraversal, Difference> // self
|
counting_iterator<Incrementable, CategoryOrTraversal, Difference> // self
|
||||||
, Incrementable // Base
|
, Incrementable // Base
|
||||||
, Incrementable // Value
|
, Incrementable // Value
|
||||||
# ifndef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
|
#ifndef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
|
||||||
const // MSVC won't strip this. Instead we enable Thomas'
|
const // MSVC won't strip this. Instead we enable Thomas'
|
||||||
// criterion (see boost/iterator/detail/facade_iterator_category.hpp)
|
// criterion (see boost/iterator/detail/facade_iterator_category.hpp)
|
||||||
# endif
|
#endif
|
||||||
, traversal
|
, traversal
|
||||||
, Incrementable const& // reference
|
, Incrementable const& // reference
|
||||||
, difference
|
, difference
|
||||||
@ -195,7 +196,7 @@ class counting_iterator
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
# if 0
|
#if 0
|
||||||
template<class OtherIncrementable>
|
template<class OtherIncrementable>
|
||||||
counting_iterator(
|
counting_iterator(
|
||||||
counting_iterator<OtherIncrementable, CategoryOrTraversal, Difference> const& t
|
counting_iterator<OtherIncrementable, CategoryOrTraversal, Difference> const& t
|
||||||
@ -203,7 +204,7 @@ class counting_iterator
|
|||||||
)
|
)
|
||||||
: super_t(t.base())
|
: super_t(t.base())
|
||||||
{}
|
{}
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
BOOST_DEFAULTED_FUNCTION(counting_iterator& operator=(counting_iterator const& rhs), { *static_cast< super_t* >(this) = static_cast< super_t const& >(rhs); return *this; })
|
BOOST_DEFAULTED_FUNCTION(counting_iterator& operator=(counting_iterator const& rhs), { *static_cast< super_t* >(this) = static_cast< super_t const& >(rhs); return *this; })
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <boost/indirect_reference.hpp>
|
#include <boost/indirect_reference.hpp>
|
||||||
|
|
||||||
#include <boost/detail/indirect_traits.hpp>
|
#include <boost/detail/indirect_traits.hpp>
|
||||||
|
#include <boost/core/use_default.hpp>
|
||||||
|
|
||||||
#include <boost/mpl/identity.hpp>
|
#include <boost/mpl/identity.hpp>
|
||||||
#include <boost/mpl/eval_if.hpp>
|
#include <boost/mpl/eval_if.hpp>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
#include <boost/core/use_default.hpp>
|
||||||
#include <boost/iterator/iterator_adaptor.hpp>
|
#include <boost/iterator/iterator_adaptor.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/config/workaround.hpp>
|
#include <boost/config/workaround.hpp>
|
||||||
|
#include <boost/core/use_default.hpp>
|
||||||
#include <boost/iterator/iterator_adaptor.hpp>
|
#include <boost/iterator/iterator_adaptor.hpp>
|
||||||
#include <boost/iterator/iterator_categories.hpp>
|
#include <boost/iterator/iterator_categories.hpp>
|
||||||
#include <boost/utility/result_of.hpp>
|
#include <boost/utility/result_of.hpp>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user