Compilers
C / C ++ by default uses the C-calling convention (first pressing the very first parameter on the stack), which allows you to work with functions with a variable number of arguments like printf.
The Pascal calling convention (aka "fastcall") pushes the leftmost parameter first. This is faster, although it costs you the possibilities of simple variable arguments (I read somewhere they are still possible, although you need to use some tricks).
Due to the speed gained from using the Pascal convention, both Win32 and MacOS APIs use this calling convention by default, except in some cases.
If this function has only one parameter, theoretically using any of the calling conventions would be legal, although the compiler can apply the same calling convention to avoid any problems.
Boost libraries were designed with mobility in mind, so they should be agnostic about which caller agreement a particular compiler uses.
Joe pineda
source share