Moved generator_iterator.hpp in iterator directory and modernized.

generator_iterator now uses decltype approach to deduce value and reference
types instead of the legacy result_type typedef, which was required to be
defined by the generator function.

The default constructor of generator_iterator now value initializes its
data members to avoid using uninitialized data.
This commit is contained in:
Andrey Semashev
2025-02-07 01:12:32 +03:00
parent 6e6def930f
commit d35869cd25
5 changed files with 113 additions and 89 deletions

View File

@@ -6,7 +6,7 @@
// http://www.boost.org/LICENSE_1_0.txt
//
#include <boost/generator_iterator.hpp>
#include <boost/iterator/generator_iterator.hpp>
#include <boost/core/lightweight_test.hpp>
#include <algorithm>