
On Fri, Feb 27, 2009 at 5:30 AM, Stewart, Robert <Robert.Stewart@sig.com> wrote:
On Thursday, February 26, 2009 4:44 PM Emil Dotchevski wrote:
You can do this by requiring uuid.hpp to include all kinds of headers and template goodness, learn your complex argument forwarding framework -or- you can design your framework in a way that allows it to bind simple function declarations or even member functions and expose them through the generic convert<> interface.
The framework uses IOStreams to do its work. I believe the conversion functionality for the uuid type is captured via:
namespace user { class uuid;
template <class Stream> Stream & operator <<(Stream &, uuid const &); }
If operator<< was a reasonable to-string alternative, we wouldn't be needing a library for it. It is relevant, of course, and the framework should be able to automatically bind suitable operator<< overloads if they exist. It should also provide a generic operator<< overload that calls convert, so all types that integrate in the convert framework are automatically compatible with streams. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode