memesearch
East const vs const West

East const vs const West

Download Find similar pictures
Text on the meme
two styles — both correct East const one consistent rule: What's left of const is constant. const West (still) more widespread, but less consistent int i = 1; int & r = i; int * p = &i; int const c = 1; int const& cr = i; // pointer to const int int const* pc = &i; // const pointer to int int *const cp = &i; // const pointer to const int int const*const cpc = &i; const int c = 1; const int& cr = i; // pointer to const int const int* pc = &i; int *const cp = &i; // const pointer to const int const int *const cpc = &i;
What it means

The meme compares two valid C++ styles for placing the const qualifier: East const puts const after the type, while const West puts it before the type. Both styles compile and mean the same thing, but the joke says the East style follows a more consistent rule, whereas the West style is more widespread but less consistent. It is used as a humorous reaction in programming discussions about C++ formatting and coding conventions.

Objects
Tags
Sources
Type
image
Size
632×800 · 63.5 KiB
Mood
sarcastic, nerdy
Language
en
Added