https://issues.dlang.org/show_bug.cgi?id=15505
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #4 from [email protected] --- (In reply to Manu from comment #0) > Nobody uses *const in C++. Don't forget Microsoft; you've already reported a similar MS-specific issue a while back, with the C++ new operator or some other allocator IIRC. Well, here we go again: C++: short test27(int arg[6]); // or `int arg[]`, same thing Win64: ?test27@@YAFQEAH@Z [short test27(int * const)] Linux: _Z6test27Pi [test27(int *)] I don't think this C++ function can be declared directly and portably in D anyway. But due to this const-hack, it apparently works in higher dimensions: one can represent C++ `int p[][6]` as `int[6]* p` in D, and that does indeed work portably for both MSVC and Itanium. https://github.com/dlang/dmd/blob/7538ed0125531d3a49ea6d2e266f7bae6e83556f/src/dmd/cppmanglewin.d#L282-L283: > attention: D int[1][2]* arr mapped to C++ int arr[][2][1]; (because it's more > typical situation) > There is not way to map int C++ (*arr)[2][1] to D Still, I think that special case is not worth it and more confusing than useful. It's been there since 2014 or longer: https://github.com/dlang/dmd/pull/3160 --
