Thread View: comp.std.c++
3 messages
3 total messages
Started by Christian Millour
Thu, 16 Nov 1995 16:07
can 0 be used as sentinel value for pointers to members ?
Author: Christian Millour
Date: Thu, 16 Nov 1995 16:07
Date: Thu, 16 Nov 1995 16:07
12 lines
970 bytes
970 bytes
Hi all. Can 0 be used as sentinel/null value for pointer-to-member data or functions, the way it is used for ordinary pointers ? TIA, --chris@etca.fr [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Re: can 0 be used as sentinel value for pointe
Author: Steve Clamage
Date: Fri, 17 Nov 1995 01:05
Date: Fri, 17 Nov 1995 01:05
20 lines
1053 bytes
1053 bytes
In article lhe@etca.etca.fr, chris@etca.fr (Christian Millour) writes: > >Can 0 be used as sentinel/null value for pointer-to-member data >or functions, the way it is used for ordinary pointers ? Yes. A constant integral zero serves as a null pointer-to-member just as it serves as a null data pointer or function pointer. --- Steve Clamage, stephen.clamage@eng.sun.com --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Re: can 0 be used as sentinel value for pointers to members ?
Author: J. Kanze
Date: Sat, 18 Nov 1995 03:14
Date: Sat, 18 Nov 1995 03:14
17 lines
1372 bytes
1372 bytes
Christian Millour (chris@etca.fr) wrote:
|> Hi all.
|> Can 0 be used as sentinel/null value for pointer-to-member data
|> or functions, the way it is used for ordinary pointers ?
Yes. It is guaranteed that no valid pointer to member will ever compare
equal to 0.
--
James Kanze (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
Conseils, itudes et rialisations en logiciel orienti objet --
-- A la recherche d'une activiti dans une region francophone
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads