Hacker News new | past | comments | ask | show | jobs | submit login

"C++ and D both try to be binary-compatible with C, they MUST return a structure by copying it."

Only for code that has C linkage. For normal C++ or D code the calling convention can be whatever the compiler wants, it's not restricted by the C calling convention.

(C linkage is specified in C++ with 'extern "C"', and with 'extern (C)' in D.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: