Re: Re: Re: new round

Daniel Wallin <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
Alexander Nasonov wrote:
> Daniel Wallin wrote:
>>There might be a lot of more cases where it is highly desirable to know
>>the wrapped type at compile time. There is, IMO, no gain in separating
>>the def() call from class_.
> 
> I give up. However, I believe there is a way to convert to non-wrapped base
> using try-throw-catch:
> 
> <snip>
> could be implemented using throw_<B> and catch_and_convert<A>. Object on the
> left to [] holds a pointer to throw<B>, object inside [] has a collection
> of def each holding a pointer to catch_and_convert<XXX> (only one def with
> XXX=A in this case). You might loop through defs with unwrapped XXX and
> call catch_and_convert<XXX> until you found a conversion.

Yeah, I agree that this is possible. But still, it's probably quite a
loss in efficiency for no good reason. Also it doesn't solve the
constructor<> case.

-- 
Daniel Wallin


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.