In my latest blog post, "C++ for embedded systems: constexpr and consteval," you'll learn what C++ does for embedded software development.
C++ Insights now uses Clang 19. Read the details!
C++23 was published by ISO but why isn't it called C++24?
C++23 is now finally an official ISO standard: https://www.iso.org/standard/83626.html
C23 and C++23 are finally joining the quadruple precision club, by bringing a standard way to handle 128-bit floating point numbers!
(FP16 is also here if you need it)
Here is hoping that a future Fortran standard will adopt the C_Float128 kind specifier that gcc/gfortran already has as an extension.
https://en.cppreference.com/w/cpp/types/floating-point
Is there a way to make this code compile without the commented bit? In a generic fashion, so it works with any callable?
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!
Triggering a compile-time error from consteval function is harder than it should be.
One would expect static_assert to work, but when you need to assert preconditions on function parameters, you can't use that.
You have to either invoke undefined behavior (as it triggers compile error in consteval context) or invoke a non-constexpr method.
If you need a description for the error message, the method name is your error message!
CppCon 2024 SESSION ANNOUNCEMENT: Leveraging C++20/23 Features for Low Level Interactions by Jeffrey Erickson
https://cppcon2024.sched.com/event/1gZfB/leveraging-c2023-features-for-low-level-interactions
Register now: https://cppcon.org/registration/
We have just released a new C++Now 2024 Conference Video!
C++11 to C++23 in the C++ Memory Model – Alex Dathskovsky – C++Now 2024
Gotta love the C++ standard library (sarcasm).
It adds std::osyncstream in C++20 which synchronizes writes to a wrapped stream across threads.
And then it adds std::print in C++23 which replaces normal stream operations and accepts a stream reference to which it should write.
Except... for some reason it converts that stream to FILE* which means that any synchronization capabilities of osyncstream are lost, making you fumbling why a perfectly legal C++ code misbehaves.
At least if they'd explicitly deleted that overload...
Deducing this з C++ 23 на практиці
CppCon 2024 SESSION ANNOUNCEMENT: Leveraging C++20/23 Features for Low Level Interactions by Jeffrey Erickson
https://cppcon2024.sched.com/event/1gZfB/leveraging-c2023-features-for-low-level-interactions
Register now: https://cppcon.org/registration/
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.
Reach out if there is a topic you want me to discuss.
C++OnSea 2024 SESSION ANNOUNCEMENT: What Does It Take To Implement the Standard Library? by Christopher Di Bella
https://cpponsea.uk/2024/sessions/what-does-it-take-to-implement-the-standard-library
Register now at https://cpponsea.uk/tickets/