On October 5, 2014 2:10:24 PM EDT, arvid
On 2014-10-02 05:45, Antony Polukhin wrote:
2014-10-02 16:18 GMT+04:00 Mathias Gaunard
: [...] - I did not find any rationale for the alias mechanism. Surely you can work with C++ symbols without needing to alias them with a C name?
Yes, you can. Though C++ name will be mangled and some `void boost::foo(std::sting)` will change to something like `N5boostN3foosE`. Importing function by `N5boostN3foosE` name does not looks user friendly, especially assuming the fact that different compilers have different mangling scheme.
The alias name - is a not mangled name for C++ symbol.
In my mind, the single most useful feature of a library like this would be to add type-safety to GetProcAddress(), essentially.
i.e. specify the the type and name, the library mangles it and loads it and returns the correct function pointer type.
There is definitely value in a portable interface over an inherently unsafe interface. Any name mangling functionality would be an additional benefit. ___ Rob (Sent from my portable computation engine)