🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gnu.g++.lib.bug
2 messages
2 total messages Started by lindek Sun, 23 Jul 1989 20:36
EntList
#116
Author: lindek
Date: Sun, 23 Jul 1989 20:36
16 lines
1021 bytes
Hi, there. I was trying to used genclass to generate a Ent list, where
Ent is defined by "typedef void* Ent;". However, EntList has the two
constructors EntList(Ent head) and EntList(Pix p). Since Pix is also defined
to be (void *), g++ complained the conflict between these two constructors.
Does anyone have any suggestions about what I should do? What's the use of
EntList(Pix p)?

Thanks in advance.

Dekang

-------------------------------------------------------------------------
Dekang Lin                                  PHONE:                   
                    	  		      OFFICE: 1-403-492-2821
  Department of Computing Science             HOME:   1-403-425-0219
EntList
#117
Author: Doug Lea
Date: Sat, 29 Jul 1989 11:25
13 lines
1094 bytes
This is a real problem. A Pix (pseudoindex) is used to index/traverse
containers in an array- or list-like fashion. See libg++.texinfo. For
efficiency reasons it is currently defined via a typedef (to void*)
instead of as a class. It is likely that someday, g++ will provide
enough optimization features that defining Pix as a class will incur no
such penalty (this will also make them a bit safer to use). Until then
I suppose the only workaround is for you to comment out the
EntList(Pix) constructor in your version, since you probably can live
without it (It is useful only in creating new Lists headed by some
traversal pointer Pix).

-Doug
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