C++26 is done (again)! — Trip report: November 2026 ISO C++ standards meeting (Búzios, Brazil)

12 points by olliej


jjdh

As a non-C++ person, I am so confused about why

pre<std::contracts::controls::enforced>(x > 0)

And not just

pre(x > 0)

What is the use case for wanting a default mode where the contract isn’t guaranteed to be enforced?

It seems lots of very, very smart people have been thinking a lot about this, so there must be some reason or chain of reasons that lands the proposal in this “the default mode may or may not be enforced and there’s a sort of generics syntax where you can opt in to enforced contracts”, but as an outsider it seems super confusing