Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-10-22 16:24:42


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
Subject: Re: [boost] Re: Formal Review: The Spirit Parser Framework.

> From: "Hartmut Kaiser" <hartmutkaiser_at_[hidden]>
> >
> > [...]
> > > 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' );
>
> The question is, would you ever want ['\x21', '\xFF'] to _not_ be a valid
> range?

Not as long as ('\x21' < '\xFF') == false, IMO.

--Joel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk