
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 09 June 2009, Robert Dailey wrote:
Hmm now that I think about it, I don't think this is really possible at compile time. You have to consider issues like multiple bases (Through either a linear chain of inheritance, or multiple inheritance cases).
If there were only a way to simplify this. Specifying the base class in two places is obviously error-prone, and I am hoping there are other solutions to cleaning this up.
It sounds like is_base_of and BOOST_STATIC_ASSERT would be enough to catch the errors at least? That is, you could make your own macro that does the type checking before passing the arguments on to BEGIN_EVENT_TABLE.
On Tue, Jun 9, 2009 at 1:36 PM, Robert Dailey
mailto:rcdailey@gmail.com> wrote: Hey everyone, I'm using wxWidgets, and as you all may know they have a silly macro used to define an event table...
BEGIN_EVENT_TABLE( MainWindow, wxFrame ) EVT_CLOSE( MainWindow::OnClose ) END_EVENT_TABLE()
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkousm0ACgkQ5vihyNWuA4V4qQCg2FAMkeaXPLyPgUUWdDQFP7wr KVsAoII3kgShdySIk7yvA8QOgiI/XmQI =f+pv -----END PGP SIGNATURE-----