Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2003-04-17 01:31:49

On Thursday, April 17, 2003, at 02:14 AM, Thorsten Ottosen wrote:
> behind the scene some random number generator is used and it is called
> from
> const functions.
> we don't want to propagate non-constness, since the class is just a
> source
> of random directions ( anyway, such a propagation reminds me of Java's
> checked exceptions in the sence that it affects a whole lot of code
> that is
> not supposed to be affected ).

OK. Here in principle the direction() functions do change the internal
state. Howeverm in your application you do not care since you do not
need reproducability of the results for your application. Then you can
hide the fact that the internal state of the random number generator is
changed - which is exactly what mutable is for.

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