From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-09-11 15:46:08
"George M. Garner Jr." <gmgarner_at_[hidden]> wrote in message
> > Could you be more specific? There are many places in the source where I
> > use
> > static asserts to make sure character types match. <
> I am referring to the six samples provided with the source, only five of
> which derive a class from input_filter or output filter.
In these examples, static asserts wouldn't help. Generally they are useful to
make sure that the character types of two template parameters are compatible.
> Perhaps the better
> approach would be, in the samples, to derive from
> filter<input, char> or filter<output, char> instead of input_filter or
> output_filter. You could note in a comment that input_filter,
> input_wfilter, output_filter and output_wfilter are short hand for
> filter<input, char>, filter<input, __wchar_t>, filter<output, char> and
> filter<output, __wchar_t>, respectively. One good sample is worth many
> pages of documentation.
I agree whole-heartedly with the last statement. The reason I used input_filter
or output_filter as the base class for all the examples is because I thought it
would be the typical use case. Now I think making about half of them
wide-character would be a good idea.
Rather than using filter<input, char>, e.g., in the examples, I'd rather add a
link to the docs for filter, where I am now planning to add some examples.
> P.S. Sorry about the subject line but at this point I have no idea of what
> it should be.
I think my mail client is to blame.