
20 Jul
2004
20 Jul
'04
3:46 p.m.
David Abrahams wrote:
Vladimir Prus <ghost@cs.msu.su> writes:
boost::dll plugin("foo"); plugin["bar"].as<void (void)>();
or something trickier, like:
- calling C++ functions:
plugin.call<void (void)>("bar") -- no need for "extern "C"
- some auto-registraction mechanisms
plugin_registry<CodeGenerator> plugins; plugins.load("foo"); plugins.load("bar");
plugins["i386"].run(.......)
Those are some really cool DSEL ideas! I love it!
Thanks! The problem is that to implement the coolest of them: plugin.call<void (void)>("bar") I'd need a C++ mangler for all platforms, and after initial look at just gcc name mangling spec I feel a bit scared. The first syntax should work in all cases, though. - Volodya