summaryrefslogtreecommitdiff
path: root/boost/iterator/filter_iterator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/iterator/filter_iterator.hpp')
-rw-r--r--boost/iterator/filter_iterator.hpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/boost/iterator/filter_iterator.hpp b/boost/iterator/filter_iterator.hpp
index 14d640bf09..58aea33f2c 100644
--- a/boost/iterator/filter_iterator.hpp
+++ b/boost/iterator/filter_iterator.hpp
@@ -14,8 +14,9 @@
#include <boost/type_traits/is_class.hpp>
#include <boost/static_assert.hpp>
-namespace boost
-{
+namespace boost {
+namespace iterators {
+
template <class Predicate, class Iterator>
class filter_iterator;
@@ -39,7 +40,7 @@ namespace boost
> type;
};
}
-
+
template <class Predicate, class Iterator>
class filter_iterator
: public detail::filter_iterator_base<Predicate, Iterator>::type
@@ -68,7 +69,7 @@ namespace boost
// 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
+#endif
satisfy_predicate();
}
@@ -108,28 +109,29 @@ namespace boost
};
template <class Predicate, class Iterator>
- filter_iterator<Predicate,Iterator>
+ inline filter_iterator<Predicate,Iterator>
make_filter_iterator(Predicate f, Iterator x, Iterator end = Iterator())
{
return filter_iterator<Predicate,Iterator>(f,x,end);
}
template <class Predicate, class Iterator>
- filter_iterator<Predicate,Iterator>
+ inline filter_iterator<Predicate,Iterator>
make_filter_iterator(
typename iterators::enable_if<
is_class<Predicate>
, Iterator
>::type x
- , Iterator end = Iterator()
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- , Predicate* = 0
-#endif
- )
+ , Iterator end = Iterator())
{
return filter_iterator<Predicate,Iterator>(x,end);
}
+} // namespace iterators
+
+using iterators::filter_iterator;
+using iterators::make_filter_iterator;
+
} // namespace boost
#endif // BOOST_FILTER_ITERATOR_23022003THW_HPP