Remove c
article thumbnail

cppfront: Midsummer update

Sutter's Mill

Safety and simplicity are the two core things I want to try to dramatically improve in C++, and are why I’m doing my cppfront experiment, so although the above absorbed some time away from cppfront coding it all contributes to the same goal. (If Jul 10, 2024), new things include: Added. Jul 10, 2024), new things include: Added.

C++ 116
article thumbnail

cppfront: Spring update

Sutter's Mill

Simple, mathematically safe, and efficient chained comparisons ( commit ) P0515 “Consistent comparison” (aka “spaceship”) was the first feature derived from this Cpp2 work to be adopted into the ISO Standard for C++, in C++20. Thank you again to everyone who helped land this Cpp2 feature in the ISO C++ Standard.

C++ 97
article thumbnail

GotW #102 Solution: Assertions and “UB” (Difficulty: 7/10)

Sutter's Mill

Briefly, what is the difference among: (a) undefined behavior Undefined behavior is what happens when your program tries to do something whose meaning is not defined at all in the C++ standard language or library (illegal code and/or data). You’ll get some valid result, but you won’t know what the result is until your code looks at it.

C++ 73