<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title><![CDATA[Standard C++ | Articles & Books]]></title>
    <link>http://isocpp.org/blog</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:rights>Copyright 2026</dc:rights>
    <admin:generatorAgent rdf:resource="https://expressionengine.com/" />
    

    <item>
      <title>Glaze 7.2 &#45; C++26 Reflection | YAML, CBOR, MessagePack, TOML and more</title>
      <link>https://isocpp.org//blog/2026/04/glaze-7.2-cpp26-reflection-yaml-cbor-messagepack-toml-and-more</link>
      <guid>https://isocpp.org//blog/2026/04/glaze-7.2-cpp26-reflection-yaml-cbor-messagepack-toml-and-more</guid>
      <description><![CDATA[<p>
	Glaze is a high-performance C++23 serialization library with compile-time reflection. It has grown to support many more formats and features, and in v7.2.0 C++26 Reflection support has been merged!</p>
<blockquote>
	<h3>
		<a href="https://www.reddit.com/r/cpp/comments/1rrq9e6/glaze_72_c26_reflection_yaml_cbor_messagepack/">Glaze 7.2 - C++26 Reflection | YAML, CBOR, MessagePack, TOML and more</a></h3>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Glaze now supports C++26 reflection with experimental GCC and Clang compilers. GCC 16 will soon be released with this support. When enabled, Glaze replaces the traditional&nbsp;<code style="font-size: 18px;">__PRETTY_FUNCTION__</code><span style="font-size: 18px;">&nbsp;parsing and structured binding tricks with proper compile-time reflection primitives (</span><code style="font-size: 18px;">std::meta</code><span style="font-size: 18px;">).</span></p>
	<p>
		The API doesn&#39;t change at all. You just get much more powerful automatic reflection that still works with Glaze overrides! Glaze was designed with automatic reflection in mind and still lets you customize reflection metadata using&nbsp;<code>glz::meta</code>&nbsp;on top of what&nbsp;<code>std::meta</code>&nbsp;provides via defaults.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Tue, 28 Apr 2026 22:25:57 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Behold the power of meta::substitute &#45;&#45; Barry Revzin</title>
      <link>https://isocpp.org//blog/2026/04/behold-the-power-of-metasubstitute-barry-revzin</link>
      <guid>https://isocpp.org//blog/2026/04/behold-the-power-of-metasubstitute-barry-revzin</guid>
      <description><![CDATA[<p>
	What if string formatting could do far more than just substitute values&mdash;and do it all at compile time? This deep dive explores how modern C++ features like reflection unlock powerful new possibilities for parsing, analyzing, and transforming format strings before your program even runs.</p>
<blockquote>
	<h3>
		<a href="https://brevzin.github.io/c++/2026/03/02/power-of-substitute/">Behold the power of meta::substitute</a></h3>
	<p>
		by Barry Revzin</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Over winter break, I started working on proposal for&nbsp;<a href="https://wg21.link/p3951">string interpolation</a>. It was a lot of fun to work through implementing, basically an hour a day during my daughter&rsquo;s nap time. The design itself is motivated by wanting to have a lot more functionality other than just formatting &mdash; and one of the examples in the paper was implementing an algorithm that does highlighting of the interpolations, such that:</p>
	<p>
		<img alt="revzin-codeeg.png" src="https://isocpp.org/files/img/revzin-codeeg.png" style="margin: 10px; float: left;" /></p>
	<p>
		&nbsp;</p>
	<p>
		&nbsp;</p>
	<p>
		&nbsp;</p>
	<p>
		would print this:</p>
	<blockquote>
		<p>
			x=<strong>5</strong>&nbsp;and y=<strong>*10*</strong>&nbsp;and z=<strong>hello</strong>!</p>
	</blockquote>
	<p>
		without doing any additional parsing work. I got the example from Vittorio Romeo&rsquo;s&nbsp;<a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1819r0.html#automated-coloring">original paper</a>.</p>
	<p>
		Now, when I wrote the paper, I considered this to be a simple example demonstrating something that was possible with the design I was proposing that was&nbsp;<em>not</em>&nbsp;possible with the&nbsp;<a href="https://wg21.link/p3412">other design</a>. I thought that because obviously you need the format string as a compile-time constant in order to parse it at compile time to get the information that you need.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Wed, 22 Apr 2026 19:50:46 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Let&apos;s check vibe code that acts like optimized C++ one but is actually a mess</title>
      <link>https://isocpp.org//blog/2026/04/lets-check-vibe-code-that-acts-like-optimized-cpp-one-but-is-actually-a-mes</link>
      <guid>https://isocpp.org//blog/2026/04/lets-check-vibe-code-that-acts-like-optimized-cpp-one-but-is-actually-a-mes</guid>
      <description><![CDATA[<p>
	The value of a skilled developer is shifting toward the ability to effectively review code. Although generating code now is easier than ever, evaluating it for proper decomposition, correctness, efficiency, and security is still important. To see why it&#39;s important to understand generated code and to recognize what lies beneath a program&#39;s elegant syntax, let&#39;s look at a small project called markus, created using Claude Opus.</p>
<blockquote>
	<h3>
		<a href="https://pvs-studio.com/en/blog/posts/cpp/1366/">Let&#39;s check vibe code that acts like optimized C++ one but is actually a mess</a></h3>
	<p>
		by&nbsp;Andrey Karpov</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Clearly, the 64-bit code is much more efficient, except when SSE2 is involved. Even then, though, everything runs quickly.&nbsp;The code Claude Opus generated for the markus project is the worst of all the options.&nbsp;Not only is the simplest implementation with a regular loop faster, it&#39;s also shorter. The extra code lines only made things worse.</p>
</blockquote>
<p>
	&nbsp;</p>]]></description>
      <dc:subject><![CDATA[Articles & Books,]]></dc:subject>
      <pubDate>Tue, 21 Apr 2026 11:05:31 +0000</pubDate>
      <dc:creator>Andrey Karpov</dc:creator>
    </item>

    <item>
      <title>Devirtualization and Static Polymorphism &#45;&#45; David Álvarez Rosa</title>
      <link>https://isocpp.org//blog/2026/04/devirtualization-and-static-polymorphism-david-alvarez-rosa</link>
      <guid>https://isocpp.org//blog/2026/04/devirtualization-and-static-polymorphism-david-alvarez-rosa</guid>
      <description><![CDATA[<p>
	<img alt="rosa-devirtualization.png" src="https://isocpp.org/files/img/rosa-devirtualization.png" style="width: 400px; margin: 10px; float: right;" />Ever wondered why your clean, object-oriented design sometimes slows things down? This piece breaks down how virtual dispatch impacts performance&mdash;and how techniques like devirtualization and static polymorphism can eliminate that overhead entirely.</p>
<blockquote>
	<h3>
		<a href="https://david.alvarezrosa.com/posts/devirtualization-and-static-polymorphism/">Devirtualization and Static Polymorphism</a></h3>
	<p>
		by David &Aacute;lvarez Rosa</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Ever wondered why your &ldquo;clean&rdquo; polymorphic design underperforms in benchmarks? Virtual dispatch enables polymorphism, but it comes with hidden overhead: pointer indirection, larger object layouts, and fewer inlining opportunities.</p>
	<p>
		Compilers do their best to devirtualize these calls, but it isn&rsquo;t always possible. On latency-sensitive paths, it&rsquo;s beneficial to manually replace dynamic dispatch with static polymorphism, so calls are resolved at compile time and the abstraction has effectively zero runtime cost.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Thu, 16 Apr 2026 19:42:23 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Power of C++26 Reflection: Strong (opaque) type definitions &#45;&#45;  r/cpp</title>
      <link>https://isocpp.org//blog/2026/04/power-of-cpp26-reflection-strong-opaque-type-definitions-r-cpp</link>
      <guid>https://isocpp.org//blog/2026/04/power-of-cpp26-reflection-strong-opaque-type-definitions-r-cpp</guid>
      <description><![CDATA[<p>
	Inspired by a similar previous thread showcasing cool uses for C++26 reflection.</p>
<blockquote>
	<h3>
		<a href="https://www.reddit.com/r/cpp/comments/1rgo4s9/power_of_c26_reflection_strong_opaque_type/">Power of C++26 Reflection: Strong (opaque) type definitions&nbsp;</a></h3>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		With reflection, you can easily create "opaque" type definitions, i.e "strong types". It works by having an inner value stored, and wrapping over all public member functions.</p>
	<p>
		Note: I am using queue_injection { ... } with the EDG experimental reflection, which afaik wasn&#39;t actually integrated into the C++26 standard, but without it you would simply need two build stages for codegen. This is also just a proof of concept, some features aren&#39;t fully developed (e.g aggregate initialization)</p>
	<pre>
struct Item { /* ... */ }; // name, price as methods&#10;&#10;struct FoodItem;&#10;struct BookItem;&#10;struct MovieItem;&#10;&#10;consteval { &#10;    make_strong_typedef(^^FoodItem, ^^Item); &#10;    make_strong_typedef(^^BookItem, ^^Item); &#10;    make_strong_typedef(^^MovieItem, ^^Item); &#10;}&#10;&#10;// Fully distinct types&#10;void display(FoodItem &amp;i) {&#10;    std::cout &lt;&lt; "Food: " &lt;&lt; i.name() &lt;&lt; ", " &lt;&lt; i.price() &lt;&lt; std::endl;&#10;}&#10;void display(BookItem &amp;i) {&#10;    std::cout &lt;&lt; "Book: " &lt;&lt; i.name() &lt;&lt; ", " &lt;&lt; i.price() &lt;&lt; std::endl;&#10;}&#10;&#10;int main() {&#10;    FoodItem fi("apple", 10); // works if Item constructor isn&#39;t marked explicit&#10;    FoodItem fi_conversion(Item{"chocolate", 5}); // otherwise&#10;    BookItem bi("the art of war", 20);&#10;    MovieItem mi("interstellar", 25);&#10;&#10;    display(fi);&#10;    display(bi);&#10;    // display(Item{"hello", 1}); // incorrect, missing display(Item&amp;) function&#10;    // display(mi); // incorrect, missing display(MovieItem&amp;) function&#10;}</pre>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Thu, 09 Apr 2026 21:36:20 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>std::vector — Four Mechanisms Behind Every push_back() &#45;&#45; Gracjan Olbinski</title>
      <link>https://isocpp.org//blog/2026/04/stdvector-four-mechanisms-behind-every-push_back-gracjan-olbinski</link>
      <guid>https://isocpp.org//blog/2026/04/stdvector-four-mechanisms-behind-every-push_back-gracjan-olbinski</guid>
      <description><![CDATA[<p>
	A walkthrough of four mechanisms working behind every push_back() call &mdash; exponential growth and amortized O(1), the growth factor&#39;s effect on memory reuse, cache performance from contiguity, and the silent noexcept trap in move semantics during reallocation.</p>
<blockquote>
	<h3>
		<a href="https://golbinski.org/blog/std-vector-push-back/">std::vector &mdash; Four Mechanisms Behind Every push_back()</a></h3>
	<p>
		by&nbsp;Gracjan Olbinski</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		"You call push_back() a thousand times. The vector reallocates about ten. Behind that simple interface, four mechanisms are working together &mdash; each one invisible during normal use, each one shaping your performance in ways that push_back() will never tell you about."</p>
</blockquote>
<p>
	&nbsp;</p>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Thu, 02 Apr 2026 23:48:28 +0000</pubDate>
      <dc:creator>Gracjan Olbinski</dc:creator>
    </item>

    <item>
      <title>The hidden compile&#45;time cost of C++26 reflection &#45;&#45; Vittorio Romeo</title>
      <link>https://isocpp.org//blog/2026/03/the-hidden-compile-time-cost-of-cpp26-reflection-vittorio-romeo</link>
      <guid>https://isocpp.org//blog/2026/03/the-hidden-compile-time-cost-of-cpp26-reflection-vittorio-romeo</guid>
      <description><![CDATA[<p>
	How much does C++26 Reflection actually cost your build?</p>
<p>
	In this article, we&#39;ll perform some early compilation time benchmarks of one of the most awaited C++26 features.</p>
<blockquote>
	<h3>
		<a href="https://vittorioromeo.com/index/blog/refl_compiletime.html"><strong>The hidden compile-time cost of C++26 reflection</strong></a></h3>
	<p>
		by Vittorio Romeo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Fast compilation times are extremely valuable to keep iteration times low, productivity and motivation high, and to quickly see the impact of your changes.</p>
	<p>
		I would love to see a world where C++26 reflection is as close as possible to a lightweight language feature [...]</p>
	<p>
		So, I decided to take some early measurements.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Tue, 31 Mar 2026 01:19:29 +0000</pubDate>
      <dc:creator>Vittorio Romeo</dc:creator>
    </item>

    <item>
      <title>Stop Choosing: Get C++ Performance in Python Algos with C++26 &#45;&#45; Richard Hickling</title>
      <link>https://isocpp.org//blog/2026/03/stop-choosing-get-cpp-performance-in-python-algos-with-c26-richard-hickling</link>
      <guid>https://isocpp.org//blog/2026/03/stop-choosing-get-cpp-performance-in-python-algos-with-c26-richard-hickling</guid>
      <description><![CDATA[<p>
	<img alt="merton-bot.png" src="https://isocpp.org/files/img/merton-bot.png" style="width: 400px; margin: 10px; float: right;" />In algorithmic trading, the Python-vs-C++ debate is usually framed as flexibility versus speed &mdash; rapid strategy development on one side, ultra-low-latency execution on the other. But with C++26 reflection, that trade-off starts to disappear, making it possible to generate Python bindings automatically while keeping the core logic running at native C++ performance.</p>
<blockquote>
	<h3>
		<a href="https://profitview.net/blog/cpp26-reflection-python-algo-trading">Stop Choosing: Get C++ Performance in Python Algos with C++26</a></h3>
	<p>
		by Richard Hickling</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		The &ldquo;religious war&rdquo; between Python and C++ in algorithmic trading usually boils down to a single trade-off:&nbsp;Python&nbsp;is faster for getting ideas to market, while&nbsp;C++&nbsp;is faster for getting orders into the book.</p>
	<p>
		But why choose? With the advent of&nbsp;C++26 Reflection, you can now have the flexibility of a Python-based strategy without the performance penalty of slow loops.</p>
	<p id="bring-in-c-rapidly-how-reflection-works">
		<strong>Bring in C++ Rapidly: How Reflection Works</strong></p>
	<p>
		The biggest hurdle in hybrid trading systems has always been the &ldquo;bridge.&rdquo; Traditionally, if you wrote a complex pricer in C++, you had to manually write &ldquo;boilerplate&rdquo; code to tell Python how to talk to it. If you added a new function, you had to update the bridge. It was tedious and error-prone.</p>
	<p>
		Reflection&nbsp;changes the game by allowing the code to &ldquo;look in the mirror&rdquo;. Instead of you manually describing your C++ functions to Python, the compiler does it for you. It programmatically inspects your classes and generates the bindings automatically.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 27 Mar 2026 19:11:17 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>C++26: std::is_within_lifetime &#45;&#45; Sandor Dargo</title>
      <link>https://isocpp.org//blog/2026/03/cpp26-stdis-within-lifetime-sandor-dargo</link>
      <guid>https://isocpp.org//blog/2026/03/cpp26-stdis-within-lifetime-sandor-dargo</guid>
      <description><![CDATA[<p>
	<img alt="SANDOR_DARGO_ROUND.JPG" src="https://isocpp.org/files/img/SANDOR_DARGO_ROUND.JPG" style="width: 200px; margin: 10px; float: right; height: 204px;" />When I first came across <code data-end="50" data-start="25">std::is_within_lifetime</code>, I expected another small type-traits utility &mdash; not a feature tied to checking whether a union alternative is active. But once you look closer, this seemingly narrow addition turns out to solve a surprisingly fundamental problem in constant evaluation.</p>
<blockquote>
	<h3>
		<a href="https://www.sandordargo.com/blog/2026/02/18/cpp26-std_is_within_lifetime">C++26: std::is_within_lifetime</a></h3>
	<p>
		by Sandor Dargo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		When I was looking for the next topic for my posts, my eyes stopped on&nbsp;<code>std::is_within_lifetime</code>. Dealing with lifetime issues is a quite common source of bugs, after all. Then&nbsp;<a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2641r4.html">I clicked on the link</a>&nbsp;and I read&nbsp;<em>Checking if a union alternative is active</em>. I scratched my head. Is the link correct?</p>
	<p>
		It is &mdash; and it totally makes sense.</p>
	<p>
		Let&rsquo;s get into the details and first check what&nbsp;<a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2641r4.html">P2641R4</a>&nbsp;is about.</p>
	<p id="what-does-stdis_within_lifetime-do">
		<strong>What does&nbsp;<code>std::is_within_lifetime</code>&nbsp;do?</strong></p>
	<p>
		C++26 adds&nbsp;<code>bool std::is_within_lifetime(const T* p)</code>&nbsp;to the&nbsp;<code>&lt;type_traits&gt;</code>&nbsp;header. This function checks whether&nbsp;<code>p</code>&nbsp;points to an object that is currently within its lifetime during constant evaluation.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Thu, 19 Mar 2026 19:03:59 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>The cost of a function call &#45;&#45; Daniel Lemire</title>
      <link>https://isocpp.org//blog/2026/03/the-cost-of-a-function-call-daniel-lemire</link>
      <guid>https://isocpp.org//blog/2026/03/the-cost-of-a-function-call-daniel-lemire</guid>
      <description><![CDATA[<p>
	<img alt="Capture-decran-le-2026-02-08-a-15.07.17-825x510.png" src="https://isocpp.org/files/img/Capture-decran-le-2026-02-08-a-15.07.17-825x510.png" style="width: 400px; margin: 10px; float: right;" />Function calls are cheap &mdash; but they are not free &mdash; and in tight loops their cost can dominate your runtime. Modern compilers rely on inlining to remove that overhead and unlock deeper optimizations, sometimes turning an ordinary loop into dramatically faster SIMD code.</p>
<blockquote>
	<h3>
		<a href="https://lemire.me/blog/2026/02/08/the-cost-of-a-function-call/">The cost of a function call</a></h3>
	<p>
		by Daniel Lemire</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		When programming, we chain functions together. Function A calls function B. And so forth.</p>
	<p>
		You do not have to program this way, you could write an entire program using a single function. It would be a fun exercise to write a non-trivial program using a single function&hellip; as long as you delegate the code writing to AI because human beings quickly struggle with long functions.</p>
	<p>
		A key compiler optimization is &lsquo;inlining&rsquo;: the compiler takes your function definition and it tries to substitute it at the call location. It is conceptually quite simple. Consider the following example where the function&nbsp;<code>add3</code>&nbsp;calls the function&nbsp;<code>add</code>.</p>
	<div>
		<pre>
<code>int add(int x, int y) &#123; &#10;     return x + y; &#10;&#125; &#10;int add3(int x, int y, int z) &#123; &#10;     return add(add(x, y), z); &#10;&#125; </code></pre>
	</div>
	<p>
		You can manually inline the call as follows.</p>
	<div>
		<pre>
<code>int add3(int x, int y, int z) &#123; &#10;     return x + y + z; &#10;&#125;</code></pre>
	</div>
</blockquote>
<p>
	&nbsp;</p>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Tue, 17 Mar 2026 18:56:34 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Implementing vector &#45;&#45; Quasar Chunawala</title>
      <link>https://isocpp.org//blog/2026/03/implementing-vectort-quasar-chunawala</link>
      <guid>https://isocpp.org//blog/2026/03/implementing-vectort-quasar-chunawala</guid>
      <description><![CDATA[<p>
	<img alt="logo.png" src="https://isocpp.org/files/img/logo.png" style="width: 225px; margin: 10px; float: right;" />Finding out how to implement features from the standard library can be a useful learning exercise. Quasar Chunawala explores implementing your own version of std::vector.</p>
<blockquote>
	<h3>
		<a href="https://accu.org/journals/overload/34/191/chunawala/">Implementing vector&lt;T&gt;</a></h3>
	<p>
		by Quasar Chunawala</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		The most fundamental STL data-structure is the&nbsp;<code>vector</code>. In this article, I am going to explore writing a custom implementation of the&nbsp;<code>vector</code>&nbsp;data-structure. The standard library implementation&nbsp;<code>std::vector</code>&nbsp;is a work of art, it is extremely efficient at managing memory and has been tested&nbsp;<em>ad nauseam</em>. It is much better, in fact, than a homegrown alternative would be.</p>
	<p>
		Why then write our own custom&nbsp;<code>vector</code>?</p>
	<ul>
		<li>
			Writing a naive implementation is challenging and rewarding. It is a lot of fun!</li>
		<li>
			Coding up these training implementations, thinking about corner cases, getting your code reviewed, revisiting your design is very effective at understanding the inner workings of STL data-structures and writing good C++ code.</li>
		<li>
			Its a good opportunity to learn about low-level memory management algorithms.</li>
	</ul>
	<p>
		We are not aiming for an exhaustive representation or implementation, but we will write test cases for all basic functionalities expected out of a&nbsp;<code>vector</code>-like data-structure.</p>
	<p>
		Informally, a&nbsp;<code>std::vector&lt;T&gt;</code>&nbsp;represents a dynamically allocated array that can grow as needed. As with any array, a&nbsp;<code>std::vector&lt;T&gt;</code>&nbsp;is a sequence of elements of type&nbsp;<code>T</code>&nbsp;arranged contiguously in memory. We will put our homegrown version of&nbsp;<code>vector&lt;T&gt;</code>&nbsp;under the&nbsp;<code>dev</code>&nbsp;namespace.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Wed, 11 Mar 2026 18:54:09 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Flavours of Reflection &#45;&#45; Bernard Teo</title>
      <link>https://isocpp.org//blog/2026/03/flavours-of-reflection-bernard-teo</link>
      <guid>https://isocpp.org//blog/2026/03/flavours-of-reflection-bernard-teo</guid>
      <description><![CDATA[<p>
	Reflection is coming to C++26 and is arguably the most anticipated feature accepted into this version of the standard. With substantial implementation work already done in Clang and GCC, compile-time reflection in C++ is no longer theoretical &mdash; it&rsquo;s right around the corner.</p>
<blockquote>
	<h3>
		<a href="https://semantics.bernardteo.me/2026/01/30/flavours-of-reflection.html">Flavours of Reflection:&nbsp;Comparing C++26 reflection with similar capabilities in other programming languages</a></h3>
	<p>
		by Bernard Teo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Reflection is imminent. It is set to be part of C++26, and it is perhaps the most anticipated feature accepted into this version of the standard. Lots of implementation work has already been done for&nbsp;<a href="https://github.com/bloomberg/clang-p2996/tree/p2996">Clang</a>&nbsp;and&nbsp;<a href="https://gcc.gnu.org/pipermail/gcc-patches/2025-November/700733.html">GCC</a>&nbsp;&mdash; they pretty much already work (both are on Compiler Explorer), and it hopefully won&rsquo;t be too long before they get merged into their respective compilers.</p>
	<p>
		Many programming languages already provide some reflection capabilities, so some people may think that C++ is simply playing catch-up. However, C++&rsquo;s reflection feature does differ in important ways. This blog post explores the existing reflection capabilities of Python, Java, C#, and Rust, comparing them with one another as well as with the flavour of reflection slated for C++26.</p>
	<p>
		In the rest of this blog post, the knowledge of C++ fundamentals is assumed (but not for the other programming languages, where non-commonsensical code will be explained).</p>
	<p id="the-example">
		&nbsp;</p>
</blockquote>
<p>
	&nbsp;</p>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Tue, 03 Mar 2026 18:48:20 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>IIFE for Complex Initialization &#45;&#45; Bartlomiej Filipek</title>
      <link>https://isocpp.org//blog/2026/02/iife-for-complex-initialization-bartlomiej-filipek1</link>
      <guid>https://isocpp.org//blog/2026/02/iife-for-complex-initialization-bartlomiej-filipek1</guid>
      <description><![CDATA[<p>
	<img alt="filipek-iife.png" src="https://isocpp.org/files/img/filipek-iife.png" style="width: 366px; margin: 10px; float: right;" />What do you do when the code for a variable initialization is complicated? Do you move it to another method or write inside the current scope? Bartlomiej Filipek presents a trick that allows computing a value for a variable, even a const variable, with a compact notation.</p>
<blockquote>
	<h3>
		<a href="https://www.cppstories.com/2016/11/iife-for-complex-initialization/">IIFE for Complex Initialization</a></h3>
	<p>
		by Bartlomiej Filipek</p>
</blockquote>
<p>
	In this article:</p>
<blockquote>
	<p>
		I hope you&rsquo;re initializing most variables as&nbsp;<code>const</code>&nbsp;(so that the code is more explicit, and also compiler can reason better about the code and optimize).</p>
	<p>
		For example, it&rsquo;s easy to write:</p>
	<div>
		<pre tabindex="0">
<code data-lang="cpp">const int myParam = inputParam * 10 + 5; </code></pre>
	</div>
	<p>
		or even:</p>
	<div>
		<pre tabindex="0">
<code data-lang="cpp">const int myParam = bCondition ? inputParam*2 : inputParam + 10; </code></pre>
	</div>
	<p>
		But what about complex expressions? When we have to use several lines of code, or when the&nbsp;<code>?</code>&nbsp;operator is not sufficient.</p>
	<p>
		&lsquo;It&rsquo;s easy&rsquo; you say: you can wrap that initialization into a separate function.</p>
	<p>
		While that&rsquo;s the right answer in most cases, I&rsquo;ve noticed that in reality a lot of people write code in the current scope. That forces you to stop using&nbsp;<code>const</code>&nbsp;and code is a bit uglier.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 27 Feb 2026 18:43:58 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>So how do you quickly concatenate strings? &#45;&#45; Aleksandr Orefkov</title>
      <link>https://isocpp.org//blog/2026/02/so-how-do-you-quickly-concatenate-strings-aleksandr-orefkov</link>
      <guid>https://isocpp.org//blog/2026/02/so-how-do-you-quickly-concatenate-strings-aleksandr-orefkov</guid>
      <description><![CDATA[<blockquote>
	<h3>
		<a href="https://orefkov.github.io/simstr/articles/fast_concat.html">So how do you quickly concatenate strings?</a></h3>
</blockquote>
<blockquote>
	<p>
		By Aleksandr Orefkov</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		All practicing programmers have to concatenate strings. Precisely concatenate, we don&rsquo;t have some JavaScript or PHP, in C++ we have this fancy word for it. Programmers in other languages &#8203;&#8203;simply &ldquo;add&rdquo; strings together without much thought, without even thinking about this operation. After all, what could be simpler than</p>
	<pre class="prettyprint lang-cpp">
return "The answer is " + str_answer + ", count is " + count;</pre>
	<p>
		But while it&rsquo;s forgivable for script kiddies not to think about the meaning behind such a simple notation, it&rsquo;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.</p>
	<p>
		What type is str_answer? What type is count? &ldquo;The answer is &ldquo; and &ldquo;, count is &ldquo; - 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&rsquo;s hope so.<br />
		This is the first level of problems for now. And let&rsquo;s say we successfully solved them, creating the following code:</p>
	<pre class="prettyprint lang-cpp">
std::string make_answer(std::string_view str_answer, int count) {&#10;    return "The answer is " + std::string{str_answer}&#10;        + ", count is " + std::to_string(count);&#10;}&#10;</pre>
	<p>
		It sounds like &ldquo;Hurray!&rdquo;, but it&rsquo;s somehow not loud enough&hellip;</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Thu, 19 Feb 2026 20:04:04 +0000</pubDate>
      <dc:creator>AOrefkov</dc:creator>
    </item>

    <item>
      <title>15 Different Ways to Filter Containers in Modern C++ &#45;&#45; Bartłomiej Filipek</title>
      <link>https://isocpp.org//blog/2026/02/15-different-ways-to-filter-containers-in-modern-cpp-bartomiej-filipek1</link>
      <guid>https://isocpp.org//blog/2026/02/15-different-ways-to-filter-containers-in-modern-cpp-bartomiej-filipek1</guid>
      <description><![CDATA[<p>
	<img alt="logo.png" src="https://isocpp.org/files/img/logo.png" style="width: 225px; margin: 10px; float: right;" />Filtering items from a container is a common situation. Bart&#322;omiej Filipek demonstrates various approaches from different versions of C++.</p>
<blockquote>
	<h3>
		<a href="https://accu.org/journals/overload/33/190/filipek/">15 Different Ways to Filter Containers in Modern C++</a></h3>
	<p>
		by Bart&#322;omiej Filipek</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Do you know how many ways we can implement a filter function in C++? While the problem is relatively easy to understand &ndash; take a container, copy elements that match a predicate and the return a new container &ndash; it&rsquo;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&rsquo;s start!</p>
	<p>
		<strong>The problem statement</strong></p>
	<p>
		To be precise by a&nbsp;<em>filter</em>, I mean a function with the following interface:</p>
	<pre>
  auto Filter(const Container&amp; cont,&#10;              UnaryPredicate p) {}</pre>
	<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:</p>
	<pre>
  const std::vector&lt;std::string&gt; vec{&#10;    "Hello", "**txt", "World", "error", "warning",&#10;    "C++", "****" };&#10;  auto filtered = Filter(vec, [](auto&amp; elem) {&#10;    return !elem.starts_with(&#39;*&#39;); });&#10;    // filtered should have "Hello", "World",&#10;    // "error", "warning", "C++"</pre>
	<p>
		Writing such a function can be a good exercise with various options and algorithms in the Standard Library. What&rsquo;s more, our function hides internal things like iterators, so it&rsquo;s more like a range-based version.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Tue, 17 Feb 2026 23:09:00 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Coroutines – A Deep Dive &#45;&#45; Quasar Chunawala</title>
      <link>https://isocpp.org//blog/2026/02/coroutines-a-deep-dive-quasar-chunawala1</link>
      <guid>https://isocpp.org//blog/2026/02/coroutines-a-deep-dive-quasar-chunawala1</guid>
      <description><![CDATA[<p>
	<img alt="logo.png" src="https://isocpp.org/files/img/logo.png" style="width: 225px; margin: 10px; float: right;" />Coroutines are powerful but require some boilerplate code. Quasar Chunawala explains what you need to implement to get coroutines working.</p>
<blockquote>
	<h3>
		<a href="https://accu.org/journals/overload/33/190/chunawala/">Coroutines &ndash; A Deep Dive</a></h3>
	<p>
		by Quasar Chunawala</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Following on from the introduction in the editorial, let&rsquo;s understand the basic mechanics needed to code up a simple coroutine, and I&rsquo;ll show you how to yield from the coroutine and await results.</p>
	<p>
		<strong>The simplest coroutine</strong></p>
	<p>
		The following code is the simplest implementation of a coroutine:</p>
	<pre>
  #include &lt;coroutine&gt;&#10;  void coro_func(){&#10;    co_return;&#10;  }&#10;  int main(){&#10;    coro_func();&#10;  }</pre>
	<p>
		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.</p>
	<table style="width:778px;">
		<tbody>
			<tr>
				<td>
					<pre>
&lt;source&gt;: In function &#39;void coro_func()&#39;:&#10;&lt;source&gt;:4:5: error: unable to find the promise type for this coroutine&#10;    4 |     co_return;&#10;      |     ^~~~~~~~~</pre>
				</td>
			</tr>
			<tr>
				<td>
					&nbsp;</td>
			</tr>
		</tbody>
	</table>
	Looking at C++ reference, we see that the return type of a coroutine must define a type named&nbsp;<code>promise_type</code>. Why do we need a promise? The&nbsp;<code>promise_type</code>&nbsp;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&nbsp;<code>get()</code>&nbsp;member function. The future has the role of the return object.&nbsp;</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 13 Feb 2026 23:06:51 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Concurrency Flavours &#45;&#45; Lucian Radu Teodorescu</title>
      <link>https://isocpp.org//blog/2026/02/concurrency-flavours-lucian-radu-teodorescu1</link>
      <guid>https://isocpp.org//blog/2026/02/concurrency-flavours-lucian-radu-teodorescu1</guid>
      <description><![CDATA[<p>
	<img alt="logo.png" src="https://isocpp.org/files/img/logo.png" style="width: 225px; margin: 10px; float: right;" />Concurrency has many different approaches. Lucian Radu Teodorescu clarifies terms, showing how different approaches solve different problems.</p>
<blockquote>
	<h3>
		<a href="https://accu.org/journals/overload/33/190/teodorescu/">Concurrency Flavours</a></h3>
	<p>
		by Lucian Radu Teodorescu</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Most engineers today use concurrency &ndash; often without a clear understanding of what it is, why it&rsquo;s needed, or which flavour they&rsquo;re dealing with. The vocabulary around concurrency is rich but muddled. Terms like parallelism, multithreading, asynchrony, reactive programming, and structured concurrency are regularly conflated &ndash; even in technical discussions.</p>
	<p>
		This confusion isn&rsquo;t just semantic &ndash; it leads to real-world consequences. If the goal behind using concurrency is unclear, the result is often poor concurrency &ndash; 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 &ndash; it requires understanding what kind of complexity you&rsquo;re introducing, and why.</p>
	<p>
		To help clarify this complexity, the article aims to map out some of the main flavours of concurrency. Rather than defining terms rigidly, we&rsquo;ll explore the motivations behind them &ndash; 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 &ndash; distinguishing between the flavours of concurrency. Our goal is to refine the reader&rsquo;s taste for concurrency.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Wed, 04 Feb 2026 23:03:50 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Exclusive state access, I &#45;&#45; Andrzej Krzemieński</title>
      <link>https://isocpp.org//blog/2026/01/value-semantics-andrzej-krzemieski</link>
      <guid>https://isocpp.org//blog/2026/01/value-semantics-andrzej-krzemieski</guid>
      <description><![CDATA[<p>
	<img alt="krzemienskivaluesemantics.png" src="https://isocpp.org/files/img/krzemienskivaluesemantics.png" style="width: 400px; margin: 10px; float: right;" />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.</p>
<blockquote>
	<h3>
		<a href="https://thecppway.com/posts/value_semantics/">Exclusive state access, I</a></h3>
	<p>
		by Andrzej Krzemie&#324;ski</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		<em>Value semantics</em>&nbsp;is a way of organizing your programs, which C++ supports and endorses. Its key characteristics in a nutshell:</p>
	<ol>
		<li>
			Throughout its lifetime an object (via its type and special member functions) is used to represent a&nbsp;<em>value</em>.</li>
		<li>
			Different parts of the program communicate values via objects. While the value matters, objects themselves (their address, their&nbsp;<code>sizeof</code>) do not.</li>
		<li>
			Object&rsquo;s value is isolated from other objects&rsquo; values.</li>
	</ol>
	<p>
		This begs the question,&nbsp;<em>what is value</em>, but we will not answer it. First, because it is difficult, and maybe impossible. It is pretty clear what value objects of type&nbsp;<code>int</code>&nbsp;represent. It is fairly uncontroversial what value is represented by&nbsp;<code>vector&lt;int&gt;</code>, once we accept that the value representation need not fit into the&nbsp;<code>sizeof</code>&nbsp;of the object, but can spread across other memory locations and resources, and that vector&rsquo;s capacity is not part of this value, even though it is part of its&nbsp;<em>state</em>. But there are things like&nbsp;<code>std::mutex</code>&nbsp;where naming the value is tricky.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Tue, 27 Jan 2026 22:55:53 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Singleton done right in C++ &#45;&#45; Andreas Fertig</title>
      <link>https://isocpp.org//blog/2026/01/singleton-done-right-in-cpp-andreas-fertig</link>
      <guid>https://isocpp.org//blog/2026/01/singleton-done-right-in-cpp-andreas-fertig</guid>
      <description><![CDATA[<p>
	<img alt="andreasfertig.png" src="https://isocpp.org/files/img/andreasfertig.png" style="width: 300px; margin: 10px; float: right; height: 371px;" />In today&#39;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.</p>
<blockquote>
	<h3>
		<a href="https://andreasfertig.com/blog/2026/01/singleton-done-right-in-cpp/">Singleton done right in C++</a></h3>
	<p>
		by Andreas Fertig</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Let&#39;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:</p>
	<p>
		class Logger {<br />
		&nbsp; Logger() = default;</p>
	<p>
		public:<br />
		&nbsp; static Logger&amp; Instance()<br />
		&nbsp; {<br />
		&nbsp;&nbsp;&nbsp; static Logger theOneAndOnlyLogger{};</p>
	<p>
		&nbsp;&nbsp;&nbsp; return theOneAndOnlyLogger;<br />
		&nbsp; }</p>
	<p>
		&nbsp; void Info(std::string_view msg) { std::print("Info: {}", msg); }<br />
		&nbsp; void Error(std::string_view msg) { std::print("Error: {}", msg); }<br />
		};</p>
	<p>
		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.</p>
	<p>
		You&#39;re using such a Logger like this:</p>
	<p>
		Logger::Instance().Info("A test");</p>
</blockquote>
<pre class="prettyprint lang-cpp">
&#10;&#10;</pre>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Wed, 21 Jan 2026 18:21:26 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>2025, A Year of Conferences &#45;&#45; Sandor Dargo</title>
      <link>https://isocpp.org//blog/2026/01/2025-a-year-of-conferences-sandor-dargo</link>
      <guid>https://isocpp.org//blog/2026/01/2025-a-year-of-conferences-sandor-dargo</guid>
      <description><![CDATA[<p>
	<img alt="cpponsea2025-folkestone-to-dover.jpg" src="https://isocpp.org/files/img/cpponsea2025-folkestone-to-dover.jpg" style="width: 400px; margin: 10px; float: right;" />Conferences are never just about the talks &mdash; they&rsquo;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.</p>
<blockquote>
	<h3>
		<a href="https://www.sandordargo.com/blog/2025/12/17/conferences-2025">2025, A Year of Conferences</a></h3>
	<p>
		by Sandor Dargo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		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&rsquo;s not a lot &mdash; I know some speakers do twice as many. But if you ask my family, you&rsquo;d probably get a different (and understandable) answer. For me &mdash; for us &mdash; it&rsquo;s a lot. It&rsquo;s also an honour and a privilege in many ways.</p>
	<p>
		To express my appreciation and gratitude toward the organizers and the community, I do two things:</p>
	<ul>
		<li>
			I try to prepare well for my talks.</li>
		<li>
			I post&nbsp;<a href="https://www.sandordargo.com/tags/tripreport/">trip reports</a>&nbsp;soon after each event &mdash; usually within a week.</li>
	</ul>
	<p>
		Those&nbsp;<a href="https://www.sandordargo.com/tags/tripreport/">trip reports</a>&nbsp;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 &mdash; and that&rsquo;s what this one wanted to be originally.</p>
	<p>
		At one of the social dinners at CppCon, a developer working for a FAANG company in New York asked me which conference I&rsquo;d recommend. My answer: it depends on your goals &mdash; and your budget and constraints.</p>
	<p>
		&nbsp;</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 09 Jan 2026 17:33:55 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>A Guest Editorial &#45;&#45; Quasar Chunawala, Frances Buontempo</title>
      <link>https://isocpp.org//blog/2026/01/a-guest-editorial-quasar-chunawala-frances-buontempo</link>
      <guid>https://isocpp.org//blog/2026/01/a-guest-editorial-quasar-chunawala-frances-buontempo</guid>
      <description><![CDATA[<p>
	<img alt="2025-12-19_10-30-29.png" src="https://isocpp.org/files/img/2025-12-19_10-30-29.png" style="width: 241px; margin: 10px; float: right;" />C++20 introduced coroutines. Quasar Chunawala, our guest editor for this edition, gives an overview.</p>
<blockquote>
	<h3>
		<a href="https://accu.org/journals/overload/33/190/chunawala-buontempo/">A Guest Editorial</a></h3>
	<p>
		by Quasar Chunawala, Frances Buontempo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		You&rsquo;ve likely heard about this new C++20 feature,&nbsp;coroutines. I think that this is a really important subject and there are several cool use-cases for coroutines. A&nbsp;coroutine&nbsp;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.</p>
	<p>
		Coroutines can simplify our code! Coroutines are a great tool, when it comes to implementing parsers.</p>
	<p>
		<strong>The coroutine return type</strong></p>
	<p>
		The initial call to the coroutine function will produce a return object of a certain&nbsp;<code>ReturnType</code>&nbsp;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&rsquo;s doing, the first thing you should look at is the&nbsp;<code>ReturnType</code>, and what it&rsquo;s interface is. The important thing here is, we design this&nbsp;<code>ReturnType</code>. If you are writing a coroutine, you can decide what goes into this interface.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Wed, 07 Jan 2026 17:29:04 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>15 Different Ways to Filter Containers in Modern C++ &#45;&#45; Bartłomiej Filipek</title>
      <link>https://isocpp.org//blog/2026/01/15-different-ways-to-filter-containers-in-modern-cpp-bartomiej-filipek</link>
      <guid>https://isocpp.org//blog/2026/01/15-different-ways-to-filter-containers-in-modern-cpp-bartomiej-filipek</guid>
      <description><![CDATA[<p>
	<img alt="logo.png" src="https://isocpp.org/files/img/logo.png" style="width: 225px; margin: 10px; float: right;" />Filtering items from a container is a common situation. Bart&#322;omiej Filipek demonstrates various approaches from different versions of C++.</p>
<blockquote>
	<h3>
		<a href="https://accu.org/journals/overload/33/190/filipek/">15 Different Ways to Filter Containers in Modern C++</a></h3>
	<p>
		by Bart&#322;omiej Filipek</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Do you know how many ways we can implement a filter function in C++? While the problem is relatively easy to understand &ndash; take a container, copy elements that match a predicate and the return a new container &ndash; it&rsquo;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&rsquo;s start!</p>
	<p>
		<strong>The problem statement</strong></p>
	<p>
		To be precise by a&nbsp;<em>filter</em>, I mean a function with the following interface:</p>
	<pre>
  auto Filter(const Container&amp; cont,&#10;              UnaryPredicate p) {}</pre>
	<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:</p>
	<pre>
  const std::vector&lt;std::string&gt; vec{&#10;    "Hello", "**txt", "World", "error", "warning",&#10;    "C++", "****" };&#10;  auto filtered = Filter(vec, [](auto&amp; elem) {&#10;    return !elem.starts_with(&#39;*&#39;); });&#10;    // filtered should have "Hello", "World",&#10;    // "error", "warning", "C++"</pre>
	<p>
		Writing such a function can be a good exercise with various options and algorithms in the Standard Library. What&rsquo;s more, our function hides internal things like iterators, so it&rsquo;s more like a range-based version.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Mon, 05 Jan 2026 17:26:51 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Time in C++: std::chrono::high_resolution_clock:  Myths and Realities &#45;&#45; Sandor Dargo</title>
      <link>https://isocpp.org//blog/2026/01/time-in-cpp-stdchronohigh-resolution-clock-myths-and-realities-sandor-dargo</link>
      <guid>https://isocpp.org//blog/2026/01/time-in-cpp-stdchronohigh-resolution-clock-myths-and-realities-sandor-dargo</guid>
      <description><![CDATA[<p>
	<img alt="SANDOR_DARGO_ROUND.JPG" src="https://isocpp.org/files/img/SANDOR_DARGO_ROUND.JPG" style="width: 200px; margin: 10px; float: right; height: 204px;" />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&rsquo;ll demystify what &ldquo;high resolution&rdquo; really means in &lt;chrono&gt;, why this clock is often just an alias, and when&mdash;if ever&mdash;it&rsquo;s actually the right tool to use.</p>
<blockquote>
	<h3>
		<a href="https://www.sandordargo.com/blog/2025/12/10/clocks-part-4-high_resolution_clock">Time in C++: std::chrono::high_resolution_clock - Myths and Realities</a></h3>
	<p>
		by Sandor Dargo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		If there&rsquo;s one clock in&nbsp;<code>&lt;chrono&gt;</code>&nbsp;that causes the most confusion, it&rsquo;s&nbsp;<code>std::chrono::high_resolution_clock</code>. The name sounds too tempting &mdash; who wouldn&rsquo;t want &ldquo;the highest resolution&rdquo;? But like many things in C++, the details matter.</p>
	<p>
		In the earlier parts of this series, we looked at&nbsp;<a href="https://www.sandordargo.com/blog/2025/11/26/clocks-part-2-system_clock"><code>system_clock</code>&nbsp;as the wall-clock time source</a>, and at&nbsp;<a href="https://www.sandordargo.com/blog/2025/12/03/clocks-part-3-steady_clock"><code>steady_clock</code>&nbsp;as the reliable choice for measuring intervals</a>. This time, we&rsquo;ll tackle the so-called &ldquo;high-resolution&rdquo; clock, separate fact from myth, and see why it&rsquo;s not always the right choice &mdash; even when you think you need precision.</p>
	<p id="what-high-resolution-actually-means">
		<strong>What &ldquo;high resolution&rdquo; actually means</strong></p>
	<p>
		A clock&rsquo;s resolution (or precision) is the granularity of its tick period &mdash; i.e., the smallest representable step in time for that clock&rsquo;s&nbsp;<code>time_point</code>. In&nbsp;<code>&lt;chrono&gt;</code>&nbsp;it&rsquo;s exposed via&nbsp;<code>Clock::period</code>, a&nbsp;<code>std::ratio</code>.</p>
	<p>
		Notice an important difference. I didn&rsquo;t mention accuracy, only precision. A clock might represent nanoseconds, but still be inaccurate due to hardware or OS scheduling. A higher resolution doesn&rsquo;t necessarily mean better measurement. For timing, stability and monotonicity matter much more than how fine-grained the tick is.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 02 Jan 2026 17:22:21 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Coroutines – A Deep Dive &#45;&#45; Quasar Chunawala</title>
      <link>https://isocpp.org//blog/2025/12/coroutines-a-deep-dive-quasar-chunawala</link>
      <guid>https://isocpp.org//blog/2025/12/coroutines-a-deep-dive-quasar-chunawala</guid>
      <description><![CDATA[<p>
	<img alt="logo.png" src="https://isocpp.org/files/img/logo.png" style="width: 225px; margin: 10px; float: right;" />Coroutines are powerful but require some boilerplate code. Quasar Chunawala explains what you need to implement to get coroutines working.</p>
<blockquote>
	<h3>
		<a href="https://accu.org/journals/overload/33/190/chunawala/">Coroutines &ndash; A Deep Dive</a></h3>
	<p>
		by Quasar Chunawala</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		The following code is the simplest implementation of a coroutine:</p>
	<pre>
  #include &lt;coroutine&gt;&#10;  void coro_func(){&#10;    co_return;&#10;  }&#10;  int main(){&#10;    coro_func();&#10;  }</pre>
	<p>
		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.</p>
	<table style="width:945px;">
		<tbody>
			<tr>
				<td>
					<pre>
&lt;source&gt;: In function &#39;void coro_func()&#39;:&#10;&lt;source&gt;:4:5: error: unable to find the promise type for this coroutine&#10;    4 |     co_return;&#10;      |     ^~~~~~~~~</pre>
				</td>
			</tr>
			<tr>
				<td style="text-align: center;">
					<em>Figure 1</em></td>
			</tr>
		</tbody>
	</table>
	<p>
		Looking at C++ reference, we see that the return type of a coroutine must define a type named&nbsp;<code>promise_type</code>.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Tue, 30 Dec 2025 17:18:45 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Concurrency Flavours &#45;&#45; Lucian Radu Teodorescu</title>
      <link>https://isocpp.org//blog/2025/12/concurrency-flavours-lucian-radu-teodorescu</link>
      <guid>https://isocpp.org//blog/2025/12/concurrency-flavours-lucian-radu-teodorescu</guid>
      <description><![CDATA[<p>
	<img alt="logo.png" src="https://isocpp.org/files/img/logo.png" style="width: 225px; margin: 10px; float: right;" />Concurrency has many different approaches. Lucian Radu Teodorescu clarifies terms, showing how different approaches solve different problems.</p>
<blockquote>
	<h3>
		<a href="https://accu.org/journals/overload/33/190/teodorescu/">Concurrency Flavours</a></h3>
	<p>
		by Lucian Radu Teodorescu</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Most engineers today use concurrency &ndash; often without a clear understanding of what it is, why it&rsquo;s needed, or which flavour they&rsquo;re dealing with. The vocabulary around concurrency is rich but muddled. Terms like parallelism, multithreading, asynchrony, reactive programming, and structured concurrency are regularly conflated &ndash; even in technical discussions.</p>
	<p>
		This confusion isn&rsquo;t just semantic &ndash; it leads to real-world consequences. If the goal behind using concurrency is unclear, the result is often poor concurrency &ndash; 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 &ndash; it requires understanding what kind of complexity you&rsquo;re introducing, and why.</p>
	<p>
		To help clarify this complexity, the article aims to map out some of the main flavours of concurrency. Rather than defining terms rigidly, we&rsquo;ll explore the motivations behind them &ndash; 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 &ndash; distinguishing between the flavours of concurrency. Our goal is to refine the reader&rsquo;s taste for concurrency.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 26 Dec 2025 17:15:02 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Finding the Next Code Point in Unicode Strings &#45;&#45; Giovanni Dicanio</title>
      <link>https://isocpp.org//blog/2025/12/finding-the-next-code-point-in-unicode-strings-giovanni-dicanio</link>
      <guid>https://isocpp.org//blog/2025/12/finding-the-next-code-point-in-unicode-strings-giovanni-dicanio</guid>
      <description><![CDATA[<p>
	With ASCII, it&#39;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?</p>
<blockquote>
	<h3>
		<a href="https://giodicanio.com/2025/11/03/finding-the-next-unicode-code-point-in-strings-utf-8-vs-utf-16/">Finding the Next Unicode Code Point in Strings: UTF-8 vs. UTF-16</a></h3>
</blockquote>
<blockquote>
	<p>
		by Giovanni Dicanio</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		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.</p>
	<p>
		(...) The functions have the following prototypes:</p>
</blockquote>
<blockquote>
	<pre class="prettyprint lang-cpp">
// Returns the next Unicode code point and number of bytes consumed.&#10;// Throws std::out_of_range if index is out of bounds or string ends prematurely.&#10;// Throws std::invalid_argument on invalid UTF-8 sequence.&#10;[[nodiscard]] std::pair&lt;char32_t, size_t&gt; NextCodePointUtf8(&#10;    const std::string&amp; str,&#10;    size_t index&#10;);&#10;&#10;// Returns the next Unicode code point and the number of UTF-16 code units consumed.&#10;// Throws std::out_of_range if index is out of bounds or string ends prematurely.&#10;// Throws std::invalid_argument on invalid UTF-16 sequence.&#10;[[nodiscard]] std::pair&lt;char32_t, size_t&gt; NextCodePointUtf16(&#10;    const std::wstring&amp; input,&#10;    size_t index&#10;);</pre>
</blockquote>
<p>
	&nbsp;</p>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Wed, 24 Dec 2025 22:13:31 +0000</pubDate>
      <dc:creator>Giovanni Dicanio</dc:creator>
    </item>

    <item>
      <title>Hardening the C++ Standard Library at massive scale &#45;&#45; Dionne, Rebert, Shavrick, and Varlamov</title>
      <link>https://isocpp.org//blog/2025/12/hardening-the-cpp-standard-library-at-massive-scale-dionne-rebert-shavrick</link>
      <guid>https://isocpp.org//blog/2025/12/hardening-the-cpp-standard-library-at-massive-scale-dionne-rebert-shavrick</guid>
      <description><![CDATA[<p>
	<img alt="acmqueue_logo.gif" src="https://isocpp.org/files/img/acmqueue_logo.gif" style="width: 160px; margin: 10px; float: right;" />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&mdash;specifically LLVM&rsquo;s libc++&mdash;can deliver meaningful security and reliability gains at massive scale with minimal performance overhead.</p>
<blockquote>
	<h3>
		<a href="https://queue.acm.org/detail.cfm?id=3773097">Practical Security in Production: Hardening the C++ Standard Library at massive scale</a></h3>
	<p>
		by Louis Dionne, Alex Rebert, Max Shavrick, and Konstantin Varlamov</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Over the past few years there has been a lot of talk about memory-safety vulnerabilities, and rightly so&mdash;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.</p>
	<p>
		In 2019, Alex Gaynor, a security expert and one of the leading voices in memory safety, wrote a piece titled "<a href="https://alexgaynor.net/2019/apr/21/modern-c++-wont-save-us/">Modern C++ Won&#39;t Save Us</a>," where he gave examples of foundational types such as&nbsp;<code>std::optional</code>&nbsp;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&nbsp;<code>std::optional</code>&nbsp;type isn&#39;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.</p>
	<p>
		So, what&#39;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&mdash;<em>and if they&#39;re not safe</em>,<em>&nbsp;it will be tough to build safety around them</em>. The&nbsp;<code>std::optional</code>&nbsp;type is only one of many vocabulary types in the C++ Standard Library that aren&#39;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&#39;s libc++.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Wed, 24 Dec 2025 17:12:04 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Qt acquires I.A.R.</title>
      <link>https://isocpp.org//blog/2025/12/qt-acquires-iar</link>
      <guid>https://isocpp.org//blog/2025/12/qt-acquires-iar</guid>
      <description><![CDATA[<blockquote>
	<h3>
		<a href="https://www.qt.io/stock/qt-completes-the-recommended-public-cash-offer-to-the-shareholders-of-iar-systems-group-1760351460000-3668995">Qt completes the recommended public cash offer to the shareholders of I.A.R. Systems Group</a></h3>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		On 4 July 2025, Qt Group Plc&#39;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.</p>
	<p>
		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]</p>
	<p>
		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.</p>
	<p>
		&nbsp;</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Tue, 23 Dec 2025 22:09:02 +0000</pubDate>
      <dc:creator>Ville Voutilainen</dc:creator>
    </item>

    <item>
      <title>Event&#45;driven flows &#45;&#45; Andrzej Krzemieński</title>
      <link>https://isocpp.org//blog/2025/12/event-driven-flows-andrzej-krzemieski</link>
      <guid>https://isocpp.org//blog/2025/12/event-driven-flows-andrzej-krzemieski</guid>
      <description><![CDATA[<p>
	<img alt="2025-12-19_10-06-35.png" src="https://isocpp.org/files/img/2025-12-19_10-06-35.png" style="width: 400px; margin: 10px; float: right;" />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.</p>
<blockquote>
	<h3>
		<a href="https://akrzemi1.wordpress.com/2025/11/16/event-driven-flows/">Event-driven flows</a></h3>
	<p>
		by Andrzej Krzemie&#324;ski</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		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&nbsp;<em>associate</em>&nbsp;it with the indicated signal:<br />
		<br />
		<code>signal</code><code>(SIGINT, on_interrupt);</code></p>
	<div>
		<div style="clear:both;">
			&nbsp;</div>
	</div>
	<p>
		After having performed this association, we move on to doing other things. It is the&nbsp;<em>implementation</em>&nbsp;(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:</p>
	<p>
		<a href="https://akrzemi1.wordpress.com/wp-content/uploads/2025/11/event.png"><img alt="" data-attachment-id="10589" data-comments-opened="1" data-image-caption="" data-image-description="" data-image-meta="{" data-image-title="event" data-large-file="https://akrzemi1.wordpress.com/wp-content/uploads/2025/11/event.png?w=406" data-medium-file="https://akrzemi1.wordpress.com/wp-content/uploads/2025/11/event.png?w=300" data-orig-file="https://akrzemi1.wordpress.com/wp-content/uploads/2025/11/event.png" data-orig-size="406,285" data-permalink="https://akrzemi1.wordpress.com/2025/11/16/event-driven-flows/event/" height="211" sizes="(max-width: 300px) 100vw, 300px" src="https://akrzemi1.wordpress.com/wp-content/uploads/2025/11/event.png?w=300" srcset="https://akrzemi1.wordpress.com/wp-content/uploads/2025/11/event.png?w=300 300w, https://akrzemi1.wordpress.com/wp-content/uploads/2025/11/event.png?w=150 150w, https://akrzemi1.wordpress.com/wp-content/uploads/2025/11/event.png 406w" style="border:none;vertical-align:baseline;height:auto;" width="300" /></a></p>
</blockquote>
<p>
	&nbsp;</p>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Mon, 22 Dec 2025 17:07:36 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Converting Between Unicode UTF&#45;16 and UTF&#45;8 in Windows C++ Code &#45;&#45; Giovanni Dicanio</title>
      <link>https://isocpp.org//blog/2025/12/converting-between-unicode-utf-16-and-utf-8-in-windows-cpp-code-giovanni-di</link>
      <guid>https://isocpp.org//blog/2025/12/converting-between-unicode-utf-16-and-utf-8-in-windows-cpp-code-giovanni-di</guid>
      <description><![CDATA[<p>
	Very often the need arises in Windows C++ programming to convert text between Unicode UTF-16 (which historically has been the <em>native</em> Unicode encoding used by Windows APIs) and UTF-8 (which is the <em>de facto</em> standard for sending text across the Internet and exchanging text between different platforms).</p>
<blockquote>
	<h3>
		<a href="https://giodicanio.com/2025/10/27/converting-between-unicode-utf-16-and-utf-8-in-windows-c-plus-plus-code/">Converting Between Unicode UTF-16 and UTF-8 in Windows C++ Code</a></h3>
</blockquote>
<blockquote>
	<p>
		by Giovanni Dicanio</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		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.</p>
	<p>
		&nbsp;</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 19 Dec 2025 22:13:42 +0000</pubDate>
      <dc:creator>Giovanni Dicanio</dc:creator>
    </item>

    <item>
      <title>C++ Standard Evolution Viewer &#45;&#45; Jason Turner</title>
      <link>https://isocpp.org//blog/2025/12/cpp-standard-evolution-viewer-jason-turner</link>
      <guid>https://isocpp.org//blog/2025/12/cpp-standard-evolution-viewer-jason-turner</guid>
      <description><![CDATA[<p>
	E<img alt="Depositphotos_193487310_L.jpg" src="https://isocpp.org/files/img/Depositphotos_193487310_L.jpg" style="width: 200px; margin: 10px; float: right; height: 211px;" />xplore how the C++ standard evolved across versions with interactive side-by-side diffs</p>
<blockquote>
	<h3>
		<a href="https://cppevo.dev/">C++ Standard Evolution Viewer</a></h3>
	<p>
		by Jason Turner</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		This site provides an interactive way to explore changes in the C++ standard by viewing side-by-side diffs of individual sections (identified by stable names like&nbsp;<code>[array]</code>,&nbsp;<code>[class.copy]</code>,&nbsp;<code>[ranges.adaptors]</code>).</p>
	<p>
		Each version transition below focuses on&nbsp;<strong>Tier 1 sections</strong>&nbsp;(major library components and language features) to provide the most educational value.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 19 Dec 2025 13:59:37 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Structured iteration &#45;&#45; Andrzej Krzemieński</title>
      <link>https://isocpp.org//blog/2025/12/structured-iteration</link>
      <guid>https://isocpp.org//blog/2025/12/structured-iteration</guid>
      <description><![CDATA[<p>
	It is relatively easy to get your <code>for</code>-loops wrong. Luckily, C++ offers more and more bug-proof alternatives.</p>
<blockquote>
	<h3>
		<a href="https://thecppway.com/posts/structured_iteration/">Structured iteration</a></h3>
</blockquote>
<blockquote>
	<p>
		by Andrzej Krzemie&#324;ski</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		These problems do not occur when you use the range-based for-loop.</p>
	<p>
		This C++11 addition, apart from other conveniences, is a safety feature (as in language-safety): it is very hard to use it incorrectly. It is not flexible, or versatile. You have to pass it a range, you have to give a name to an element referenced in each iteration step. There is no "control variable" (like i), so you cannot get the operations on it wrong. A number of bugs are prevented simply by employing a range-based loop.</p>
	<p>
		But what if my iteration is more complicated? What if I need to visit my elements in reverse?</p>
	<p>
		&nbsp;</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Mon, 15 Dec 2025 22:45:11 +0000</pubDate>
      <dc:creator>Andrzej Krzemienski</dc:creator>
    </item>

    <item>
      <title>Trip report: Meeting C++ 2025 &#45;&#45; Sandor Dargo</title>
      <link>https://isocpp.org//blog/2025/12/trip-report-meeting-cpp-2025-sandor-dargo</link>
      <guid>https://isocpp.org//blog/2025/12/trip-report-meeting-cpp-2025-sandor-dargo</guid>
      <description><![CDATA[<p>
	<img alt="cippi-me-meeting-cpp2025.JPG" src="https://isocpp.org/files/img/cippi-me-meeting-cpp2025.JPG" style="width: 300px; margin: 10px; float: right; height: 400px;" />What a year I had! One more conference, one more trip report! I had the chance to go to Meeting C++ and give not just one but two talks!</p>
<blockquote>
	<h3>
		<a href="https://www.sandordargo.com/blog/2025/11/12/trip-report-meeting-cpp-2025">Trip report: Meeting C++ 2025</a></h3>
	<p>
		by Sandor Dargo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		I remember that last year I said that Berlin in November is the perfect place to have a conference because you want to be inside that four-star hotel and not outside. This year, the conference was held a week earlier, and the weather was so nice that it was actually tempting to go out and explore.</p>
	<p>
		But people resisted the temptation. The lineup and content were very strong &mdash; this year there were more than 50 talks across 5 different tracks. Also, Meeting C++ is a fully hybrid conference, so you can join any talk online as well.</p>
	<p>
		It might sound funny, but I must mention that the food is just great at Meeting C++. It&rsquo;s probably the conference with the best catering I&rsquo;ve ever been to &mdash; from lunch to coffee breaks, everything was top-notch.</p>
	<p>
		This year, there were no evening programs. I&rsquo;m not complaining; it&rsquo;s both a pity and a blessing, and I&rsquo;m not sure how I feel about it. For example, when I first attended C++ On Sea, there were no evening events, and I really enjoyed discovering Folkestone in the evenings. Over the years, the schedule there got extended, and sometimes I had no time to visit my favorite places. But at least some socializing was guaranteed. One can say that you can do it on your own, but many of us are introverted, and if we&rsquo;re not forced to socialize, we just won&rsquo;t. That&rsquo;s even easier to avoid in a big city like Berlin. I remember that last year I didn&rsquo;t have time to go out until the end of the conference. It was different this year.</p>
	<p>
		But let&rsquo;s talk about the talks.</p>
	<p>
		<strong>My three favourite talks</strong><br />
		<br />
		Let me share with you the three talks I liked the most. They are listed in chronological order...</p>
</blockquote>
<p>
	&nbsp;</p>]]></description>
      <dc:subject><![CDATA[News, Articles & Books, Events,]]></dc:subject>
      <pubDate>Tue, 09 Dec 2025 22:37:00 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>C++ Enum Class and Error Codes &#45;&#45;  Mathieu Ropert</title>
      <link>https://isocpp.org//blog/2025/12/cpp-enum-class-and-error-codes-mathieu-ropert</link>
      <guid>https://isocpp.org//blog/2025/12/cpp-enum-class-and-error-codes-mathieu-ropert</guid>
      <description><![CDATA[<p>
	<img alt="Me.jpg" src="https://isocpp.org/files/img/Me.jpg" style="width: 200px; margin: 10px; float: right; height: 200px;" />C++11 gave us&nbsp;<code>enum class</code>&nbsp;and while it&rsquo;s great to have scoped enums I don&rsquo;t find it great for error handling. Let&rsquo;s talk about why.</p>
<blockquote>
	<h3>
		<a href="https://mropert.github.io/2025/11/11/enum_class_error_codes/">C++ Enum Class and Error Codes</a></h3>
	<p>
		by Mathieu Ropert</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Most of my readers, I hope, have been able to use C++11 for a while now (if not hello, I&rsquo;m sorry the world has changed to become this weird during your 14 years sleep). With it came a small change that allowed for better scoping of names without resorting to weird quirks:&nbsp;<code>enum class</code>. The idea is simple: owing to C,&nbsp;<code>enum</code>&nbsp;values in C++ belong to the class or namespace they are declared in but if we add the&nbsp;<code>class</code>&nbsp;keyword to the declaration they know become their own scope instead of leaking to their parent.</p>
	<p>
		This was a simple quality of life change in the compiler to address a weakness in the language that folks usually worked around by either adding long prefix to the enum values (C style) or wrapping them within structs or classes (C++98/03 style). And with it came the incentive to migrate C era error code enums to scoped enums. But there&rsquo;s a catch.</p>
</blockquote>
<p>
	&nbsp;</p>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 05 Dec 2025 22:34:37 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Trip report: Budapest C++ &#45; Breaking &amp;amp; Building C++ &#45;&#45; Sandor Dargo</title>
      <link>https://isocpp.org//blog/2025/12/trip-report-budapest-cpp-breaking-building-c-sandor-dargo</link>
      <guid>https://isocpp.org//blog/2025/12/trip-report-budapest-cpp-breaking-building-c-sandor-dargo</guid>
      <description><![CDATA[<p>
	<img alt="c++meetup_1022.jpeg" src="https://isocpp.org/files/img/c++meetup_1022.jpeg" style="width: 400px; margin: 10px; float: right;" />The Budapest C++ Meetup was a great reminder of how strong and curious our local community is. Each talk approached the language from a different angle &mdash; Jonathan M&uuml;ller from the perspective of performance, mine from design and type safety, and Marcell Juh&aacute;sz from security &mdash; yet all shared the same core message: understand what C++ gives you and use it wisely.</p>
<blockquote>
	<h3>
		<a href="https://www.sandordargo.com/blog/2025/10/22/trip-report-budapest-cpp">Trip report: Budapest C++ - Breaking &amp; Building C++</a></h3>
	<p>
		by Sandor Dargo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		More than a hundred people registered, and the room quickly filled up with local developers eager to hear three technical talks. The atmosphere was lively and welcoming &mdash; it showed the strength of the C++ community in Budapest. In 2027, even WG21 might come to Hungary!</p>
	<p>
		The evening began with Jonathan M&uuml;ller&rsquo;s talk, Cache-Friendly C++, followed by my own session on Strongly Typed Containers. Finally, Marcell Juh&aacute;sz closed the event with an insightful and hands-on presentation on Hacking and Securing C++.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books, Events,]]></dc:subject>
      <pubDate>Wed, 03 Dec 2025 22:31:10 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Speeding up C++ functions with a thread_local cache &#45;&#45; Daniel Lemire</title>
      <link>https://isocpp.org//blog/2025/12/speeding-up-cpp-functions-with-a-thread-local-cache-daniel-lemire</link>
      <guid>https://isocpp.org//blog/2025/12/speeding-up-cpp-functions-with-a-thread-local-cache-daniel-lemire</guid>
      <description><![CDATA[<p>
	<img alt="9af1530f-1aca-4fbc-8796-ff74a1a8b544-784x510.jpg" src="https://isocpp.org/files/img/9af1530f-1aca-4fbc-8796-ff74a1a8b544-784x510.jpg" style="width: 300px; margin: 10px; float: right; height: 195px;" />When working with legacy or rigid codebases, performance bottlenecks can emerge from designs you can&rsquo;t easily change&mdash;like interfaces that force inefficient map access by index. This article explores how a simple <strong data-end="236" data-start="212"><code data-end="228" data-is-only-node="" data-start="214">thread_local</code> cache</strong> can dramatically improve performance in such cases, reducing repeated lookups from quadratic to near-constant time.</p>
<blockquote>
	<h3>
		<a href="https://lemire.me/blog/2025/10/19/speeding-up-c-functions-with-a-thread_local-cache/">Speeding up C++ functions with a thread_local cache</a></h3>
	<p>
		by Daniel Lemire</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		In large code bases, we are often stuck with unpleasant designs that are harming our performance. We might be looking for a non-intrusive method to improve the performance. For example, you may not want to change the function signatures.</p>
	<p>
		Let us consider a concrete example. Maybe someone designed the programming interface so that you have to access the values from a map using an index.&nbsp;</p>
	<p>
		&nbsp;</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Mon, 01 Dec 2025 22:26:49 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Using RAII to remedy defect where not all code paths performed required exit actions &#45;&#45; Raymond Chen</title>
      <link>https://isocpp.org//blog/2025/11/using-raii-to-remedy-defect-where-not-all-code-paths-performed-required-exi</link>
      <guid>https://isocpp.org//blog/2025/11/using-raii-to-remedy-defect-where-not-all-code-paths-performed-required-exi</guid>
      <description><![CDATA[<p>
	<img alt="RaymondChen_5in-150x150.jpg" src="https://isocpp.org/files/img/RaymondChen_5in-150x150.jpg" style="width: 150px; margin: 10px; float: right;" />A missing <code data-end="23" data-start="10">DismissUI()</code> call on one code path led to a subtle bug&mdash;but rather than patching it with more try/catch and return logic, there&rsquo;s a cleaner C++ solution. This article shows how to use <strong data-end="224" data-start="194">RAII and <code data-end="222" data-start="205">wil::scope_exit</code></strong> to guarantee cleanup across all code paths, even in asynchronous callbacks.</p>
<blockquote>
	<h3>
		<a href="https://devblogs.microsoft.com/oldnewthing/20251016-00/?p=111691">Using RAII to remedy a defect where not all code paths performed required exit actions</a></h3>
	<p>
		by Raymond Chen</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		A team asked me to review their pull request that fixed a bug that was caused by failing to perform some required action along all code paths. Here&rsquo;s a simplified sketch:</p>
	<pre tabindex="0">
void MySpecialFeature::OnButtonClick()&#10;{&#10;    try {&#10;        auto file = PickFile();&#10;        if (!file) {&#10;            DismissUI();&#10;            return;&#10;        }&#10;&#10;        if (ConfirmAction()) {&#10;            if (m_useAlgorithm1) {&#10;                // StartAlgorithm1 invokes the lambda when finished.&#10;                StartAlgorithm1(file, [self = shared_from_this()] {&#10;                    self-&gt;DismissUI();&#10;                });&#10;            } else {&#10;                RunAlgorithm2(file);&#10;                DismissUI();&#10;            }&#10;        } else { // this block was missing&#10;        &nbsp;  DismissUI(); &#10;        } &#10;    } catch (...) {&#10;        DismissUI();&#10;    }&#10;}</pre>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 28 Nov 2025 22:23:19 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Open wide: Inspecting LLVM 21 with static analysis</title>
      <link>https://isocpp.org//blog/2025/11/open-wide-inspecting-llvm-21-with-static-analysis</link>
      <guid>https://isocpp.org//blog/2025/11/open-wide-inspecting-llvm-21-with-static-analysis</guid>
      <description><![CDATA[<p>
	It has been over a year since the last check of the LLVM project with PVS-Studio, and in that time, two releases have come out. So, it&#39;s a good time to get back and analyze the fresh LLVM 21.</p>
<blockquote>
	<h3>
		<a href="https://pvs-studio.com/en/blog/posts/cpp/1318/?utm_source=firefly&amp;utm_medium=isocpp">Open wide: Inspecting LLVM 21 with static analysis</a></h3>
	<p>
		by&nbsp;Nikita Terentev</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		As we can see, error logging will never be executed, and, moreover, execution will always continue with potentially incorrect behavior.&nbsp;Here&#39;s what git blame reports: the code celebrates its tenth anniversary in November. One might think its meaning had changed over time. But no, history confirms that Defs has always been DenseMap, and its count function only returned 0 or 1 back then. If we search for other similar checks, we see that the count result is used as a binary value everywhere.</p>
</blockquote>
<p>
	&nbsp;</p>]]></description>
      <dc:subject><![CDATA[Articles & Books,]]></dc:subject>
      <pubDate>Fri, 28 Nov 2025 12:55:01 +0000</pubDate>
      <dc:creator>Andrey Karpov</dc:creator>
    </item>

    <item>
      <title>How to Iterate through std::tuple: C++26 Packs and Expansion Statements &#45;&#45; Bartlomiej Filipek</title>
      <link>https://isocpp.org//blog/2025/11/how-to-iterate-through-stdtuple-cpp26-packs-and-expansion-statements-bartlo</link>
      <guid>https://isocpp.org//blog/2025/11/how-to-iterate-through-stdtuple-cpp26-packs-and-expansion-statements-bartlo</guid>
      <description><![CDATA[<p>
	<img alt="filipek-howtoiterate.png" src="https://isocpp.org/files/img/filipek-howtoiterate.png" style="width: 371px; margin: 10px; float: right;" />In this final part of the tuple-iteration mini-series, we move beyond C++20 and C++23 techniques to explore how <strong data-end="121" data-start="112">C++26</strong> finally brings first-class language support for compile-time iteration. With <strong data-end="235" data-start="199">structured binding packs (P1061)</strong> and <strong data-end="272" data-start="240">expansion statements (P1306)</strong>, what once required clever template tricks can now be written in clean, expressive, modern C++.</p>
<blockquote>
	<h3>
		<a href="https://www.cppstories.com/2025/tuple-iteration-cpp26/">C++ Templates: How to Iterate through std::tuple: C++26 Packs and Expansion Statements</a></h3>
	<p>
		by&nbsp;Bartlomiej Filipek</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		In&nbsp;<a href="https://www.cppstories.com/2022/tuple-iteration-basics/">part 1</a>&nbsp;of this mini-series, we looked at the basics of iterating over a&nbsp;<code>std::tuple</code>&nbsp;using&nbsp;<code>index_sequence</code>&nbsp;and fold expressions. In&nbsp;<a href="https://www.cppstories.com/2022/tuple-iteration-apply/">part 2</a>, we simplified things with&nbsp;<code>std::apply</code>&nbsp;and even created helpers like&nbsp;<code>for_each_tuple</code>&nbsp;and&nbsp;<code>transform_tuple</code>.</p>
	<p>
		So far, we used C++ features up to C++20/23&hellip; but now, in C++26, we finally get language-level tools that make tuple iteration straightforward and expressive. In this article, we&rsquo;ll explore two new techniques:</p>
	<ul>
		<li>
			Structured bindings can introduce a pack -&nbsp;<a href="https://wg21.link/P1061R10">P1061</a>&nbsp;- turn a tuple into a pack of variables.</li>
		<li>
			Expansion statements&nbsp;<a href="https://wg21.link/p1306">P1306</a>&nbsp;- the ultimate &ldquo;compile-time loop&rdquo; syntax.</li>
	</ul>
</blockquote>
<p>
	&nbsp;</p>]]></description>
      <dc:subject><![CDATA[News, Articles & Books, Events,]]></dc:subject>
      <pubDate>Tue, 25 Nov 2025 21:55:16 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Concept&#45;Based Generic Programming &#45;&#45; Bjarne Stroustrup</title>
      <link>https://isocpp.org//blog/2025/11/concept-based-generic-programming-bjarne-stroustrup</link>
      <guid>https://isocpp.org//blog/2025/11/concept-based-generic-programming-bjarne-stroustrup</guid>
      <description><![CDATA[<p>
	A new paper:</p>
<blockquote>
	<h3>
		Bjarne Stroustrup: Concept-Based Generic Programming</h3>
	<p>
		<a href="https://www.stroustrup.com/Concept-based-GP.pdf">https://www.stroustrup.com/Concept-based-GP.pdf</a></p>
	<p>
		We present programming techniques to illustrate the facilities and principles of C++ generic programming using concepts. Concepts are C++&rsquo;s way to express constraints on generic code. As an initial example, we provide a simple type system that eliminates narrowing conversions and provides range checking without unnecessary notational or run-time overhead.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Sat, 22 Nov 2025 21:15:37 +0000</pubDate>
      <dc:creator>Bjarne Stroustrup</dc:creator>
    </item>

    <item>
      <title>User&#45;Defined Formatting in std::format &#45;&#45; Spencer Collyer</title>
      <link>https://isocpp.org//blog/2025/11/user-defined-formatting-in-stdformat-spencer-collyer1</link>
      <guid>https://isocpp.org//blog/2025/11/user-defined-formatting-in-stdformat-spencer-collyer1</guid>
      <description><![CDATA[<p>
	<img alt="logo.png" src="https://isocpp.org/files/img/logo.png" style="width: 225px; margin: 10px; float: right;" />std::format allows us to format values quickly and safely. Spencer Collyer demonstrates how to provide formatting for a simple user-defined class.</p>
<blockquote>
	<h3>
		<a href="https://accu.org/journals/overload/33/189/collyer/">User-Defined Formatting in std::format</a></h3>
	<p>
		by Spencer Collyer</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		In a previous article [<a href="https://accu.org/journals/overload/33/189/collyer/#_idTextAnchor000">Collyer21</a>], I gave an introduction to the&nbsp;<code>std::format</code>&nbsp;library, which brings modern text formatting capabilities to C++.</p>
	<p>
		That article concentrated on the output functions in the library and how they could be used to write the fundamental types and the various string types that the standard provides.</p>
	<p>
		Being a modern C++ library,&nbsp;<code>std::format</code>&nbsp;also makes it relatively easy to output user-defined types, and this series of articles will show you how to write the code that does this.</p>
	<p>
		There are three articles in this series. This article describes the basics of setting up the formatting for a simple user-defined class. The second article will describe how this can be extended to classes that hold objects whose type is specified by the user of your class, such as containers. The third article will show you how to create format wrappers, special purpose classes that allow you to apply specific formatting to objects of existing classes.</p>
	<p>
		A note on the code listings:&nbsp;The code listings in this article have lines labelled with comments like&nbsp;<code>// 1</code>. Where these lines are referred to in the text of this article, it will be as &lsquo;line&nbsp;<code>1</code>&rsquo; for instance, rather than &lsquo;the line labelled // 1&rsquo;.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 21 Nov 2025 21:52:19 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>std::ranges may not deliver the performance that you expect &#45;&#45; Daniel Lemire</title>
      <link>https://isocpp.org//blog/2025/11/stdranges-may-not-deliver-the-performance-that-you-expect-daniel-lemire</link>
      <guid>https://isocpp.org//blog/2025/11/stdranges-may-not-deliver-the-performance-that-you-expect-daniel-lemire</guid>
      <description><![CDATA[<p>
	<img alt="Capture-decran-le-2025-10-05-a-17.34.45-825x510.png" src="https://isocpp.org/files/img/Capture-decran-le-2025-10-05-a-17.34.45-825x510.png" style="width: 200px; margin: 10px; float: right; height: 124px;" />Modern C++ offers elegant abstractions like std::ranges that promise cleaner, more expressive code without sacrificing speed. Yet, as with many abstractions, real-world performance can tell a more nuanced story&mdash;one that every engineer should verify through careful benchmarking.</p>
<blockquote>
	<h3>
		<a href="https://lemire.me/blog/2025/10/05/stdranges-may-not-deliver-the-performance-that-you-expect/">std::ranges may not deliver the performance that you expect</a></h3>
	<p>
		by Daniel Lemire</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Good engineers seek software code that is &lsquo;simple&rsquo; in the sense that we can read and understand it quickly. But they they also look for highly performant code.</p>
	<p>
		For the last 20 years, we have been offering programmers the possibility to replace conventional for loops with a more functional approach. To illustrate, suppose that you want to extract all even integers from a container and create a new container. In conventional C++, you would proceed with a loop, as follows.</p>
	<pre>
std::vector&lt;int&gt; even_numbers;&#10;for (int n : numbers) {&#10; if (n % 2 == 0) {&#10; even_numbers.push_back(n);&#10; }&#10;}</pre>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Wed, 19 Nov 2025 21:49:33 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>C++26: std::optional &#45;&#45; Sandor Dargo</title>
      <link>https://isocpp.org//blog/2025/11/cpp26-stdoptionalt-sandor-dargo</link>
      <guid>https://isocpp.org//blog/2025/11/cpp26-stdoptionalt-sandor-dargo</guid>
      <description><![CDATA[<p>
	<img alt="SANDOR_DARGO_ROUND.JPG" src="https://isocpp.org/files/img/SANDOR_DARGO_ROUND.JPG" style="width: 200px; margin: 10px; float: right; height: 204px;" />If you&rsquo;re a regular reader of Sandor&#39;s blog, you know he&#39;s been sharing what he learned about new C++ language and library features ever since C++20. You probably also read his CppCon 2025 Trip Report. And this post is where the two come together.</p>
<blockquote>
	<h3>
		<a href="https://www.sandordargo.com/blog/2025/10/01/cpp26-optional-of-reference">C++26: std::optional&lt;T&amp;&gt;</a></h3>
	<p>
		by Sandor Dargo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		At CppCon I attended a great talk by Steve Downey about&nbsp;<a href="https://cppcon2025.sched.com/event/27bOx/stdoptionaldyatdyagg-optional-over-references"><code>std::optional&lt;T&amp;&gt;</code></a>. Steve is the&nbsp;<em>father of optional references</em>&mdash;he co-authored&nbsp;<a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2988r12.pdf">P2988R12</a>&nbsp;with Peter Sommerlad.</p>
	<p>
		Let&rsquo;s start with a little history. By now &mdash; at the end of 2025 &mdash; even C++17 feels like history. That&rsquo;s when&nbsp;<code>std::optional&lt;T&gt;</code>&nbsp;was introduced, giving us a way to represent &ldquo;maybe a value&rdquo; with value semantics, instead of relying on pointers. But&nbsp;<code>std::optional</code>&nbsp;in C++17 (and later) couldn&rsquo;t hold references &mdash; unless you wrapped them in&nbsp;<code>std::reference_wrapper</code>.</p>
	<p>
		C++26 finally fixes this gap.</p>
	<p id="what-is-stdoptionalt">
		<strong>What is&nbsp;<code>std::optional&lt;T&amp;&gt;</code>?</strong></p>
	<p>
		<code>std::optional&lt;T&amp;&gt;</code>&nbsp;has three key characteristics:</p>
	<ul>
		<li>
			Unlike&nbsp;<code>std::optional&lt;T&gt;</code>, it is&nbsp;not an owning type. It simply refers to an existing object.</li>
		<li>
			It provides both reference and value-like semantics.</li>
		<li>
			Internally, it behaves like a pointer to&nbsp;<code>T</code>, which may also be&nbsp;<code>nullptr</code>.</li>
	</ul>
	<p>
		This last point is interesting: while&nbsp;<code>optional&lt;T&gt;</code>&nbsp;can be seen as&nbsp;<code>variant&lt;T, monostate&gt;</code>,&nbsp;<code>optional&lt;T&amp;&gt;</code>&nbsp;is closer to&nbsp;<code>variant&lt;T&amp;, nullptr_t&gt;</code>. In practice, it&rsquo;s a safer alternative to a non-owning raw pointer.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Mon, 17 Nov 2025 21:44:42 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>The problem with inferring from a function call operator is that &#45;&#45; Raymond Chen</title>
      <link>https://isocpp.org//blog/2025/11/the-problem-with-inferring-from-a-function-call-operator-is-that-raymond-ch</link>
      <guid>https://isocpp.org//blog/2025/11/the-problem-with-inferring-from-a-function-call-operator-is-that-raymond-ch</guid>
      <description><![CDATA[<p>
	<img alt="RaymondChen_5in-150x150.jpg" src="https://isocpp.org/files/img/RaymondChen_5in-150x150.jpg" style="width: 150px; margin: 10px; float: right;" />In this post, we&rsquo;ll take a closer look at how to extend the earlier callback wrapper mechanism to handle regular function pointers as well as member functions. Along the way, we&rsquo;ll examine some of the subtleties of inferring function pointer types from callable objects&mdash;especially when lambdas with auto parameters enter the picture.</p>
<blockquote>
	<h3>
		<a href="https://devblogs.microsoft.com/oldnewthing/20251002-00/?p=111647">The problem with inferring from a function call operator is that there may be more than one</a></h3>
	<p>
		by Raymond Chen</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Some time ago, I wrote briefly on&nbsp;<a href="https://devblogs.microsoft.com/oldnewthing/20250616-00/?p=111271" title="Writing a helper class for generating a particular category of C callback wrappers around C++ methods">writing a helper class for generating a particular category of C callback wrappers around C++ methods</a>. This particular mechanism used a proxy object with a templated conversion operator to figure out what function pointer type it was being asked to produce.&sup1;</p>
	<p>
		But what about taking a&nbsp;<code>std::invoke</code>&lsquo;able object and inferring the function pointer from the parameters that the&nbsp;<code>invoke</code>&lsquo;able&rsquo;s&nbsp;<code>operator()</code>&nbsp;accepts?</p>
	<p>
		Sure, you could try to do that, but there&rsquo;s a catch: There might be more than one&nbsp;<code>operator()</code>.</p>
	<p>
		The common case of this is a lambda with&nbsp;<code>auto</code>&nbsp;parameters.</p>
	<pre tabindex="0">
RegisterCallback(&#10;    CallableWrapper([](auto first, auto second, auto third) {&#10;        &#10214; ... &#10215;&#10;    }, context);</pre>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 14 Nov 2025 21:40:23 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>A Month of Writing Reflections&#45;based Code: What have I learned? &#45;&#45; Boris Staletić</title>
      <link>https://isocpp.org//blog/2025/11/a-month-of-writing-reflections-based-code-what-have-i-learned-boris-staleti</link>
      <guid>https://isocpp.org//blog/2025/11/a-month-of-writing-reflections-based-code-what-have-i-learned-boris-staleti</guid>
      <description><![CDATA[<p>
	<img alt="Depositphotos_193487310_L.jpg" src="https://isocpp.org/files/img/Depositphotos_193487310_L.jpg" style="width: 200px; margin: 10px; float: right; height: 211px;" />This post chronicles a month-long experiment using C++26 reflections to automate the generation of pybind11 bindings, blending the promise of modern metaprogramming with real-world complexity. It offers a candid look at what worked beautifully, what fell short, and what future language features could make reflection-driven automation even more powerful.</p>
<blockquote>
	<h3>
		<a href="https://www.reddit.com/r/cpp/comments/1nw39g4/a_month_of_writing_reflectionsbased_code_what/">A Month of Writing Reflections-based Code: What have I learned?</a></h3>
	<p>
		by Boris Staleti&#263;</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		I have been trying to automate writing my own pybind11 binding code with the help of C++26 reflections, as implemented by clang-p2996.</p>
	<p>
		There were moments where things went smoothly, but also moments where I missed a feature or two from the world of reflections. Then there is also accidental complexity caused by pybind11 having features which are, at the very least, not friendly for generic binding generation.</p>
	<p>
		Before I begin, a massive thanks to Barry Revzin, Daveed Vandevoorde, Dan Katz, Adam Lach and whoever else worked on bringing Reflections to C++.</p>
	<p>
		<strong>Smooth sailing</strong></p>
	<p>
		What we got from the set of reflections papers is awesome. Here&#39;s an example of what can be achieved quite easily:</p>
	<p>
		<a href="https://godbolt.org/z/jaxT8Ebjf" rel="noopener nofollow noreferrer ugc" rpl="" target="_blank">https://godbolt.org/z/jaxT8Ebjf</a></p>
	<p>
		With some 20 lines of reflections, we can generate bindings that cover:</p>
	<ul>
		<li>
			<p>
				free functions (though not overload sets of free functions - more on that later)</p>
		</li>
		<li>
			<p>
				structs/classes with</p>
			<ul>
				<li>
					<p>
						a default constructor</p>
				</li>
				<li>
					<p>
						member functions</p>
				</li>
				<li>
					<p>
						data members, though always writable from python</p>
				</li>
			</ul>
		</li>
	</ul>
	<p>
		You can also see how this easily generalizes to all other kinds of&nbsp;<code>py_class.def_meow(...)</code>. Almost... Since C++ does not have "properties" in the python sense,&nbsp;<code>def_property_meow</code>&nbsp;will need&nbsp;<a href="https://godbolt.org/z/MT5ojzG4n" rel="noopener nofollow noreferrer ugc" rpl="" target="_blank">special care</a>.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Wed, 12 Nov 2025 19:29:10 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Discovering Observers &#45; Part 3 &#45;&#45; Sandor Dargo</title>
      <link>https://isocpp.org//blog/2025/11/discovering-observers-part-3-sandor-dargo</link>
      <guid>https://isocpp.org//blog/2025/11/discovering-observers-part-3-sandor-dargo</guid>
      <description><![CDATA[<p>
	<img alt="SANDOR_DARGO_ROUND.JPG" src="https://isocpp.org/files/img/SANDOR_DARGO_ROUND.JPG" style="width: 200px; margin: 10px; float: right; height: 204px;" />Over the last two posts, we explored different implementations of the&nbsp;observer pattern&nbsp;in C++.&nbsp;<a href="https://www.sandordargo.com/blog/2025/09/03/observers-part1">We began with a very simple example</a>, then&nbsp;<a href="https://www.sandordargo.com/blog/2025/09/10/observers-part2">evolved toward a more flexible, template- and inheritance-based design</a>.</p>
<p>
	This week, let&rsquo;s move further &mdash; shifting away from inheritance and embracing&nbsp;composition.</p>
<blockquote>
	<h3>
		<a href="https://www.sandordargo.com/blog/2025/09/17/observers-part3">Discovering Observers - Part 3</a></h3>
	<p>
		by Sandor Dargo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		You might say (and you&rsquo;d be right) that publishers and subscribers can just as well be used as members instead of base classes. In fact, with our previous implementation, handling changes inside subscribers felt more complicated than necessary.</p>
	<p>
		What we&rsquo;d really like is this: subscribers that observe changes and trigger updates in their enclosing class&nbsp;<em>in a coherent way</em>. As one of the readers of Part 1 pointed out, this can be elegantly achieved if&nbsp;subscribers take callables.</p>
	<p id="step-1-subscribers-with-callables">
		<strong>Step 1: Subscribers with callables</strong></p>
	<p>
		We start by letting&nbsp;<code>Subscriber</code>&nbsp;accept a&nbsp;<code>std::function</code>, which gets called whenever the subscriber is updated:</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Wed, 05 Nov 2025 20:17:43 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Why can’t std::apply figure out which overload I intend to use? &#45;&#45; Raymond Chen</title>
      <link>https://isocpp.org//blog/2025/10/why-cant-stdapply-figure-out-which-overload-i-intend-to-use-raymond-chen</link>
      <guid>https://isocpp.org//blog/2025/10/why-cant-stdapply-figure-out-which-overload-i-intend-to-use-raymond-chen</guid>
      <description><![CDATA[<p>
	<img alt="RaymondChen_5in-150x150.jpg" src="https://isocpp.org/files/img/RaymondChen_5in-150x150.jpg" style="width: 150px; margin: 10px; float: right;" />When you pass an overloaded function like <code data-end="45" data-start="42">f</code> to <code data-end="61" data-start="49">std::apply</code>, the compiler can&rsquo;t peek inside the tuple to figure out which overload matches&mdash;it only sees an ambiguous callable and a single tuple argument.&nbsp;Because overload resolution happens before the tuple is unpacked, you need an extra layer (like a lambda) to forward the unpacked arguments and give the compiler enough information to pick the correct overload.</p>
<blockquote>
	<h3>
		<a href="https://devblogs.microsoft.com/oldnewthing/20250911-00/?p=111586">Why can&rsquo;t std::apply figure out which overload I intend to use? Only one of them will work!</a></h3>
	<p>
		by Raymond Chen</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Consider the following:</p>
	<pre tabindex="0">
void f(int, int);&#10;void f(char*, char*);&#10;&#10;void test(std::tuple&lt;int, int&gt; t)&#10;{&#10;    std::apply(f, t); // error&#10;}&#10;</pre>
	<p>
		The compiler complains that it cannot deduce the type of the first parameter.</p>
	<p>
		I&rsquo;m using&nbsp;<code>std::apply</code>&nbsp;here, but the same arguments apply to functions like&nbsp;<code>std::invoke</code>&nbsp;and&nbsp;<code>std::bind</code>.</p>
	<p>
		From inspection, we can see that the only overload that makes sense is&nbsp;<code>f(int, int)</code>&nbsp;since that is the only one that accepts two integer parameters.</p>
	<p>
		But the compiler doesn&rsquo;t know that&nbsp;<code>std::apply</code>&nbsp;is going to try to invoke its first parameter with arguments provided by the second parameter. The compiler has to choose an overload based on the information it is given in the function call.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 31 Oct 2025 20:16:25 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>Discovering Observers &#45; Part 2 &#45;&#45; Sandor Dargo</title>
      <link>https://isocpp.org//blog/2025/10/discovering-observers-part-2-sandor-dargo</link>
      <guid>https://isocpp.org//blog/2025/10/discovering-observers-part-2-sandor-dargo</guid>
      <description><![CDATA[<p>
	<img alt="SANDOR_DARGO_ROUND.JPG" src="https://isocpp.org/files/img/SANDOR_DARGO_ROUND.JPG" style="width: 200px; margin: 10px; float: right; height: 204px;" />In the last post, we built a templated observer framework that let any publisher push strongly-typed messages to its subscribers.<br />
	This time we&rsquo;ll push the design further by trying to let a single publisher handle multiple message types&mdash;and we&rsquo;ll quickly see how that innocent goal invites ambiguity, boilerplate, and some surprising trade-offs.</p>
<blockquote>
	<h3>
		<a href="https://www.sandordargo.com/blog/2025/09/10/observers-part2">Discovering Observers - Part 2</a></h3>
	<p>
		by Sandor Dargo</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		Last week, we took the observer pattern from a very simple example and evolved it into a more flexible, template-based implementation in C++. We ended up with abstracted publishers and subscribers, a templated message type for flexibility, and publishers controlling when and how updates are pushed.</p>
	<p>
		This week, we&rsquo;re going to tackle the challenge of supporting multiple message types in a single publisher.</p>
	<p>
		<strong>First attempt: multiple inheritance of templated bases</strong><br />
		<br />
		It&rsquo;s tempting to provide different specializations for our templates so the same publisher can push different message types.</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Tue, 28 Oct 2025 20:05:54 +0000</pubDate>
      <dc:creator>Blog Staff</dc:creator>
    </item>

    <item>
      <title>The final schedule for Meeting C++ 2025 has been published</title>
      <link>https://isocpp.org//blog/2025/10/the-final-schedule-for-meeting-cpp-2025-has-been-published</link>
      <guid>https://isocpp.org//blog/2025/10/the-final-schedule-for-meeting-cpp-2025-has-been-published</guid>
      <description><![CDATA[<p>
	With today, the <a href="https://meetingcpp.com/2025/Schedule.html">final schedule</a> for <a href="https://meetingcpp.com/2025">Meeting C++ 2025</a> has been published. Tickets for Berlin and online are still available until next week Wednesday!</p>
<blockquote>
	<h2>
		<a href="https://meetingcpp.com/meetingcpp/news/items/The-last-update-to-the-schedule-for-Meeting-Cpp-2025.html">The last update to the schedule for Meeting C++ 2025</a></h2>
	<p>
		by Jens Weller</p>
</blockquote>
<p>
	From the article:</p>
<blockquote>
	<p>
		With release of the static html schedule for the website everything is ready for Meeting C++ 2025!</p>
	<p>
		For a few years now Meeting C++ offers two schedules: the live schedule is coming from the database, which allows us to make changes during the conference. The other schedule is part of the static website and just a single page powered by the C++ CMS from Meeting C++. Due to the 5th track this year I&#39;ve just had one week before the conference the time to update the website with this now final program for the conference.</p>
	<p>
		&nbsp;</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Tue, 28 Oct 2025 16:43:21 +0000</pubDate>
      <dc:creator>Meeting C++</dc:creator>
    </item>

    <item>
      <title>Looking at binary trees in C++</title>
      <link>https://isocpp.org//blog/2025/10/looking-at-binary-trees-in-cpp</link>
      <guid>https://isocpp.org//blog/2025/10/looking-at-binary-trees-in-cpp</guid>
      <description><![CDATA[<p>
	While preparing a talk for Meeting C++ 2025 I&#39;ve started looking into binary trees. And got curious about a different design choice.</p>
<blockquote>
	<h2>
		<a href="https://meetingcpp.com/blog/items/Looking-at-binary-trees-in-Cpp.html">Looking at binary trees in C++</a></h2>
</blockquote>
<p>
	by Jens Weller</p>
<blockquote>
	<p>
		From the article:</p>
	<p>
		I&#39;m in the process of preparing a quick talk on trees in C++ for Meeting C++ 2025. In order to see what the web offers, I&#39;ve searched exactly for this, "trees in C++".</p>
	<p>
		This showed that most posts found by duckduckgo or google were about binary trees, and in particular the same or similar implementation of using raw pointers for the left/right elements in the tree. Including using new to allocate for the nodes, only some times the code also bothers with using delete. The basic node class looks like this:</p>
	<p>
		&nbsp;</p>
</blockquote>]]></description>
      <dc:subject><![CDATA[News, Articles & Books,]]></dc:subject>
      <pubDate>Fri, 24 Oct 2025 15:23:21 +0000</pubDate>
      <dc:creator>Meeting C++</dc:creator>
    </item>

    
    </channel>
</rss>