On Saturday, 21 May 2016 at 08:24:19 UTC, Ali Çehreli wrote:
On 05/21/2016 01:07 AM, chmike wrote:
> Unfortunately it is not possible to write this
>
> import std.typecons;
> class Info{...}
> rebindable!Info x;

You have a capitalization typo. Rebindable is a type template, rebindable is a function template.

import std.typecons;
class Info{}

void main() {
    auto x = rebindable(new immutable(Info)());
    pragma(msg, typeof(x));

    auto y = Rebindable!(immutable(Info))(new Info());
    pragma(msg, typeof(y));
}

Ali

Thank you. I'll start a new thread with the subject "problems with Rebindable". See https://forum.dlang.org/post/bprfdptcvzzkfzxlh...@forum.dlang.org

Reply via email to