Logo
Only three hard problems: cache, naming, and off-by-one errors.
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Azure Azure
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • All Categories
As an Amazon Associate ProgrammerHumor.io earns from qualifying purchases.

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

Const_cast Memes

Posts tagged with Const_cast

Really Gotta Make Sure It Doesn't Change

C++ Programming
12 days ago 37.3M views 0 shares
Really Gotta Make Sure It Doesn't Change
When you're so paranoid about immutability that you've basically declared war on any data that dares to think about changing. This is what happens when you read one too many articles about const correctness in C++ and decide to take it as a personal challenge. We've got const pointers to const structs containing const expressions that return const pointers to const constants, all wrapped up with a const_cast for good measure. It's like wearing a belt, suspenders, safety pins, and duct tape all at once—just to keep your pants up. The irony? After all this const ceremony, they're using const_cast to potentially strip it all away anyway. That's the C++ equivalent of installing a bank vault door on your house and then leaving the key under the doormat.

Yesterday I Discovered The Mutable Keyword

C++ Programming
1 year ago 252.3K views 0 shares
Yesterday I Discovered The Mutable Keyword
15 years of C++ experience and just discovered mutable ? That's like being a plumber for decades and suddenly finding out toilets have a flush mechanism. The cat's face in the last panel is the universal expression of "I've been using const_cast this whole time for nothing." Nothing quite says "expert" like realizing fundamental language features have been hiding in plain sight since 1998.

Today's picks

Windows User And Linux User

Windows User And Linux User

Linux
121.2M views 19 days ago
When You Decided To Becomea Programmer

When You Decided To Becomea Programmer

Programming
91.5K views 1 year ago
This hurt my brain

This hurt my brain

Programming
92.3K views 2 years ago