Catching C++ Exceptions in D
Jakob Ovrum via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jan 5 11:14:01 PST 2016
On Tuesday, 5 January 2016 at 18:22:56 UTC, Jakob Ovrum wrote:
> On Tuesday, 5 January 2016 at 17:23:38 UTC, Walter Bright wrote:
>> D code can only catch C++ exceptions declared as:
>>
>> extern (C++) class Identifier { ... }
>>
>> Best practice in C++ is catching by const&, and D's classes
>> fit right in with that.
>
> Well, except for the const part. D exceptions are completely
> broken when it comes to const and immutable. It seems to have
> been overlooked during the transition to D2.
Of course, C++ doesn't have immutable, so this isn't really an
issue in practice for C++ exceptions.
More information about the Digitalmars-d
mailing list