Re: inhibit compiler warning C4624 for a class hierarchy
- From: "Alex Blekhman" <xfkt@xxxxxxxxx>
- Date: Tue, 9 Jan 2007 23:12:14 +0200
"Ben Voigt" wrote:
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.
You can make destructor protected, so it will be availabale for derived classes while unavailable for outside users of a class.
Alex
.
- Follow-Ups:
- Re: inhibit compiler warning C4624 for a class hierarchy
- From: Heinz Ozwirk
- Re: inhibit compiler warning C4624 for a class hierarchy
- References:
- inhibit compiler warning C4624 for a class hierarchy
- From: Ben Voigt
- inhibit compiler warning C4624 for a class hierarchy
- Prev by Date: inhibit compiler warning C4624 for a class hierarchy
- Next by Date: Re: inhibit compiler warning C4624 for a class hierarchy
- Previous by thread: inhibit compiler warning C4624 for a class hierarchy
- Next by thread: Re: inhibit compiler warning C4624 for a class hierarchy
- Index(es):
Relevant Pages
|