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

@ -67,11 +67,7 @@ ostream& operator << (ostream& os, const std::wstring& s)
template <class S>
class string_out_iterator
#ifndef BOOST_NO_STD_ITERATOR
: public std::iterator<std::output_iterator_tag, void, void, void, void>
#endif // ndef BOOST_NO_STD_ITERATOR
{
#ifdef BOOST_NO_STD_ITERATOR
public:
typedef std::output_iterator_tag iterator_category;
typedef void value_type;
@ -79,8 +75,6 @@ public:
typedef void pointer;
typedef void reference;
private:
#endif // BOOST_NO_STD_ITERATOR
S* out;
public:
string_out_iterator(S& s) : out(&s) {}