Did you know about the C++ Insights YouTube channel?

https://youtube.com/@andreas_fertig

You get a new video there every third Wednesday of the month.

The next video goes out in less than 24 hours!

#cppinsights #cpp #cpp23

In my main project (very large physics simulation) we're about to start allowing c++23 features. I generally try to keep c++-isms to a minimum, but I welcome things like .contains() methods and things that make c++ more pleasant (i.e. python-like). Any "favorite" c++23 features you would recommend that we adopt? Any to avoid?
#cpp #cpp23 #software #softwareDevelopment #softwareEngineering
@alina your compiler doesn't supoort #cpp23!

TIL: C++23 you can use named universal character escapes

#include <print>
int main() {
std::print("\N{GREEN HEART}"); // 💚
}

https://en.cppreference.com/w/cpp/language/escape.html#Named_universal_character_escapes

#cplusplus #cpp #cpp23 #programming

Escape sequences - cppreference.com

May I make you aware of the phantastic @compiler_explorer, that totally indispensable tool to every software developer - the brainchild of @mattgodbolt ?

I can speak only as an average C++ developer who works at a small company, and who happens to be stranded in the C++ committee.

For my own experiments, I have a personal bookmark in my browser called "C++23 playground" as a starting point for for more elaborate adventures in the C++ lands. May be, it helps you as well:

https://godbolt.org/z/Mz96j16nx

To the best of my knowledge, the provided flags will give you some highly recommended defaults for compiler diagnostics and maximum language conformance, in the three major implementations Clang/libc++, GCC/libstdc++, and MSVC/MS-STL. Maybe you'll get some inspiration for your daily grind.

Please support Matt and the entire CE team 🤘, f.e. by getting some swag that we nerds can proudly present in the public and wear as protective gear ☺️

Visit https://shop.compiler-explorer.com/promo/BLACKFRIDAY 🤩

#cpp #cpp23 #cplusCplus #programming

Compiler Explorer - C++

int main() { constexpr auto toUsAll = "world"; std::println("Hello {}", toUsAll); }

Are you using std::ranges in your C++ code? If not, what is stopping you?

Ranges introduced a huge paradigm shift in the way we can write our C++ code. They can make the code way shorter, way better separated, and what's best - way more resilient to both logical and memory-related bugs. 🐞

If you haven't yet dabbled in ranges yourself, I've prepared a kind of cheatsheet reference article exploring many everyday use cases and how they can be improved by using the std::ranges library. 📏

You can read the article for free on my Medium:
https://medium.com/@nerudaj/you-need-to-start-using-c-s-ranges-cf80c9f38602

What are your experiences with this library? Tell me in the comments 👇

#cpp #softwareengineering #memorysafety #cpp23

Did you know about the C++ Insights YouTube channel?

https://youtube.com/@andreas_fertig

You get a new video there every third Wednesday of the month.

The next video goes out in less than 24 hours!

#cppinsights #cpp #cpp23

C++ Insights - Episode 67: C++23: Why if consteval can make your code better

In this episode, you'll learn how C++23's if consteval helps you avoiding mistakes.

https://youtu.be/9bHSiqXZhFI

#cppinsights #cpp #cpp23

Released v1.0.0 of bit-lite.

It now supports C++23 byteswap().

A somewhat less frivolous message than in the blue skies :)

#cpp #cpp98 #cpp11 #cpp20 #cpp23

https://github.com/martinmoene/bit-lite/releases/tag/v1.0.0

Release 1.0.0 · martinmoene/bit-lite

Release 1.0.0 of bit lite adds C++23 byteswap(). To be expanded. Additions: Changes: Fixes:

GitHub

Can somebody explain to me, why the last static assert fails? The value type has <=> operator returning strong ordering and std::map is clearly capable of having strong-ordered <=> operator.

Godbolt link: https://godbolt.org/z/xnaaoWxaq

#cpp #cpp23 #programming #help