Boost logo

Boost :

From: Hartmut Kaiser (hartmutkaiser_at_[hidden])
Date: 2002-10-22 11:11:15

> Well, I should be punished for not going through the code to
> see that..
> I'm now at work so I don't have the code here now, but your solution
> still doesn't is what I expected.
> On a grammar you would have to code like this,
> nonctl_char = range_p( (unsigned char)'\x21', (unsigned
> char)'\xFF' );
> And I think this is a little ugly (and a temp var isn't
> beautifaul, either).
> So I maintain that it is more natural to just say:
> nonctl_char = range_p( '\x21', '\xFF' );
> This would imply that the internal test on range_p() would first
> transform the arguments to unsigned char.

What about using the following:

inline range<unsigned char>
urange_p(unsigned char first, unsigned char last)
{ return range<unsigned char>(first, last); }

After what your code looks like:

    nonctl_char = urange_p( '\x21', '\xFF' );

Regards Hartmut

Boost list run by bdawes at, gregod at, cpdaniel at, john at