Bugfixes and workarounds

[SVN r19121]
This commit is contained in:
Dave Abrahams
2003-07-14 23:05:57 +00:00
parent e4447b8e83
commit 52c0d22cff
3 changed files with 13 additions and 1 deletions

View File

@ -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();
} }

View File

@ -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>

View File

@ -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