Boost logo

Boost Users :

Subject: Re: [Boost-users] [review][constrained_value] Review of Constrained Value Library begins today
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-12-06 17:17:56


AMDG

Jesse Perla wrote:
> I don't know enough metaprogramming to know if this is possible, but
> the idea is to flip some kind of a compile time flag in the
> constructor of the type and if you try to change the bounds after
> that, it fails a compile time assertion.

It's possible to hack a compile-time boolean flag, but...
a) The bounds could be set in a different translation unit from the
one in which objects are constructed.
b) The order in which statements are compiled is not necessarily the
same as the order in which they are executed.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net