memesearch
C++ Exception Label Escape

C++ Exception Label Escape

Download Find similar pictures
Text on the meme
#include <stdio.h> struct label { static void* e; label() try : v(({ fprintf(stderr, "oh\n"); e = &&awesome; throw; 42; })) { fprintf(stderr, "no\n"); awesome: fprintf(stderr, "you\n"); } catch(...) { fprintf(stderr, "don't\n"); goto *e; } int v; }; void* label::e; int main() { label l; }
What it means

A screenshot of unusual C/C++ code defining a label-like struct with a constructor, exception handling, a computed goto, and the label “awesome.” The joke is that the program prints “oh,” then jumps to “awesome” and prints “you,” while the fallback path prints “no” and “don't,” creating a goofy “oh you awesome / no you don't” exchange. It is used as a reaction by programmers to express awkward admiration or a playful denial. EN: A screenshot of unusual C/C++ code defining a label-like struct with a constructor, exception handling, a computed goto, and the label “awesome.” The joke is that the program prints “oh,” then jumps to “awesome” and prints “you,” while the fallback path prints “no” and “don't,” creating a goofy “oh you awesome / no you don't” exchange. It is used as a reaction by programmers to express awkward admiration or a playful denial.

Objects
Tags
Source
Type
image
Size
507×800 · 50.8 KiB
Mood
absurd, nerdy
Language
en
Added