Boost logo

Boost :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2004-12-06 05:35:35


Vladimir Prus wrote:

>Roland Schwarz wrote:
>
>
>>... (It will
>>give a 0 -pointer
>>at runtime.)
>>
>>
>
>Yes, that's what I though. In other words, your implementation is
>dynamically checked. (This is consistent with the name 'dynamic_new', BTW).
>
>
>
Yes this is by intent. This way it is possible to prepare for ctors that
are not even available
at compile time. A user might later decide to (dynamically) hook in a
respective class.

>>Please note that my implementation is not very smart and could be
>>improved by someone
>>more knowledgeable than me. Perhaps it is not so hard to add support for
>>automatic
>>type conversion too?
>>
>>
>
>The problem is that need either:
>1. A statically available list of overloaded functions, so that compiler can
>do the overload resolution.
>2. Boost.Overload library which can do it using typeid or some other
>metedata. Such library does not exist, though :-(
>
>
>
Are you sure? Won't the upcoming typeof() library be of help here?

>Well, I mean that unlike your solution, you can query for specific
>constructor signature. Using plugins as example, even if specific plugin
>class has additional constructors, it's not possible to call them via
>generic interface.
>
>
I am not sure if I can follow you there.
1) I think querying for specific constructor signature is exactly what I
am doing.
2) Calling additional constructors that are not in the base class also
is what I am doing.

Or do you mean you want to explore an arbitrary class for it's available
set of ctors
at runtime before calling into them? I cannot see then what is the value
of this?
 This surely would be of interest when trying to bind the classes to a
scripting language.
But this is not in the scope of my proposal.

[...]

Having glanced over your description I think there is some similarity
(at least at the creation part).
I would be very much interested in your boost::plugin lib!
Unfortunately I was not able to find it in the boost or boost-sandbox so
far.
Can I download it somewhere to experiment with it?

Roland


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk