Skip to content

BigInt and Int128 are incompatible #10945

@Bolpat

Description

@Bolpat

There’s no good reason why you shouldn’t be able to initialize a BigInt with a Int128.

void main()
{
    import std.int128;
    import std.bigint;
    Int128 x;
    BigInt y = x; // error
    BigInt z = x.data.hi * (BigInt(1L) << 64) + x.data.lo;
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions