mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-20 16:12:10 +02:00
Bugfixes and workarounds
[SVN r19121]
This commit is contained in:
@ -59,9 +59,13 @@ namespace boost
|
|||||||
filter_iterator(Iterator x, Iterator end = Iterator())
|
filter_iterator(Iterator x, Iterator end = Iterator())
|
||||||
: super_t(x), m_predicate(), m_end(end)
|
: super_t(x), m_predicate(), m_end(end)
|
||||||
{
|
{
|
||||||
|
// Pro8 is a little too aggressive about instantiating the
|
||||||
|
// body of this function.
|
||||||
|
#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
|
||||||
// Don't allow use of this constructor if Predicate is a
|
// Don't allow use of this constructor if Predicate is a
|
||||||
// function pointer type, since it will be 0.
|
// function pointer type, since it will be 0.
|
||||||
BOOST_STATIC_ASSERT(is_class<Predicate>::value);
|
BOOST_STATIC_ASSERT(is_class<Predicate>::value);
|
||||||
|
#endif
|
||||||
satisfy_predicate();
|
satisfy_predicate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,12 +115,16 @@ namespace boost
|
|||||||
transform_iterator(Iterator const& x, UnaryFunction f)
|
transform_iterator(Iterator const& x, UnaryFunction f)
|
||||||
: super_t(x), m_f(f) { }
|
: super_t(x), m_f(f) { }
|
||||||
|
|
||||||
transform_iterator(Iterator const& x)
|
explicit transform_iterator(Iterator const& x)
|
||||||
: super_t(x)
|
: super_t(x)
|
||||||
{
|
{
|
||||||
|
// Pro8 is a little too aggressive about instantiating the
|
||||||
|
// body of this function.
|
||||||
|
#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
|
||||||
// don't provide this constructor if UnaryFunction is a
|
// don't provide this constructor if UnaryFunction is a
|
||||||
// function pointer type, since it will be 0. Too dangerous.
|
// function pointer type, since it will be 0. Too dangerous.
|
||||||
BOOST_STATIC_ASSERT(is_class<UnaryFunction>::value);
|
BOOST_STATIC_ASSERT(is_class<UnaryFunction>::value);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class OtherIterator>
|
template<class OtherIterator>
|
||||||
|
@ -39,6 +39,10 @@ namespace boost { namespace detail
|
|||||||
template<> struct iterator_traits<std::pair<int, int> const*>
|
template<> struct iterator_traits<std::pair<int, int> const*>
|
||||||
: ptr_iter_traits<std::pair<int, int>, std::pair<int, int> const> {};
|
: ptr_iter_traits<std::pair<int, int>, std::pair<int, int> const> {};
|
||||||
|
|
||||||
|
template<> struct function_object_result<int (*)(int)>
|
||||||
|
{
|
||||||
|
typedef int type;
|
||||||
|
};
|
||||||
}}
|
}}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user