[gnu.g++.bug] class X only has private destructor and no friends.

keith@csli.Stanford.EDU (Keith Nishihara) (01/11/90)

Version: g++ 1.36.2, Dec 8, 1989.
System: Decstation 3100

The following code generates an error message: the text is the message
is both clear, and correct.  However, the code is what I wanted and intended,
and I see no valid reason for dissallowing it.

This is a tokn to be placed on an event queue;  it is created using
operator new, and enqueued.  When either its public Execute method or
public Reset method is called, it either executes or resets the entity
for which it stands, and then delets itself.  Since deletion is only
to be permitted after an execution or reset, the destructor method is
made private.

No error or warning is generated by cfront1.2.

class EventToken
{
public:
    EventToken(EventQueue *q, Instance *inst, Priority p, Time t);

    void                Execute();
    void                Reset();

private:
    ~EventToken();
    ...

};

Error: class `EventToken' only defines a private destructor and has no friends.

Neil/.		Neil%teleos.com@ai.sri.com