Passing pointer to extern(C++) templated function

Jamie email at
Wed Oct 14 00:25:56 UTC 2020

On Tuesday, 13 October 2020 at 23:47:24 UTC, kinke wrote:
> On Tuesday, 13 October 2020 at 09:23:48 UTC, Jamie wrote:
>> It appears that func3 and func4 take on different types 
>> depending on other variables being present? Is this expected?
> Nope, it's a bug in the Itanium C++ mangler, please file a bug. 
> MSVC++ mangling seems fine, after fixing the D declarations to
> void func3(T)(T* b, const(T)* a);
> void func4(T)(const(T)* a, T* b);
> [A D `const T*` is equivalent to C++ `const T* const`; this 
> matters for MSVC mangling...].

Happy to file a bug, but if it was a bug in the mangler wouldn't 
both C++ and D get the same result? Assuming D uses the same 
mangler for the extern(C++) stuff.

More information about the Digitalmars-d-learn mailing list