default cast in opCast

Adam D. Ruppe destructionator at gmail.com
Mon Dec 29 20:52:47 UTC 2025


On Monday, 29 December 2025 at 20:29:16 UTC, Basile B. wrote:
>     auto opCast(T)()
>     {
>         static if (is(T == uint))

try

auto opCast(T : uint)() {
     return member;
}

isntead of all that. then the opCast only ever matches uint.


More information about the Digitalmars-d mailing list