Skip to content

GlobalPointer pointer arthimetic #5012

@tanjerrine

Description

@tanjerrine

When I try to add an integer to a GlobalPointer!T type for pointer arithmetic, the resulting type becomes T*. The desired fix would be for the type to become GlobalPointer!T again after addition.

Currently, the code may look something like

struct Pointer(AddrSpace as, T)
{
    T* ptr;
    alias ptr this;
}

Will need to add some operator overloads for opBinary!"+".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions