Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2003-10-05 13:38:54


On Sun, 5 Oct 2003 12:46:40 -0400, Edward Diener wrote
> Jeff Garland wrote:
> > struct bad_year : public std::out_of_range
> > {
> > bad_year() :
> > std::out_of_range(std::string("Year is out of valid range:
> > 1400..10000")) {}
> > };
>
> Unfortunately you are hardcoding the range in your exception rather than
> getting it from your policy class's template parameters somehow.

True. I could have used the min() and max() methods, but then would have
needed to convert numbers to strings. Just didn't seem worth the trouble
given the proximity of the 2 lines of code that define the range...
 
> Sounds good, I will look at your code for your policy. Thanks !

Sure :-)

Jeff


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