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

@ -56,7 +56,7 @@ namespace boost_concepts
private:
Iterator i;
};
template <
typename Iterator
, typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type
@ -78,7 +78,7 @@ namespace boost_concepts
, typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type
>
struct WritableIteratorConcept : WritableIterator<Iterator,ValueType> {};
BOOST_concept(SwappableIterator,(Iterator))
{
BOOST_CONCEPT_USAGE(SwappableIterator)
@ -93,7 +93,7 @@ namespace boost_concepts
BOOST_concept(LvalueIterator,(Iterator))
{
typedef typename boost::detail::iterator_traits<Iterator>::value_type value_type;
BOOST_CONCEPT_USAGE(LvalueIterator)
{
value_type& r = const_cast<value_type&>(*i);
@ -103,7 +103,7 @@ namespace boost_concepts
Iterator i;
};
//===========================================================================
// Iterator Traversal Concepts
@ -145,7 +145,7 @@ namespace boost_concepts
, boost::DefaultConstructible<Iterator>
{
typedef typename boost::detail::iterator_traits<Iterator>::difference_type difference_type;
BOOST_MPL_ASSERT((boost::is_integral<difference_type>));
BOOST_MPL_ASSERT_RELATION(std::numeric_limits<difference_type>::is_signed, ==, true);
@ -155,7 +155,7 @@ namespace boost_concepts
, boost::forward_traversal_tag
> ));
};
BOOST_concept(BidirectionalTraversal,(Iterator))
: ForwardTraversal<Iterator>
{
@ -192,14 +192,14 @@ namespace boost_concepts
i = i - n;
n = i - j;
}
private:
typename BidirectionalTraversal<Iterator>::difference_type n;
Iterator i, j;
};
//===========================================================================
// Iterator Interoperability
// Iterator Interoperability
namespace detail
{
@ -248,18 +248,18 @@ namespace boost_concepts
BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator))
{
private:
typedef typename boost::detail::pure_traversal_tag<
typedef typename boost::iterators::detail::pure_traversal_tag<
typename boost::iterator_traversal<
Iterator
>::type
>::type traversal_category;
typedef typename boost::detail::pure_traversal_tag<
typedef typename boost::iterators::detail::pure_traversal_tag<
typename boost::iterator_traversal<
ConstIterator
>::type
>::type const_traversal_category;
public:
BOOST_CONCEPT_ASSERT((SinglePassIterator<Iterator>));
BOOST_CONCEPT_ASSERT((SinglePassIterator<ConstIterator>));
@ -271,7 +271,7 @@ namespace boost_concepts
ci = i;
}
private:
Iterator i;
ConstIterator ci;