Remove uses of deprecated header boost/detail/iterator.hpp.

This header was deprecated in favor of <iterator>. It generates compiler
warnings and will be removed in a future release.
This commit is contained in:
Andrey Semashev
2020-05-11 19:13:20 +03:00
parent 994ff83292
commit 3b04f1a65e
2 changed files with 16 additions and 14 deletions

View File

@ -12,6 +12,8 @@
#include <cstddef> #include <cstddef>
#include <string> #include <string>
#include <utility>
#include <iterator>
#include <boost/type_traits/is_array.hpp> #include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/is_pointer.hpp> #include <boost/type_traits/is_pointer.hpp>
#include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_const.hpp>
@ -22,7 +24,6 @@
#include <boost/mpl/identity.hpp> #include <boost/mpl/identity.hpp>
#include <boost/mpl/vector.hpp> #include <boost/mpl/vector.hpp>
#include <boost/mpl/fold.hpp> #include <boost/mpl/fold.hpp>
#include <boost/detail/iterator.hpp>
// Container traits implementation --------------------------------------------------------- // Container traits implementation ---------------------------------------------------------
@ -120,11 +121,11 @@ namespace boost {
{ {
typedef typename PairT::first_type element_type; typedef typename PairT::first_type element_type;
typedef typename ::boost::detail:: typedef typename
iterator_traits<element_type>::value_type value_type; std::iterator_traits<element_type>::value_type value_type;
typedef std::size_t size_type; typedef std::size_t size_type;
typedef typename ::boost::detail:: typedef typename
iterator_traits<element_type>::difference_type difference_type; std::iterator_traits<element_type>::difference_type difference_type;
typedef element_type iterator; typedef element_type iterator;
typedef element_type const_iterator; typedef element_type const_iterator;

View File

@ -28,6 +28,7 @@
#include <boost/config.hpp> #include <boost/config.hpp>
#include <vector> #include <vector>
#include <fstream> #include <fstream>
#include <iterator>
#include <algorithm> #include <algorithm>
namespace namespace
@ -146,7 +147,7 @@ void check_char()
char* char_s2 = a_string.mutable_sz(); char* char_s2 = a_string.mutable_sz();
BOOST_STATIC_ASSERT(( is_same< range_value<char_iterator_t>::type, BOOST_STATIC_ASSERT(( is_same< range_value<char_iterator_t>::type,
detail::iterator_traits<char_iterator_t>::value_type>::value )); std::iterator_traits<char_iterator_t>::value_type>::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<char_iterator_t>::type, char_iterator_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator<char_iterator_t>::type, char_iterator_t >::value ));
BOOST_STATIC_ASSERT(( is_same< range_difference<char_iterator_t>::type, BOOST_STATIC_ASSERT(( is_same< range_difference<char_iterator_t>::type,
@ -225,11 +226,11 @@ void check_string()
wchar_t* char_ws2 = a_wide_string.mutable_sz(); wchar_t* char_ws2 = a_wide_string.mutable_sz();
BOOST_STATIC_ASSERT(( is_same< range_value<wchar_iterator_t>::type, BOOST_STATIC_ASSERT(( is_same< range_value<wchar_iterator_t>::type,
detail::iterator_traits<wchar_iterator_t>::value_type>::value )); std::iterator_traits<wchar_iterator_t>::value_type>::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<wchar_iterator_t>::type, wchar_iterator_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator<wchar_iterator_t>::type, wchar_iterator_t >::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<const wchar_t*>::type, const wchar_t* >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator<const wchar_t*>::type, const wchar_t* >::value ));
BOOST_STATIC_ASSERT(( is_same< range_difference<wchar_iterator_t>::type, BOOST_STATIC_ASSERT(( is_same< range_difference<wchar_iterator_t>::type,
detail::iterator_traits<wchar_iterator_t>::difference_type >::value )); std::iterator_traits<wchar_iterator_t>::difference_type >::value ));
BOOST_STATIC_ASSERT(( is_same< range_size<wchar_iterator_t>::type, std::size_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_size<wchar_iterator_t>::type, std::size_t >::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<wchar_iterator_t>::type, wchar_iterator_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator<wchar_iterator_t>::type, wchar_iterator_t >::value ));
BOOST_STATIC_ASSERT(( is_same< range_iterator<const wchar_t*>::type, const wchar_t* >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator<const wchar_t*>::type, const wchar_t* >::value ));