Re: set of pointers
On Feb 26, 10:31am, REH <spamj...@stny.rr.com> wrote:
> Is it well defined to use a std::set of pointers? I ask because of
> the restrictions on using relational operators with pointers. Does a
> set of pointers suffer from the same restrictions, or does the
> standard require it to be supported. I can't find any information one
> way or the other in the standard or from other sources.
>
> Thanks,
> REH
Since pointers implement operator< as required by std::set, then it is
possible to use pointers.
Note that what is being compared is the actual address being stored in
the pointer, and not what it points to.
Lance
|