Moved most components of the library to iterators:: namespace.

This change excludes boost:: and boost::detail:: namespaces from ADL for unqualified function calls (e.g. algorithms). This reduces the possibility of name clashes with other libraries and user's code. One of the effects should be fixing test failures on gcc 4.2 and 4.4 due to clashed with Boost.TypeTraits.

Also some of the functions marked with inline keyword.
This commit is contained in:
Andrey Semashev
2014-07-03 00:22:45 +04:00
parent e000b676cc
commit dc96d371fa
28 changed files with 596 additions and 442 deletions

View File

@ -11,8 +11,8 @@
#include <boost/iterator.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
namespace boost
{
namespace boost {
namespace iterators {
//
//
@ -28,7 +28,7 @@ namespace boost
public:
reverse_iterator() {}
explicit reverse_iterator(Iterator x)
explicit reverse_iterator(Iterator x)
: super_t(x) {}
template<class OtherIterator>
@ -41,7 +41,7 @@ namespace boost
private:
typename super_t::reference dereference() const { return *boost::prior(this->base()); }
void increment() { --this->base_reference(); }
void decrement() { ++this->base_reference(); }
@ -59,11 +59,16 @@ namespace boost
};
template <class BidirectionalIterator>
reverse_iterator<BidirectionalIterator> make_reverse_iterator(BidirectionalIterator x)
inline reverse_iterator<BidirectionalIterator> make_reverse_iterator(BidirectionalIterator x)
{
return reverse_iterator<BidirectionalIterator>(x);
}
} // namespace iterators
using iterators::reverse_iterator;
using iterators::make_reverse_iterator;
} // namespace boost
#endif // BOOST_REVERSE_ITERATOR_23022003THW_HPP