Hi all,

I came across this example, and wondered what your thoughts on it are:


```
void main(string[] args)
{
    struct Foo(float f) {
        alias VAL = f;
        float getF() {
            return f;
        }
    }

    Foo!(float.nan) f;
    Foo!(float.nan) f2;

    // This will fail at compile time
    static assert(f.VAL == f2.VAL);

    // This will fail at run time
    assert(f.getF() == f2.getF());

    // But this is ok
    f = f2;
}
```

It seems a little unusual to me.

Robert

Reply via email to