Question about Calling Convention when Registering Functions on x64 Platform

Started by
1 comment, last by WitchLord 1 month ago

According to this document https://learn.microsoft.com/en-us/cpp/cpp/stdcall?view=msvc-170​,​ the stdcall and cdecl calling conventions are the same on x64. Is it safe to register both type of functions as asCALL_CDECL on x64?

I'm writing a template library for binding C++ interface to AngelScript. Since those calling conventions are actually the same on my target platform, meta-programming code such as template specialization or C++20's requires cannot distinguish between them, so I want to register all ordinary global functions using asCALL_CDECL.

None

Advertisement

Yes, on x64 it is safe to register both as asCALL_CDECL.

Regards,

Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement