inhibit compiler warning C4624 for a class hierarchy
- From: "Ben Voigt" <rbv@xxxxxxxxxxxxx>
- Date: Tue, 9 Jan 2007 14:34:45 -0600
Error Message
'derived class' : destructor could not be generated because a base class
destructor is inaccessible
A destructor was not accessible in a base class and was therefore not
generated for a derived class. Any attempt to create an object of this type
on the stack will cause a compiler error.
For this particular hierarchy, that's completely acceptable and intended.
The objects should be allocated on the heap, used polymorphically, and
deleted using a base class function.
Can I mark the base class in any way such that this message isn't generated
for derived classes? Using #pragma warning (disable : 4624) in the header
file has the undesirable side effect of inhibiting the warning for unrelated
classes.
.
- Follow-Ups:
- Re: inhibit compiler warning C4624 for a class hierarchy
- From: Alex Blekhman
- Re: inhibit compiler warning C4624 for a class hierarchy
- Prev by Date: Re: log message
- Next by Date: Re: inhibit compiler warning C4624 for a class hierarchy
- Previous by thread: Re: log message
- Next by thread: Re: inhibit compiler warning C4624 for a class hierarchy
- Index(es):
Relevant Pages
|