You mean so? ref Variant get() { return this._num; // with Variant _num; }
alias get this; and then: int i = zahl.get!int?No. Then I use my solution as you can see on DPaste. If Variant works only this way I can also set float to the return type an cast if I need to int. And with my solution I have in calculation a numeric value and doesn't have to cast with Variant's get method.