mirror of
https://github.com/boostorg/detail.git
synced 2025-07-31 21:04:27 +02:00
Small changes to support new iterator adaptors in sandbox
[SVN r18212]
This commit is contained in:
@@ -92,15 +92,20 @@ BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category)
|
|||||||
# if !defined(BOOST_NO_STD_ITERATOR_TRAITS) \
|
# if !defined(BOOST_NO_STD_ITERATOR_TRAITS) \
|
||||||
&& !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
&& !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||||
&& !defined(BOOST_MSVC_STD_ITERATOR)
|
&& !defined(BOOST_MSVC_STD_ITERATOR)
|
||||||
|
|
||||||
// Define a new template so it can be specialized
|
// Define a new template so it can be specialized
|
||||||
template <class Iterator>
|
template <class Iterator>
|
||||||
struct iterator_traits
|
struct iterator_traits
|
||||||
: std::iterator_traits<Iterator>
|
: std::iterator_traits<Iterator>
|
||||||
{};
|
{};
|
||||||
using std::distance;
|
using std::distance;
|
||||||
# elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
|
||||||
|
# else
|
||||||
|
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||||
&& !defined(BOOST_MSVC_STD_ITERATOR)
|
&& !defined(BOOST_MSVC_STD_ITERATOR)
|
||||||
|
|
||||||
|
// This is the case where everything conforms except BOOST_NO_STD_ITERATOR_TRAITS
|
||||||
|
|
||||||
// Rogue Wave Standard Library fools itself into thinking partial
|
// Rogue Wave Standard Library fools itself into thinking partial
|
||||||
// specialization is missing on some platforms (e.g. Sun), so fails to
|
// specialization is missing on some platforms (e.g. Sun), so fails to
|
||||||
// supply iterator_traits!
|
// supply iterator_traits!
|
||||||
@@ -389,6 +394,8 @@ struct iterator_traits
|
|||||||
// This specialization cuts off ETI (Early Template Instantiation) for MSVC.
|
// This specialization cuts off ETI (Early Template Instantiation) for MSVC.
|
||||||
template <> struct iterator_traits<int>{};
|
template <> struct iterator_traits<int>{};
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
namespace iterator_traits_
|
namespace iterator_traits_
|
||||||
{
|
{
|
||||||
template <class Iterator, class Difference>
|
template <class Iterator, class Difference>
|
||||||
|
Reference in New Issue
Block a user