C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Helper type

From: chibane nadir <organicoman_at_[hidden]>
Date: Thu, 24 Nov 2022 05:12:24 +0000 (UTC)
>Looking at an example of a real iterator: libstdc++'s std::vector<T>::iterator
>is a std::__gnu_cxx::normal_iterator<T *, std::vector<T>>:
>https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/include/bits/
>stl_iterator.h#L1043
Yep Thiago,An iterator is totally dumb, and the container type is just a tag, no useful use at all.

    Le jeudi 24 novembre 2022 à 06:58:54 UTC+4, Thiago Macieira via Std-Proposals <std-proposals_at_[hidden]> a écrit :
 
 On Wednesday, 23 November 2022 17:48:44 PST organicoman via Std-Proposals
wrote:
> Jason,The type "std::iterator<T>", is not dumb.

Yes, it is, though I don't think you meant std::iterator. That's not a useful
class at all. And it's deprecated.

Looking at an example of a real iterator: libstdc++'s std::vector<T>::iterator
is a std::__gnu_cxx::normal_iterator<T *, std::vector<T>>:
https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/include/bits/
stl_iterator.h#L1043

That class has exactly one member, which is the pointer.

Your request cannot be implemented.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Software Architect - Intel DCAI Cloud Engineering
-- 
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
  

Received on 2022-11-24 05:13:28