|
Boost Users : |
Subject: Re: [Boost-users] Obtaining base class type
From: Robert Dailey (rcdailey_at_[hidden])
Date: 2009-06-09 16:18:20
On Tue, Jun 9, 2009 at 2:05 PM, Frank Mori Hess <frank.hess_at_[hidden]> wrote:
>
> 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.
This actually won't work because technically wxWindow and wxFrame are both
base classes of MainWindow. The difference is the number of "hops" between
them. For example, wxWindow is further away from MainWindow in the
inheritance diagram than wxFrame, but I don't think there is any way to
measure this at compile time.
Looks like I may just have to suck it up.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net