
On Thu, 21 Aug 2008 00:05:08 +0200, Jeremy Pack <rostovpack@gmail.com> wrote:
[...]I've just added size() and empty() functions to type_map.
Thank you!
You can also pass some sort of status message through the type_map to the shared library if you'd like (using a string or some custom type).
I'm curious though, what type of problem were you having that led to this request?
I was rearranging some code when I started to use Andrey's logging library. With empty() I can implement a function loading a shared library and calling types like this: bool init(const std::string &name) { shared_library lib(name); if (!lib.open()) BOOST_LOG(mylogger) << "error ..."; else if (!lib.call(types)) BOOST_LOG(mylogger) << "error ..."; else BOOST_LOG(mylogger) << "no error ..."; return lib.is_open() && !types.empty(); } As you see it was not a very important request. :) Boris