From: K. G. <kim...@gm...> - 2008-10-13 12:26:57
|
HI Glyn, On Mon, Oct 13, 2008 at 11:47, Glyn Matthews <gly...@gm...> wrote: > >> Most of the specializations are useful on a global level, but at the >> same time it would be nice to keep the specializations close to the >> code that uses them, rather than listing unrelated but similar specs >> (string<message_tag>, string<uri_tag>) one after another. >> >> I don't have any good suggestions... Is there a way of reusing >> tag/traits definitions, so that one can create a 'base' definition >> with the string stuff, and then 'derive' and add more >> protocol-specific definitions? I'm just thinking out loud... > > I'm not sure what you mean here. Can you elaborate? Sure, I'll try. If we look at this specific example, where we've added basic_uri, it doesn't share tag with basic_message (default_tags vs. tags::default_). So with every template that needs a new tag, but shares traits with existing classes/templates (typically string, ostringstream, char_), we have to duplicate these definitions. That's why I was wondering if there's a mechanism to reuse the traits between different tags. Does that even make sense? :) - Kim |