Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2004-07-26 04:03:05

David Abrahams wrote:

> Vladimir Prus <ghost_at_[hidden]> writes:
>> boost::dll plugin("foo");
>> plugin["bar"].as<void (void)>();
>>or something trickier, like:
>> - calling C++ functions:
>><void (void)>("bar") -- no need for "extern "C"

I love this! It would really be great!

How about something like
plugin.func<void(void)>("some_func") returning a callable functor - some
wrapper over boost::function, which
- will work as long as the plugin is in memory
- will throw otherwise
- eventually have a method for knowing if you can still call this function

I'd certainly have uses for this.


John Torjo
-- john_at_[hidden]
Contributing editor, C/C++ Users Journal
-- "Win32 GUI Generics" -- generics & GUI do mix, after all
Professional Logging Solution for FREE
-- (logging           - C++)
--         (viewing/filtering - Win32)
--        (debugging         - Win32)
                                          (source code available)

Boost list run by bdawes at, gregod at, cpdaniel at, john at