2014-10-07 3:51 GMT+04:00 Niall Douglas
<...> Prints:
18$$magic$$_fprinterILZN21$$magic$$_adl_barrier18export_me_functionE7v ariantIis5void_S2_S2_ES3_EE 18$$magic$$_vprinterILZN21$$magic$$_adl_barrier18export_me_variableEEE
Exported:
__ZN3foo11adl_barrier18export_me_functionE7variantIis5void_S2_S2_ES3_ __ZN3foo11adl_barrier18export_me_variableE
... which looks bang on. Simply replace the 8fprinter with 3foo and remove the $$magic$$_.
Still looks like something error-prone.
Actually, user could always get the list of mangled symbols using the
boost::dll::library_info class methods on a compiled binary. So instead of
using mangling voodoo macro and explicitly declaring exports in import
module, user can find all the export_me_* mangled names and import them
using any of the interfaces. Something close can be found in this example:
http://apolukhin.github.io/Boost.DLL/boost_dll/tutorial.html#boost_dll.tutor...
... some dream of a nicest solution:
Add attribute [[abi_name "new_abi_name"]], remove all the *_alias methods
and member function, remove _ALIAS macro. Now user is free to do following
things:
// in plugin:
namespace foo {
namespace adl_barrier {
[[abi_name "export_me_function_1"]]
BOOST_SYMBOL_EXPORT boost::variant