C++ bindings: const(T) dropped in return types of templates ?

Jan Jan at Krassnigg.de
Thu Dec 9 15:58:51 UTC 2021

On Thursday, 9 December 2021 at 07:58:46 UTC, frame wrote:
> On Thursday, 9 December 2021 at 07:41:32 UTC, frame wrote:
>> On Monday, 6 December 2021 at 20:31:47 UTC, Jan wrote:
>>> So am I missing something, or did the compiler somehow forget 
>>> about the const-ness?
>> Sounds like a bug to me, eg this one:
>> https://issues.dlang.org/show_bug.cgi?id=20685
> But this is no show stopper, you can always force the mangling 
> with the pragma directive.
> https://dlang.org/spec/pragma.html#mangle

Oh it's a known bug for over a year already :(

It is a bit of a show stopper for me, since the mangled name that 
I have isn't always correct (CastXML uses Clang and that seems to 
pick different calling conventions sometimes, than what MSVC 
would do, so the mangled names that I get are not guaranteed to 
be correct).

Well, I'll work around it for now, thanks for the answer.

More information about the Digitalmars-d-learn mailing list