From: Glyn M. <gly...@gm...> - 2008-10-13 12:43:19
|
Hi Dean, 2008/10/13 Dean Michael Berris <mik...@gm...> > On Mon, Oct 13, 2008 at 8:05 PM, Kim Gräsman <kim...@gm...> > wrote: > > > > I wonder if what Glyn is looking for is something like: > > > > template <> char_based_traits<network::tags::default_> { > > typedef std::string string_type; > > typedef std::ostringstream ostringstream_type; > > typedef char char_type; > > }; > > > > so that related traits are defined together, and orthogonal traits > > separately. Just guessing, though. But it doesn't make intuitive sense > > to me to specialize them separated from each other, when they're all > > based on the definition of char. > > > > This is the same problem the standard iterator traits introduce -- a > blob -- which is bad design, and very unwieldy. > I understand the problem with blobs, but my question related to standards remains: would it be more advantageous to use this more flexible design than to wander too far from the standard mechanism? Especially considering that string, char_ and ostringstream are tightly coupled. G |