Moved shared_container_iterator.hpp in iterator directory, modernized code.

shared_container_iterator now uses std::shared_ptr to store the reference
to the container. boost::shared_ptr is still supported and is wrapped
into std::shared_ptr on construction, so there is overhead due to allocation
of std::shared_ptr state. Going forward, std::shared_ptr is expected
to be the primary use case. As a bonus, this eliminates the dependency
on Boost.SmartPtr.

Moved shared_container_iterator.hpp into the iterator directory and left
a forwarding header for backward compatibility.
This commit is contained in:
Andrey Semashev
2025-02-07 13:36:40 +03:00
parent e446c6e05c
commit a7150173ed
9 changed files with 230 additions and 123 deletions
+1 -1
View File
@@ -7,7 +7,6 @@
#include <boost/indirect_reference.hpp>
#include <boost/next_prior.hpp>
#include <boost/pointee.hpp>
#include <boost/shared_container_iterator.hpp>
#include <boost/iterator/advance.hpp>
#include <boost/iterator/counting_iterator.hpp>
#include <boost/iterator/distance.hpp>
@@ -31,6 +30,7 @@
#include <boost/iterator/new_iterator_tests.hpp>
#include <boost/iterator/permutation_iterator.hpp>
#include <boost/iterator/reverse_iterator.hpp>
#include <boost/iterator/shared_container_iterator.hpp>
#include <boost/iterator/transform_iterator.hpp>
#include <boost/iterator/zip_iterator.hpp>