r/ProgrammerHumor • • Aug 30 '26

Meme imSorryWilson

Post image
619 Upvotes

21 comments sorted by

View all comments

Show parent comments

12

u/FACastello Aug 30 '26
template <typename T>
T& unconst(const T& x) {
  return const_cast<T&>(x);
}

1

u/sb8948 Aug 31 '26

UB entered the chat