Jump to content
View in the app

A better way to browse. Learn more.

Horizon Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

All Activity

This stream auto-updates

  1. Earlier
  2. PVS-Studio 7.41 has been released. It brings improvements for Unreal Engine, support for MISRA C 2023, an update to the IntelliJ IDEA plugin, and other useful changes. PVS-Studio 7.41: MISRA C 2023, enhanced Unreal Engine integration, new logging system, and much more by Valerii Filatov From the article: Throughout the year, we have been working to cover more of the MISRA C 2023 standard. Currently, PVS-Studio analyzer covers 86% of the standard. You can find more information on this page. In future releases, we will continue to expand MISRA C++ 2023 standard coverage. View the full article
  3. A look back on major design decisions in C++ Ranges and how they may be viewed today. Range adaptors - 5 years after C++20 by Hannes Hauswedell Watch now: <iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="" frameborder="0" height="315" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/nficAvk5RA4?si=w86EVk7oX89uVcPg" title="YouTube video player" width="560"></iframe> View the full article
  4. So how do you quickly concatenate strings? By Aleksandr Orefkov From the article: All practicing programmers have to concatenate strings. Precisely concatenate, we don’t have some JavaScript or PHP, in C++ we have this fancy word for it. Programmers in other languages ​​simply “add” strings together without much thought, without even thinking about this operation. After all, what could be simpler than return "The answer is " + str_answer + ", count is " + count; But while it’s forgivable for script kiddies not to think about the meaning behind such a simple notation, it’s unacceptable for an experienced developer to approach such an important issue so irresponsibly. An experienced developer, imagining such C++ code, immediately sees the terrifying abyss of problems that such an approach can create. What type is str_answer? What type is count? “The answer is “ and “, count is “ - are literals that add to std::string as a const char*. So, strlen will be called. I wonder if the compiler will be able to optimize and calculate their length at compile time? Oh well, it seems like constexpr is in the addition, let’s hope so. This is the first level of problems for now. And let’s say we successfully solved them, creating the following code: std::string make_answer(std::string_view str_answer, int count) { return "The answer is " + std::string{str_answer} + ", count is " + std::to_string(count); } It sounds like “Hurray!”, but it’s somehow not loud enough… View the full article
  5. Filtering items from a container is a common situation. Bartłomiej Filipek demonstrates various approaches from different versions of C++. 15 Different Ways to Filter Containers in Modern C++ by Bartłomiej Filipek From the article: Do you know how many ways we can implement a filter function in C++? While the problem is relatively easy to understand – take a container, copy elements that match a predicate and the return a new container – it’s good to exercise with the C++ Standard Library and check a few ideas. We can also apply some modern C++ techniques, including C++23. Let’s start! The problem statement To be precise by a filter, I mean a function with the following interface: auto Filter(const Container& cont, UnaryPredicate p) {} It takes a container and a predicate, and then it creates an output container with elements that satisfy the predicate. We can use it like the following: const std::vector<std::string> vec{ "Hello", "**txt", "World", "error", "warning", "C++", "****" }; auto filtered = Filter(vec, [](auto& elem) { return !elem.starts_with('*'); }); // filtered should have "Hello", "World", // "error", "warning", "C++" Writing such a function can be a good exercise with various options and algorithms in the Standard Library. What’s more, our function hides internal things like iterators, so it’s more like a range-based version. View the full article
  6. Coroutines are powerful but require some boilerplate code. Quasar Chunawala explains what you need to implement to get coroutines working. Coroutines – A Deep Dive by Quasar Chunawala From the article: Following on from the introduction in the editorial, let’s understand the basic mechanics needed to code up a simple coroutine, and I’ll show you how to yield from the coroutine and await results. The simplest coroutine The following code is the simplest implementation of a coroutine: #include <coroutine> void coro_func(){ co_return; } int main(){ coro_func(); } Our first coroutine will just return nothing. It will not do anything else. Sadly, the preceding code is too simple for a functional coroutine and it will not compile. When compiling with gcc 15.2, we get the error shown in Figure 1. <source>: In function 'void coro_func()': <source>:4:5: error: unable to find the promise type for this coroutine 4 | co_return; | ^~~~~~~~~ Looking at C++ reference, we see that the return type of a coroutine must define a type named promise_type. Why do we need a promise? The promise_type is the second important piece in the coroutine mechanism. We can draw an analogy from futures and promises which are essential blocks for achieving asynchronous programming in C++. The future is the thing, that the function that does the asynchronous computation, hands out back to the caller, that the caller can use to retrieve the result by invoking the get() member function. The future has the role of the return object. View the full article
  7. Concurrency has many different approaches. Lucian Radu Teodorescu clarifies terms, showing how different approaches solve different problems. Concurrency Flavours by Lucian Radu Teodorescu From the article: Most engineers today use concurrency – often without a clear understanding of what it is, why it’s needed, or which flavour they’re dealing with. The vocabulary around concurrency is rich but muddled. Terms like parallelism, multithreading, asynchrony, reactive programming, and structured concurrency are regularly conflated – even in technical discussions. This confusion isn’t just semantic – it leads to real-world consequences. If the goal behind using concurrency is unclear, the result is often poor concurrency – brittle code, wasted resources, or systems that are needlessly hard to reason about. Choosing the right concurrency strategy requires more than knowing a framework or following a pattern – it requires understanding what kind of complexity you’re introducing, and why. To help clarify this complexity, the article aims to map out some of the main flavours of concurrency. Rather than defining terms rigidly, we’ll explore the motivations behind them – and the distinct mindsets they evoke. While this article includes a few C++ code examples (using features to be added in C++26), its focus is conceptual – distinguishing between the flavours of concurrency. Our goal is to refine the reader’s taste for concurrency. View the full article
  8. Value semantics is a way of structuring programs around what values mean, not where objects live, and C++ is explicitly designed to support this model. In a value-semantic design, objects are merely vehicles for communicating state, while identity, address, and physical representation are intentionally irrelevant. Exclusive state access, I by Andrzej Krzemieński From the article: Value semantics is a way of organizing your programs, which C++ supports and endorses. Its key characteristics in a nutshell: Throughout its lifetime an object (via its type and special member functions) is used to represent a value. Different parts of the program communicate values via objects. While the value matters, objects themselves (their address, their sizeof) do not. Object’s value is isolated from other objects’ values. This begs the question, what is value, but we will not answer it. First, because it is difficult, and maybe impossible. It is pretty clear what value objects of type int represent. It is fairly uncontroversial what value is represented by vector<int>, once we accept that the value representation need not fit into the sizeof of the object, but can spread across other memory locations and resources, and that vector’s capacity is not part of this value, even though it is part of its state. But there are things like std::mutex where naming the value is tricky. View the full article
  9. In today's post, I like to touch on a controversial topic: singletons. While I think it is best to have a codebase without singletons, the real-world shows me that singletons are often part of codebases. Singleton done right in C++ by Andreas Fertig From the article: Let's use a usage pattern for a singleton that I see frequently, a system-wide logger. A simple implementation can look like the following code: class Logger { Logger() = default; public: static Logger& Instance() { static Logger theOneAndOnlyLogger{}; return theOneAndOnlyLogger; } void Info(std::string_view msg) { std::print("Info: {}", msg); } void Error(std::string_view msg) { std::print("Error: {}", msg); } }; The key parts for a singleton in C++ are that the constructor is private and an access function that is static. With that, you ensure that a singleton object, here Logger can only be constructed by calling Instance, essentially limiting the number of Logger objects to a single one. You're using such a Logger like this: Logger::Instance().Info("A test"); View the full article
  10. Once more the using std::cpp conference is here and they bring two interesting training workshops. Mastering std::execution: A Hands-On Workshop by Mateus Pusz. https://www.fundacion.uc3m.es/formacion/mastering-stdexecution-a-hands-on-workshop/ Function and Class Design with C++2x by Jeff Garland. https://www.fundacion.uc3m.es/formacion/function-and-class-design-with-c2x/ Both workshops happen in the post-conference day on March 19th in Madrid. You may also want to have a look to the list of speakers for the main conference. If you are one of the first 20 attendees to each workshops, your are eligible for a free ticket for the main conference. View the full article
  11. Templates and metaprogramming considered as the big bad wolf of C++, and it’s time to stop being scared of this wolf, as it’s one of the most powerful creatures of C++. Talk: Who’s Afraid of the Big Bad Template by Coral Kashri From the description: In this talk I’ve demonstrated the power of this incredible creature, while I hope that this talk would be an easy enterence to this concept (pan intended), and to help you developing the anticipation to walk into the cave of metaprogramming. The talk was give on Core C++ 2025. View the full article
  12. Templates and metaprogramming considered as the big bad wolf of C++, and it’s time to stop being scared of this wolf, as it’s one of the most powerful creatures of C++. Talk: Who’s Afraid of the Big Bad Template by Coral Kashri From the description: In this talk I’ve demonstrated the power of this incredible creature, while I hope that this talk would be an easy enterence to this concept (pan intended), and to help you developing the anticipation to walk into the cave of metaprogramming. The talk was give on Core C++ 2025. View the full article
  13. Conferences are never just about the talks — they’re about time, travel, tradeoffs, and the people you meet along the way. After a year of attending several C++ events across formats and cities, this post is a personal look at how different conferences balance technical depth, community, and the experience of being there. 2025, A Year of Conferences by Sandor Dargo From the article: This year I had the chance to attend three conferences onsite, plus one online, and even a meetup in my hometown, Budapest. Depending on who you ask, maybe it’s not a lot — I know some speakers do twice as many. But if you ask my family, you’d probably get a different (and understandable) answer. For me — for us — it’s a lot. It’s also an honour and a privilege in many ways. To express my appreciation and gratitude toward the organizers and the community, I do two things: I try to prepare well for my talks. I post trip reports soon after each event — usually within a week. Those trip reports are moderately personal: I share which talks I liked and also some of my impressions, but I try to make them useful rather than purely personal. Still, I think that once in a while, a more personal, less serious post has its place — and that’s what this one wanted to be originally. At one of the social dinners at CppCon, a developer working for a FAANG company in New York asked me which conference I’d recommend. My answer: it depends on your goals — and your budget and constraints. View the full article
  14. C++20 introduced coroutines. Quasar Chunawala, our guest editor for this edition, gives an overview. A Guest Editorial by Quasar Chunawala, Frances Buontempo From the article: You’ve likely heard about this new C++20 feature, coroutines. I think that this is a really important subject and there are several cool use-cases for coroutines. A coroutine in the simplest terms is just a function that you can pause in the middle. At a later point the caller will decide to resume the execution of the function right where you left off. Unlike a function therefore, coroutines are always stateful - you at least need to remember where you left off in the function body. Coroutines can simplify our code! Coroutines are a great tool, when it comes to implementing parsers. The coroutine return type The initial call to the coroutine function will produce a return object of a certain ReturnType and hand it back to the caller. The interface of this type is what is going to determine what the coroutine is capable of. Since coroutines are super-flexible, we can do a whole lot with this return object. If you have some coroutine, and you want to understand what it’s doing, the first thing you should look at is the ReturnType, and what it’s interface is. The important thing here is, we design this ReturnType. If you are writing a coroutine, you can decide what goes into this interface. View the full article
  15. Filtering items from a container is a common situation. Bartłomiej Filipek demonstrates various approaches from different versions of C++. 15 Different Ways to Filter Containers in Modern C++ by Bartłomiej Filipek From the article: Do you know how many ways we can implement a filter function in C++? While the problem is relatively easy to understand – take a container, copy elements that match a predicate and the return a new container – it’s good to exercise with the C++ Standard Library and check a few ideas. We can also apply some modern C++ techniques, including C++23. Let’s start! The problem statement To be precise by a filter, I mean a function with the following interface: auto Filter(const Container& cont, UnaryPredicate p) {} It takes a container and a predicate, and then it creates an output container with elements that satisfy the predicate. We can use it like the following: const std::vector<std::string> vec{ "Hello", "**txt", "World", "error", "warning", "C++", "****" }; auto filtered = Filter(vec, [](auto& elem) { return !elem.starts_with('*'); }); // filtered should have "Hello", "World", // "error", "warning", "C++" Writing such a function can be a good exercise with various options and algorithms in the Standard Library. What’s more, our function hides internal things like iterators, so it’s more like a range-based version. View the full article
  16. std::chrono::high_resolution_clock sounds like the obvious choice when you care about precision, but its name hides some important caveats. In this article, we’ll demystify what “high resolution” really means in <chrono>, why this clock is often just an alias, and when—if ever—it’s actually the right tool to use. Time in C++: std::chrono::high_resolution_clock - Myths and Realities by Sandor Dargo From the article: If there’s one clock in <chrono> that causes the most confusion, it’s std::chrono::high_resolution_clock. The name sounds too tempting — who wouldn’t want “the highest resolution”? But like many things in C++, the details matter. In the earlier parts of this series, we looked at system_clock as the wall-clock time source, and at steady_clock as the reliable choice for measuring intervals. This time, we’ll tackle the so-called “high-resolution” clock, separate fact from myth, and see why it’s not always the right choice — even when you think you need precision. What “high resolution” actually means A clock’s resolution (or precision) is the granularity of its tick period — i.e., the smallest representable step in time for that clock’s time_point. In <chrono> it’s exposed via Clock::period, a std::ratio. Notice an important difference. I didn’t mention accuracy, only precision. A clock might represent nanoseconds, but still be inaccurate due to hardware or OS scheduling. A higher resolution doesn’t necessarily mean better measurement. For timing, stability and monotonicity matter much more than how fine-grained the tick is. View the full article
  17. Coroutines are powerful but require some boilerplate code. Quasar Chunawala explains what you need to implement to get coroutines working. Coroutines – A Deep Dive by Quasar Chunawala From the article: The following code is the simplest implementation of a coroutine: #include <coroutine> void coro_func(){ co_return; } int main(){ coro_func(); } Our first coroutine will just return nothing. It will not do anything else. Sadly, the preceding code is too simple for a functional coroutine and it will not compile. When compiling with gcc 15.2, we get the error shown in Figure 1. <source>: In function 'void coro_func()': <source>:4:5: error: unable to find the promise type for this coroutine 4 | co_return; | ^~~~~~~~~ Figure 1 Looking at C++ reference, we see that the return type of a coroutine must define a type named promise_type. View the full article
  18. Concurrency has many different approaches. Lucian Radu Teodorescu clarifies terms, showing how different approaches solve different problems. Concurrency Flavours by Lucian Radu Teodorescu From the article: Most engineers today use concurrency – often without a clear understanding of what it is, why it’s needed, or which flavour they’re dealing with. The vocabulary around concurrency is rich but muddled. Terms like parallelism, multithreading, asynchrony, reactive programming, and structured concurrency are regularly conflated – even in technical discussions. This confusion isn’t just semantic – it leads to real-world consequences. If the goal behind using concurrency is unclear, the result is often poor concurrency – brittle code, wasted resources, or systems that are needlessly hard to reason about. Choosing the right concurrency strategy requires more than knowing a framework or following a pattern – it requires understanding what kind of complexity you’re introducing, and why. To help clarify this complexity, the article aims to map out some of the main flavours of concurrency. Rather than defining terms rigidly, we’ll explore the motivations behind them – and the distinct mindsets they evoke. While this article includes a few C++ code examples (using features to be added in C++26), its focus is conceptual – distinguishing between the flavours of concurrency. Our goal is to refine the reader’s taste for concurrency. View the full article
  19. With ASCII, it's very simple to find the next character in a string: you can just increment an index (i++) or char pointer (pch++). But what happens when you have Unicode strings to process? Finding the Next Unicode Code Point in Strings: UTF-8 vs. UTF-16 by Giovanni Dicanio From the article: Both UTF-16 and UTF-8 are variable-length encodings. In particular, UTF-8 encodes each valid Unicode code point using one to four 8-bit byte units. On the other hand, UTF-16 is somewhat simpler: In fact, Unicode code points are encoded in UTF-16 using just one or two 16-bit code units. (...) The functions have the following prototypes: // Returns the next Unicode code point and number of bytes consumed. // Throws std::out_of_range if index is out of bounds or string ends prematurely. // Throws std::invalid_argument on invalid UTF-8 sequence. [[nodiscard]] std::pair<char32_t, size_t> NextCodePointUtf8( const std::string& str, size_t index ); // Returns the next Unicode code point and the number of UTF-16 code units consumed. // Throws std::out_of_range if index is out of bounds or string ends prematurely. // Throws std::invalid_argument on invalid UTF-16 sequence. [[nodiscard]] std::pair<char32_t, size_t> NextCodePointUtf16( const std::wstring& input, size_t index ); View the full article
  20. Memory-safety vulnerabilities remain one of the most persistent and costly risks in large-scale C++ systems, even in well-tested production code. This article explores how hardening the C++ Standard Library—specifically LLVM’s libc++—can deliver meaningful security and reliability gains at massive scale with minimal performance overhead. Practical Security in Production: Hardening the C++ Standard Library at massive scale by Louis Dionne, Alex Rebert, Max Shavrick, and Konstantin Varlamov From the article: Over the past few years there has been a lot of talk about memory-safety vulnerabilities, and rightly so—attackers continue to take advantage of them to achieve their objectives. Aside from security, memory unsafety can be the cause of reliability issues and is notoriously expensive to debug. Considering the billions of lines of C++ code in production today, we need to do what we can to make C++ measurably safer over the next few years with as low of an adoption barrier as possible. In 2019, Alex Gaynor, a security expert and one of the leading voices in memory safety, wrote a piece titled "Modern C++ Won't Save Us," where he gave examples of foundational types such as std::optional that were unsafe in the idiomatic use cases. What happens when these unsafe types are used beyond their contract? Well, you guessed it: undefined behavior. The std::optional type isn't the only one to behave like this. If you look at how this compares with modern languages, you can see that C++ is the outlier. So, what's to be done? Possibly one of the best places to start today is by improving our standard libraries. They provide the baseline "vocabulary types" for developers—and if they're not safe, it will be tough to build safety around them. The std::optional type is only one of many vocabulary types in the C++ Standard Library that aren't safe by default today. Given the current state, it seems mostly clear that the first step should be hardening our standard library, and in our case, this was LLVM's libc++. View the full article
  21. Qt completes the recommended public cash offer to the shareholders of I.A.R. Systems Group From the article: On 4 July 2025, Qt Group Plc's ("Qt Group") wholly owned subsidiary The Qt Company Ltd ("The Qt Company" and together with Qt Group, "Qt"), announced a recommended public cash offer to the shareholders of class B shares (the "Shares" or, individually, a "Share") in I.A.R. Systems Group AB (publ) ("IAR"), to tender all their Shares at a price of SEK 180 in cash per Share (the "Offer"). The Shares in IAR are traded on Nasdaq Stockholm, Mid Cap. An offer document relating to the Offer was published on 15 August 2025. At the end of the acceptance period on 10 October 2025, the Offer had been accepted by shareholders with a total of 12,037,848 Shares in IAR, corresponding to 94.49 per cent of the outstanding shares and votes in IAR.[1] As a result, The Qt Company controls in total 12,037,848 Shares in IAR, corresponding to 94.49 per cent of the outstanding shares and votes in IAR.[2] The Qt Company has decided to complete the Offer. All conditions are satisfied or have been waived. Settlement for Shares tendered in the Offer during the initial acceptance period will be initiated on or around 17 October 2025. View the full article
  22. Thanks to James McNellis to giving an introduction to this crutial technique for protecting C++ applications, which he has practical experience with. A little Introduction to Control Flow Integrity - James McNellis - Keynote Meeting C++ 2025 by James McNellis Watch the video: View the full article
  23. This post is in response to two claims about coroutines: 1) Their reference function parameters may become dangling too easily, and 2) They are indistinguishable from regular functions from the declaration alone. Event-driven flows by Andrzej Krzemieński From the article: A canonical example of an event-driven flow is the handling of signals in C. Signals will be risen at unpredictable points in time, so rather than actively checking for them, we define a callback and associate it with the indicated signal: signal(SIGINT, on_interrupt); After having performed this association, we move on to doing other things. It is the implementation (system, or parts of the program we do not write) that will make sure to invoke the callback when the signal is risen (if at all). We can illustrate it with a diagram: View the full article
  24. Qt Jenny is a Java/Android JNI glue/proxy Qt code generator. You can find and get it from Maven Central. Qt Jenny is a fork of Jenny from LanderlYoung. The fork differs from the original one by supporting JNI call gluing with QJni - classes such as QJniObject. That brings the powers of Qt for Android and the magic of Android Java native APIs to Qt! Qt Jenny 1.0 Released by Rami Potinkara From the article: Have you heard about Jenny? No, I do not mean, the girl next door, nor the Spinning Jenny that started the industrial revolution in England in the 17th century. This one is a modern information age revolution, a code generator, a cuter Jenny. Got your eyebrows raised? Are you a Qt developer? Perhaps you are mastering cross-platform development with Qt and deploying apps to Google Play? Read more below! View the full article
  25. Very often the need arises in Windows C++ programming to convert text between Unicode UTF-16 (which historically has been the native Unicode encoding used by Windows APIs) and UTF-8 (which is the de facto standard for sending text across the Internet and exchanging text between different platforms). Converting Between Unicode UTF-16 and UTF-8 in Windows C++ Code by Giovanni Dicanio From the article: A detailed discussion on how to convert C++ strings between Unicode UTF-16 and UTF-8 in C++ code using Windows APIs like WideCharToMultiByte, and STL strings and string views. View the full article
  26. The Opening Keynote by Anthony Williams from Meeting C++ 2025 has been released. Software and Safety - Anthony Williams - Keynote Meeting C++ 2025 by Anthony Williams Watch now: View the full article

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.