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

@ -4,7 +4,9 @@
#ifndef ANY_CONVERSION_EATER_DWA20031117_HPP
# define ANY_CONVERSION_EATER_DWA20031117_HPP
namespace boost { namespace detail {
namespace boost {
namespace iterators {
namespace detail {
// This type can be used in traits to "eat" up the one user-defined
// implicit conversion allowed.
@ -14,6 +16,6 @@ struct any_conversion_eater
any_conversion_eater(T const&);
};
}} // namespace boost::detail
}}} // namespace boost::iterators::detail
#endif // ANY_CONVERSION_EATER_DWA20031117_HPP

View File

@ -30,10 +30,13 @@
// iterator_category deduction for iterator_facade
//
// forward declaration
namespace boost { struct use_default; }
namespace boost {
namespace iterators {
namespace boost { namespace detail {
// forward declaration
struct use_default;
namespace detail {
struct input_output_iterator_tag
: std::input_iterator_tag
@ -63,9 +66,9 @@ struct iterator_writability_disabled
, boost::detail::indirect_traits::is_reference_to_const<Reference>
, is_const<ValueParam>
>
# else
# else
: is_const<ValueParam>
# endif
# endif
{};
@ -96,7 +99,7 @@ struct iterator_facade_default_category
, typename mpl::eval_if<
mpl::and_<
is_convertible<Traversal, single_pass_traversal_tag>
// check for readability
, is_convertible<Reference, ValueParam>
>
@ -146,7 +149,7 @@ struct iterator_category_with_traversal
BOOST_MPL_ASSERT_NOT((is_iterator_traversal<Category>));
# if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
BOOST_MPL_ASSERT((is_iterator_traversal<Traversal>));
# endif
# endif
};
// Computes an iterator_category tag whose traversal is Traversal and
@ -155,11 +158,11 @@ template <class Traversal, class ValueParam, class Reference>
struct facade_iterator_category_impl
{
BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>));
typedef typename iterator_facade_default_category<
Traversal,ValueParam,Reference
>::type category;
typedef typename mpl::if_<
is_same<
Traversal
@ -183,7 +186,7 @@ struct facade_iterator_category
{
};
}} // namespace boost::detail
}}} // namespace boost::iterators::detail
# include <boost/iterator/detail/config_undef.hpp>

View File

@ -9,7 +9,9 @@
# include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace detail {
namespace boost {
namespace iterators {
namespace detail {
//
// Returns the minimum category type or error_type
// if T1 and T2 are unrelated.
@ -17,7 +19,7 @@ namespace boost { namespace detail {
// For compilers not supporting is_convertible this only
// works with the new boost return and traversal category
// types. The exact boost _types_ are required. No derived types
// will work.
// will work.
//
//
template <bool GreaterEqual, bool LessEqual>
@ -25,7 +27,7 @@ struct minimum_category_impl;
template <class T1, class T2>
struct error_not_related_by_convertibility;
template <>
struct minimum_category_impl<true,false>
{
@ -66,17 +68,17 @@ struct minimum_category_impl<false,false>
template <class T1 = mpl::_1, class T2 = mpl::_2>
struct minimum_category
{
typedef minimum_category_impl<
typedef minimum_category_impl<
::boost::is_convertible<T1,T2>::value
, ::boost::is_convertible<T2,T1>::value
> outer;
typedef typename outer::template apply<T1,T2> inner;
typedef typename inner::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,minimum_category,(T1,T2))
};
template <>
struct minimum_category<mpl::_1,mpl::_2>
{
@ -86,7 +88,7 @@ struct minimum_category<mpl::_1,mpl::_2>
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,minimum_category,(mpl::_1,mpl::_2))
};
}} // namespace boost::detail
}}} // namespace boost::iterators::detail
#endif // MINIMUM_CATEGORY_DWA20031119_HPP