Inheriting std::iterator is deprecated in c++17.

Therefore replace the inheritance by lifting std::iterator's members into the derived class. Fortunately, this is already done in Boost.Regex so that dropping the inheritance is a no-brainer.

Signed-off-by: Daniela Engert <dani@ngrt.de>
This commit is contained in:
Daniela Engert
2017-12-18 19:15:52 +01:00
parent c60ee3189d
commit cc5a4e85ae
8 changed files with 4 additions and 50 deletions

View File

@ -33,16 +33,16 @@ namespace unnecessary_fix{
//
template <class Seq>
class back_insert_iterator
#ifndef BOOST_NO_STD_ITERATOR
: public std::iterator<std::output_iterator_tag,void,void,void,void>
#endif
{
private:
Seq* container;
public:
typedef const typename Seq::value_type value_type;
typedef Seq container_type;
typedef std::output_iterator_tag iterator_category;
typedef void difference_type;
typedef void pointer;
typedef void reference;
typedef std::output_iterator_tag iterator_category;
explicit back_insert_iterator(Seq& x) : container(&x) {}
back_insert_iterator& operator=(const value_type& val)