Our template emission strategy is broken

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 11 23:55:44 PST 2015


On 12 Nov 2015 7:15 am, "Walter Bright via Digitalmars-d" <
digitalmars-d at puremagic.com> wrote:
>
> On 11/11/2015 4:16 PM, Iain Buclaw via Digitalmars-d wrote:
>>
>> The main problem for seamless support is having some way to generate the
C++
>> typeinfo in D to allow work across boundaries.
>
>
> I suspect that is unnecessary.
>
> The whole point of D's C++ interface is to interface with C++ code.
Defining C++ classes in D code that does not link to any C++ code that also
defines those classes won't be supported. I.e. we can reply on the C++ code
generating the necessary C++ typeinfo. The generated D code only has to
link to it, i.e. generate an extern reference to the name of the typeinfo.
>

It is a small concern to me that C++ catch handlers work by calling some
support library code, If I recall correctly both at the start and end of
the handler.  These calls may change the state of C++'s language specific
unwind library, such as adjust any reference counters, mark the thrown
object as having been caught.

Maybe less of a concern now than last year.  But I do wonder what effect it
will incur on a long running program.

--
Regards,
Iain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20151112/938817a5/attachment.html>


More information about the Digitalmars-d mailing list