added wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING macro
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -88,6 +88,19 @@
|
||||
# pragma warn -inl /* Functions containing reserved words and certain constructs are not expanded inline */
|
||||
#endif /* __BORLANDC__ */
|
||||
|
||||
/*
|
||||
g++ gives a warning when a class has private dtor if it has no friends but
|
||||
this is a perfectly valid situation for a ref-counted class which destroys
|
||||
itself when its ref count drops to 0, so provide a macro to suppress this
|
||||
warning
|
||||
*/
|
||||
#ifdef __GNUG__
|
||||
# define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) \
|
||||
friend class wxDummyFriendFor ## name;
|
||||
#else /* !g++ */
|
||||
# define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name)
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
/* wxWidgets version and compatibility defines */
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user