Search

March 24, 2023
General »
...alias is not itself a type! So in the case where `A` is an alias...
March 23, 2023
Learn »
...want types other than string as well.

>      alias toString this;

That should have been a...
March 23, 2023
Learn »
...T(value) + rhs;
            else
                static assert(0);
        }

        alias opBinary this;
    }

    void main()
    {

    auto a = MyVal...
March 23, 2023
Learn »
...implicit conversions. There is some support like 'alias this' as you mentioned but what you...
March 23, 2023
Learn »
...auto toString(T)()
    {
        return value.to!T;
    }

    alias toString this;
}

auto a = MyVal("100");
auto...
March 23, 2023
Learn »
...different, the struct with "alias this" is a redefinition of
the "alias this"'ed thing...
March 23, 2023
Learn »
...different, the struct with alias this a redefinition of the "alias this"'ed thing, that...
March 23, 2023
Learn »
...documentation](https://dlang.org/spec/struct.html#alias-this), but for "several" types, for example...
March 23, 2023
Learn »
...it would be possible to use an alias to this, but it can only be...
March 23, 2023
General »
...using the alias template in the parameter list:

```
struct B (T, V) { }

alias A (T...
122 123 124 125 126 127 128 129 130 131 132
Next ›   Last »