Hmm - about manifest/enum

Bruce Adams tortoise_74 at yeah.who.co.uk
Wed Jan 2 13:37:59 PST 2008


On Wed, 02 Jan 2008 17:53:28 -0000, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:

> If you do:
>
> setValueTo5(T)(T x)
> {
>    x.value = 5;
> }
>
> If T is a class, then it affects data outside the function.  If T is a
> struct, it does not.  We have to know if T is a class or not.
>
Unless the struct contains a pointer or class reference :)

You seem to be talking about purity rather than constness here.



More information about the Digitalmars-d mailing list