mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-20 08:02: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())
|
||||
: 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
|
||||
// function pointer type, since it will be 0.
|
||||
BOOST_STATIC_ASSERT(is_class<Predicate>::value);
|
||||
#endif
|
||||
satisfy_predicate();
|
||||
}
|
||||
|
||||
|
@ -115,12 +115,16 @@ namespace boost
|
||||
transform_iterator(Iterator const& x, UnaryFunction f)
|
||||
: super_t(x), m_f(f) { }
|
||||
|
||||
transform_iterator(Iterator const& x)
|
||||
explicit transform_iterator(Iterator const& 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
|
||||
// function pointer type, since it will be 0. Too dangerous.
|
||||
BOOST_STATIC_ASSERT(is_class<UnaryFunction>::value);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<class OtherIterator>
|
||||
|
@ -39,6 +39,10 @@ namespace boost { namespace detail
|
||||
template<> struct iterator_traits<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
|
||||
|
||||
|
Reference in New Issue
Block a user