ldc-developers / ldc

The LLVM-based D Compiler.
http://wiki.dlang.org/LDC
Other
1.18k stars 255 forks source link

Please allow "oveloading" pragma mangle of extern C++ functions #2178

Open ParticlePeter opened 7 years ago

ParticlePeter commented 7 years ago

C++ Function: bool cppFunc( float[3] color );

D binding: extern(C++): pragma( mangle, cppFunc.mangleof ) bool cppFunc( ref float[3] color ); pragma( mangle, cppFunc.mangleof ) bool cppFunc( float* color );

This works with DMD but not with LDC: Error: Function type does not match previously declared function with the same mangled name: cppFunc.mangleof

According to this forum thread its merely a precaution and could be lifted.

kinke commented 7 years ago

Related: #1020