Boost logo

Boost :

Subject: Re: [boost] [Boost.DLL] Formal Review request
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2014-11-21 09:06:45


2014-11-20 18:54 GMT+04:00 Klaim - Joël Lamotte <mjklaim_at_[hidden]>:

> On Thu, Nov 20, 2014 at 3:29 PM, Antony Polukhin <antoshkka_at_[hidden]>
> wrote:
>
> > It means that BOOST_DLL_AUTO_ALIAS(my_namespace::cpp_function_name) must
> be
> > able somehow to cut off the namespaces leaving only the variable/function
> > name.
> >
>
> I was imagining that there would be a way to just replace "::"with _ (and
> not lose the namespace)
> to get:
>
>
> extern "C" void* my_namespace_cpp_function_alias_name =
> &my_namespace::cpp_function_name;
>
>
> I'm not experienced with macros so I'm not sure if it's doable. Maybe
> separating the differents name parts would work:
>
>
> BOOST_DLL_AUTO_ALIAS( namespaceA, namespaceB, function_name) // implemented
> with recursion for the namespaces?
>
>
> extern "C" void* namespaceA_namespaceB_function_name = &namespaceA::
> namespaceB::cpp_function_name;
>
> But it seems less "elegant".

I've committed BOOST_DLL_AUTO_ALIAS macro. It's not exactly what you
wanted, take a look and tell me what you think
http://apolukhin.github.io/Boost.DLL/boost_dll/introduction0.html

I've also added new refcounting import functions that automatically decide
to return shared_ptr<T> or function<T>, according to the type of T.

-- 
Best regards,
Antony Polukhin

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