Boost logo

Boost :

Subject: Re: [boost] [Boost.DLL] Formal Review request
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2014-10-05 16:49:24


On October 5, 2014 2:10:24 PM EDT, arvid <arvid_at_[hidden]> wrote:
>On 2014-10-02 05:45, Antony Polukhin wrote:
>> 2014-10-02 16:18 GMT+04:00 Mathias Gaunard
>> <mathias.gaunard_at_[hidden]>:
>> [...]
>> - 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)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk