Alt text:

Image that says:

HOLY SHIT!! IS THAT A MOTHERF*CKING C++ REFERENCE???

int& a = b;

  • TheEntity@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    2 months ago

    An int& reference is just as much of a variable as int* const would be (a const pointer to a non-const int). “Variable” might be a misnomer here, but it takes just as much memory as any other pointer.