Discussion: set of pointers
Afficher un message
Vieux 26/02/2008, 16h45   #3
Lance Diduck
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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
  Réponse avec citation
 
Page generated in 0,04427 seconds with 9 queries