On Sun, 2009-03-15 at 22:35 -0600, Alex Rousskov wrote:
> On 03/15/2009 08:31 PM, Robert Collins wrote:
> > I don't think that a pure virtual approach will work any
> > better because the same not-directly-listed result will occur.
> >
> The virtual method should be called directly or indirectly by some
> high-level user for the approach to work. Something like name() or
> description() may work well for this purpose because it can be called by
> the registry on behalf of the high-level user to "describe all
> registered things".
>
> Compared to self-registration code, the difference is that, in this
> case, the code in the object file is needed by the caller because it
> implements a virtual method. The method does not have to be declared
> pure, but it helps with forcing classes to define it and get linked.
> That is my understanding anyway. If there are no objections, I will
> implement and test it.
>
> $0.02,
Unless the registry has a concordance of subclasses, I would expect this
to fail too, because the static linker will not see any concrete types.
It may fail with 'cannot link', but it won't know *which* concrete type
to bring in [unless the registry has a static list - which is the whole
thing we're trying to avoid.]
--whole-archive makes sense to me (if the other scheme you try fails -
if it works, great).
I thought that name() and other methods on ACL already existed as pure
virtual though?
-Rob
This archive was generated by hypermail 2.2.0 : Mon Mar 16 2009 - 12:00:03 MDT