Boost logo

Boost :

From: Dan Nuffer (dnuffer_at_[hidden])
Date: 2002-10-22 14:45:04

Thomas Wenisch wrote:

> If this causes users headaches because of the signed-ness of char, why
> not simply reverse the bounds, since this almost certainly what was
> intended. Here, I think it would be better for the code to simply work,
> instead of issuing a runtime diagnostic of questionable usefulness.
> Thoughts?

I think the assert is there to help catch bugs. For instance if the
user had range_p('a', 'Z') instead of range_p('A', 'Z'), this would be
caught by the assertion (assuming ASCII chars). Now if spirit switched
around the 'a'-'Z' under the covers to 'Z'-'a', the user would have
quite a difficult time debugging their parser.

--Dan Nuffer

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