c++20 – Cloudywizzard

c++20

The Spaceship Operator: <=>

C++20 introduces the “Three-Way Comparison Operator” also known as the spaceship operator. A simple example the std::strong_ordering is only available for integral types, for floating-point values there is the std::partial_ordering (less, greater, equivalent and unordered). For your own defined types there is also the std::weak_ordering (less, greater, equivalent)

Hello, World!

Lets write the classic first program using the new C++20 language features using the std::format Since the format module is not available yet, you can opt for the {fmt} library from https://fmt.dev) which is the library the format module is build on. I’m using the using directive to make it as easy as possible to …

Hello, World! Read More »