C++ 

A function call is an lvalue if it returns an lvalue reference meaning the following fucked up and evil code compiles:

int& get_seven() {
int seven = 7;
return seven;
}

int main() {
get_seven() = 8;
}

re: C++ 

@alyssa @aescling it runs without complaints over here lmao

Follow

re: C++ 

@wallhackio @aescling executing without obvious problems is a perfectly acceptable way to handle undefined behavior.

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.