From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2006-07-18 09:38:02
Martin Bonner said: (by the date of Tue, 18 Jul 2006 14:33:36 +0100)
> I'd say it causes undefined behaviour, and an assertion failure, a
> segmentation fault, and silently returning the wrong value are all
> acceptable (although the first two are preferred).
> > - remove assert(valid_) check from tokenizer, so it follows more
> > precisely the standard, and causes segmantation fault on failure.
> I don't see how a segmentation fault follows the standard any more than
> an assertion failure.
well.. you are right :) sorry
> > - do opposite, and accept the fact that tokenizer is not a typical
> > container, and replace assert(valid_) with throw.
so how about changing rationale for tokenizer::iterator ? It makes
sense, because iterating over items requires parsing.
-- Janek Kozicki |