home.social

#cpluplus — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #cpluplus, aggregated by home.social.

fetched live
  1. So apparently when called on the wrong variant, [expected::value](en.cppreference.com/w/cpp/util) throws but [expected::error](en.cppreference.com/w/cpp/util) is UB???

    I'm flabbergasted at C++'s ever renewed ability to defy the principle of least astonishment.

    #cpluplus #cpp

  2. I don't know if it's peak lazy or peak "engineering" but I just read someone argue for "sizeof expression" and against "sizeof(type)" because the former is two characters shorter. 🤦‍♂️

    [for brevity, omitting other aspects of the argument]

    No, they weren't discussing writing the smallest program or anything like that.

    #c #cpp #cpluplus #programming