|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86056 - in trunk/boost: circular_buffer iterator
From: steveire_at_[hidden]
Date: 2013-09-30 11:54:32
Author: skelly
Date: 2013-09-30 11:54:32 EDT (Mon, 30 Sep 2013)
New Revision: 86056
URL: http://svn.boost.org/trac/boost/changeset/86056
Log:
Remove use of BOOST_ITERATOR_CATEGORY
Text files modified:
trunk/boost/circular_buffer/base.hpp | 24 ++++++++++++------------
trunk/boost/circular_buffer/space_optimized.hpp | 8 ++++----
trunk/boost/iterator/iterator_traits.hpp | 5 +++--
3 files changed, 19 insertions(+), 18 deletions(-)
Modified: trunk/boost/circular_buffer/base.hpp
==============================================================================
--- trunk/boost/circular_buffer/base.hpp Mon Sep 30 11:54:03 2013 (r86055)
+++ trunk/boost/circular_buffer/base.hpp 2013-09-30 11:54:32 EDT (Mon, 30 Sep 2013) (r86056)
@@ -2554,9 +2554,9 @@
void initialize(Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
- initialize(first, last, BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ initialize(first, last, iterator_category<Iterator>::type());
#else
- initialize(first, last, BOOST_DEDUCED_TYPENAME BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ initialize(first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
#endif
}
@@ -2593,9 +2593,9 @@
void initialize(capacity_type buffer_capacity, Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
- initialize(buffer_capacity, first, last, BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ initialize(buffer_capacity, first, last, iterator_category<Iterator>::type());
#else
- initialize(buffer_capacity, first, last, BOOST_DEDUCED_TYPENAME BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ initialize(buffer_capacity, first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
#endif
}
@@ -2687,9 +2687,9 @@
void assign(Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
- assign(first, last, BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ assign(first, last, iterator_category<Iterator>::type());
#else
- assign(first, last, BOOST_DEDUCED_TYPENAME BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ assign(first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
#endif
}
@@ -2724,9 +2724,9 @@
void assign(capacity_type new_capacity, Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
- assign(new_capacity, first, last, BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ assign(new_capacity, first, last, iterator_category<Iterator>::type());
#else
- assign(new_capacity, first, last, BOOST_DEDUCED_TYPENAME BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ assign(new_capacity, first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
#endif
}
@@ -2838,9 +2838,9 @@
void insert(const iterator& pos, Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
- insert(pos, first, last, BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ insert(pos, first, last, iterator_category<Iterator>::type());
#else
- insert(pos, first, last, BOOST_DEDUCED_TYPENAME BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ insert(pos, first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
#endif
}
@@ -2929,9 +2929,9 @@
void rinsert(const iterator& pos, Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
- rinsert(pos, first, last, BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ rinsert(pos, first, last, iterator_category<Iterator>::type());
#else
- rinsert(pos, first, last, BOOST_DEDUCED_TYPENAME BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ rinsert(pos, first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
#endif
}
Modified: trunk/boost/circular_buffer/space_optimized.hpp
==============================================================================
--- trunk/boost/circular_buffer/space_optimized.hpp Mon Sep 30 11:54:03 2013 (r86055)
+++ trunk/boost/circular_buffer/space_optimized.hpp 2013-09-30 11:54:32 EDT (Mon, 30 Sep 2013) (r86056)
@@ -435,7 +435,7 @@
first, last)
, m_capacity_ctrl(capacity_ctrl) {
reduce_capacity(
- is_same< BOOST_DEDUCED_TYPENAME BOOST_ITERATOR_CATEGORY<InputIterator>::type, std::input_iterator_tag >());
+ is_same< BOOST_DEDUCED_TYPENAME iterator_category<InputIterator>::type, std::input_iterator_tag >());
}
/*! \endcond */
@@ -534,7 +534,7 @@
first, last, alloc)
, m_capacity_ctrl(capacity_ctrl) {
reduce_capacity(
- is_same< BOOST_DEDUCED_TYPENAME BOOST_ITERATOR_CATEGORY<InputIterator>::type, std::input_iterator_tag >());
+ is_same< BOOST_DEDUCED_TYPENAME iterator_category<InputIterator>::type, std::input_iterator_tag >());
}
#endif // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
@@ -1632,10 +1632,10 @@
const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
- return init_capacity(capacity_ctrl, first, last, BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ return init_capacity(capacity_ctrl, first, last, iterator_category<Iterator>::type());
#else
return init_capacity(
- capacity_ctrl, first, last, BOOST_DEDUCED_TYPENAME BOOST_ITERATOR_CATEGORY<Iterator>::type());
+ capacity_ctrl, first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
#endif
}
Modified: trunk/boost/iterator/iterator_traits.hpp
==============================================================================
--- trunk/boost/iterator/iterator_traits.hpp Mon Sep 30 11:54:03 2013 (r86055)
+++ trunk/boost/iterator/iterator_traits.hpp 2013-09-30 11:54:32 EDT (Mon, 30 Sep 2013) (r86056)
@@ -10,6 +10,7 @@
namespace boost {
+// Obsolete. Remove.
#define BOOST_ITERATOR_CATEGORY iterator_category
@@ -39,7 +40,7 @@
};
template <class Iterator>
-struct BOOST_ITERATOR_CATEGORY
+struct iterator_category
{
typedef typename boost::detail::iterator_traits<Iterator>::iterator_category type;
};
@@ -70,7 +71,7 @@
};
template <>
-struct BOOST_ITERATOR_CATEGORY<int>
+struct iterator_category<int>
{
typedef void type;
};
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk