2 #include <boost/iterator/iterator_adaptor.hpp>
7 template <
typename RetType>
10 template <
typename InType>
12 return static_cast<RetType&
>(t);
19 std::shared_ptr<const T>&
convert(std::shared_ptr<T>& t)
const {
26 mutable std::shared_ptr<const T>
val_;
32 const std::shared_ptr<const T>&
convert(
const std::shared_ptr<T>& t)
const {
38 mutable std::shared_ptr<const T>
val_;
41 template <
typename RetType>
44 template <
typename PairType>
46 return c_.convert(
p.second);
53 template <
typename Iterator,
typename RetType,
typename Converter = Converter<RetType>>
55 :
public boost::iterator_adaptor<TransformIterator<Iterator, RetType, Converter>, Iterator, RetType> {
56 using Base = boost::iterator_adaptor<TransformIterator<Iterator, RetType, Converter>, Iterator, RetType>;
63 operator Iterator()
const {
return this->base(); }