# c++26

Published articles for c++26.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## C++26 Ranges: Parallel Algorithms and Safer Filters

DevFeed: [C++26 Ranges: Parallel Algorithms and Safer Filters](<https://devfeed.tech/articles/c-26-ranges-parallel-algorithms-and-safer-filters-105777.md>)

Original publisher: [Read original article](<https://www.sandordargo.com/blog/2026/10/28/cpp26-ranges-part-3-parallel-and-safety>)

Author: Sandor Dargo

Published: 2026-10-27T23:00:00Z

Content type: article

Language: en

Sources: [Sandor Dargo's Blog](<https://devfeed.tech/sources/sandor-dargo-s-blog.md>)

Topics: [stl](<https://devfeed.tech/topics/stl.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [c-plus-plus-26](<https://devfeed.tech/tags/c-plus-plus-26.md>), [dev](<https://devfeed.tech/tags/dev.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [policies](<https://devfeed.tech/tags/policies.md>)

### AI overview

C++26 adds execution policies to over 50 non-numeric range algorithms, letting ranges use `seq`, `par`, `par_unseq`, or `unseq` without converting pipelines to iterator pairs. Parallel overloads require a range that is both random-access and sized, so filtered or unbounded ranges cannot be passed directly; projections are supported, and outputs must be bounded ranges. Callables must be copy-constructible, `for_each` returns an iterator rather than its function object, and constexpr support is absent. P3725 also changes `filter_view`: const iteration is available for input ranges, and modifying an element through a filter iterator is defined if the predicate is not re-evaluated on it. The article recommends `views::to_input` before a filter in hazardous compositions; this can make `reverse` fail at compile time and enable const iteration.

### Source excerpt

In part 1 we looked at the new views C++26 adds, and in part 2 we covered the infrastructure improvements. This final part is about the biggest gap in C++20 ranges: you couldn't run them in parallel. C++17 added execution policies to the classic std:: algorithms, but C++20 ranges never got them. If you wanted parallelism, you had to decompose your ranges pipeline back into iterator pairs. C++26...

## C++26 Ranges: Better Infrastructure

DevFeed: [C++26 Ranges: Better Infrastructure](<https://devfeed.tech/articles/c-26-ranges-better-infrastructure-93115.md>)

Original publisher: [Read original article](<https://www.sandordargo.com/blog/2026/10/21/cpp26-ranges-part-2-infrastructure>)

Author: Sandor Dargo

Published: 2026-10-20T22:00:00Z

Content type: article

Language: en

Sources: [Sandor Dargo's Blog](<https://devfeed.tech/sources/sandor-dargo-s-blog.md>)

Topics: [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [vectorization techniques](<https://devfeed.tech/topics/vectorization-techniques.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [c-plus-plus-26](<https://devfeed.tech/tags/c-plus-plus-26.md>), [containers](<https://devfeed.tech/tags/containers.md>), [dev](<https://devfeed.tech/tags/dev.md>), [generation](<https://devfeed.tech/tags/generation.md>), [hint](<https://devfeed.tech/tags/hint.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [range](<https://devfeed.tech/tags/range.md>)

### AI overview

The excerpt describes three C++26 changes aimed at making ranges more practical. `approximately_sized_range` and `ranges::reserve_hint` let containers such as `std::vector` reserve using an O(1) estimate when exact size is unknown; predictable views can propagate hints, while unpredictable views such as `filter` do not. `std::ranges::generate_random` adds range and iterator-pair interfaces, checking for a batch-generation customization on the engine or distribution and otherwise generating element by element. The excerpt says no standard engine currently provides that customization. Finally, list-initialization defaults algorithm value types so calls such as `std::find` can accept braced values; ranges algorithms account for projections, while `replace_copy` and numeric algorithms are excluded.

### Source excerpt

Not every ranges improvement is a shiny new view adaptor. Some of the most impactful C++26 changes are infrastructure: making containers work better with lazy ranges, bringing random number generation into the ranges world, and removing a long-standing ergonomic paper cut from algorithms. This post covers all three. approximately_sized_range and reserve_hint Here's a scenario that should bo...

## C++26 Ranges: Four New Views

DevFeed: [C++26 Ranges: Four New Views](<https://devfeed.tech/articles/c-26-ranges-four-new-views-86853.md>)

Original publisher: [Read original article](<https://www.sandordargo.com/blog/2026/10/14/cpp26-ranges-part-1-new-views>)

Author: Sandor Dargo

Published: 2026-10-13T22:00:00Z

Content type: article

Language: en

Sources: [Sandor Dargo's Blog](<https://devfeed.tech/sources/sandor-dargo-s-blog.md>)

Topics: [data type](<https://devfeed.tech/topics/data-type.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [c-plus-plus-20](<https://devfeed.tech/tags/c-plus-plus-20.md>), [c-plus-plus-23](<https://devfeed.tech/tags/c-plus-plus-23.md>), [c-plus-plus-26](<https://devfeed.tech/tags/c-plus-plus-26.md>), [dev](<https://devfeed.tech/tags/dev.md>)

### AI overview

The article explains four C++26 ranges views: `views::concat` for lazy iteration across ranges, `views::to_input` to simplify iterator behavior and reduce work, `views::cache_latest` to avoid repeated transform evaluations, and `views::indices` for generating an index range. It also describes constraints and behavior of each view.

### Source excerpt

C++20 shipped a powerful ranges library, but the set of view adaptors had some obvious gaps. Want to get the output as a container? No luck. At least C++23 helped with that. Want to iterate over two vectors as one sequence? Write your own. Want to avoid redundant evaluations in a transform | filter pipeline? Write a workaround. Want a quick index sequence matching a range's size? Spell out iota...

## C++26 Contracts: Introduction to Preconditions and Postconditions

DevFeed: [C++26 Contracts: Introduction to Preconditions and Postconditions](<https://devfeed.tech/articles/c-26-contracts-introduction-to-preconditions-and-postconditions-84965.md>)

Original publisher: [Read original article](<https://www.cppstories.com/2026/cpp26_contracts/>)

Published: 2026-10-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [C++ Stories](<https://devfeed.tech/sources/c-stories.md>)

Topics: [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [data type](<https://devfeed.tech/topics/data-type.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [c-plus-plus-26](<https://devfeed.tech/tags/c-plus-plus-26.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [contracts](<https://devfeed.tech/tags/contracts.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [hardening](<https://devfeed.tech/tags/hardening.md>), [standard](<https://devfeed.tech/tags/standard.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

This tutorial explains C++26 contracts through preconditions, postconditions and assertions inside functions. It compares contracts with `assert`, discusses declaration placement and evaluation semantics, and stresses that contracts are not substitutes for input validation or required program logic.

### Source excerpt

In the article about Standard Library hardening, we looked at checks for invalid Standard Library container access and other broken preconditions. I mentioned that those requirements are expressed in terms of "contracts". But what about our code? In this post, we'll explore contracts from C++26. We'll start with a simple cassert, move the requirement into the function itself, and see how to check results. We'll also look at declarations and definitions, compiler options, and a few details that can surprise you. Starting with an Assertion Let's start with a small example: A header file first: // foo.h #include <vector> int get_value(const std::vector<int>& values, std::size_t index); And the implementation: // foo.cpp #include "foo.h" // our function declaration... #include <cassert> int get_value(const std::vector<int>& values, std::size_t index) { assert(index < values.size()); return values[index]; } The function expects a valid index. If the condition is false, assert prints a diagnostic message and terminates the program. However, this only happens when assertions are enabled. Defining NDEBUG disables the check and basically removes the check from the code. What are the issues with this simple approach? The requirement lives inside the implementation. Somebody reading only the declaration sees a vector and an index, without the relationship between them. Adding a Precondition With C++26 contracts, we can move that requirement from an assertion inside the function body to the function itself: int get_value(const std::vector<int>& values, std::size_t index) pre(index < values.size()) { return values[index]; } Notice the new pre(...) syntax after the parameter list. It introduces a precondition assertion: a condition expected to hold when entering the function. What's more, we can add this precondition to the declaration: int get_value(const std::vector<int>& values, std::size_t index) pre(index < values.size()); The feature was introduced through P2900, Contracts

## C++26 standardizes breakpoints and debugger detection

DevFeed: [C++26 standardizes breakpoints and debugger detection](<https://devfeed.tech/articles/c-26-62258.md>)

Original publisher: [Read original article](<https://www.sandordargo.com/blog/2026/09/30/cpp26-debugging>)

Author: Sandor Dargo

Published: 2026-09-29T22:00:00Z

Content type: article

Language: en

Sources: [Sandor Dargo's Blog](<https://devfeed.tech/sources/sandor-dargo-s-blog.md>)

Topics: [c/c++](<https://devfeed.tech/topics/c-c-plus-plus.md>), [x86](<https://devfeed.tech/topics/x86.md>), [gdb](<https://devfeed.tech/topics/gdb.md>)

Tags: [asm](<https://devfeed.tech/tags/asm.md>), [bare-metal](<https://devfeed.tech/tags/bare-metal.md>), [breakpoint](<https://devfeed.tech/tags/breakpoint.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [c-plus-plus-26](<https://devfeed.tech/tags/c-plus-plus-26.md>), [clang](<https://devfeed.tech/tags/clang.md>), [debugger](<https://devfeed.tech/tags/debugger.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [dev](<https://devfeed.tech/tags/dev.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [i386](<https://devfeed.tech/tags/i386.md>), [libstdc-plus-plus](<https://devfeed.tech/tags/libstdc-plus-plus.md>), [linux](<https://devfeed.tech/tags/linux.md>), [x86-64](<https://devfeed.tech/tags/x86-64.md>)

### AI overview

C++26 adds standardized functions for triggering breakpoints and checking whether a debugger is attached. The article explains their behavior, platform-specific implementation choices, and how replaceability supports freestanding environments where operating-system debugger detection may be unavailable.

### Source excerpt

If you've ever needed to hit a breakpoint programmatically in C++, you've probably written something like this: #if defined(_MSC_VER) __debugbreak(); #elif defined(__clang__) __builtin_debugtrap(); #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ volatile("int3"); #else raise(SIGTRAP); #endif Every major C++ project reinvents this wheel. B...

## simdjson 5.0 is out

DevFeed: [simdjson 5.0 is out](<https://devfeed.tech/articles/simdjson-5-0-is-out-61355.md>)

Original publisher: [Read original article](<https://lemire.me/blog/2026/09/28/simdjson-5-0-is-out/>)

Author: Daniel Lemire

Published: 2026-09-28T12:38:25Z

Content type: release

Language: en

Sources: [Daniel Lemire](<https://devfeed.tech/sources/daniel-lemire.md>)

Topics: [JSON](<https://devfeed.tech/topics/json.md>), [Library](<https://devfeed.tech/topics/library.md>), [static linking](<https://devfeed.tech/topics/static-linking.md>), [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [apache](<https://devfeed.tech/tags/apache.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [c-plus-plus-26](<https://devfeed.tech/tags/c-plus-plus-26.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [js](<https://devfeed.tech/tags/js.md>), [json](<https://devfeed.tech/tags/json.md>), [ladybird](<https://devfeed.tech/tags/ladybird.md>), [meta](<https://devfeed.tech/tags/meta.md>), [node-js](<https://devfeed.tech/tags/node-js.md>)

### AI overview

simdjson 5.0 adds default key-selector deserialization for reflected C++ structures, improved handling of large integers, JSON text sequences and comma-separated document streams, and options for line-based and threaded parsing. It also includes bug fixes following an audit.

### Source excerpt

The simdjson library is a C++ library to parse and generate JSON. It is used in Node.js, ClickHouse, Meta Velox, StarRocks, Apache Doris, the Ladybird browser and many other systems. We released version 4.0 a year ago, in September 2025. Its headline feature was C++26 static reflection: you could turn a C++ structure into JSON, ... Continue reading simdjson 5.0 is out

## Using C++17 std::optional

DevFeed: [Using C++17 std::optional](<https://devfeed.tech/articles/using-c-17-std-optional-61110.md>)

Original publisher: [Read original article](<https://www.cppstories.com/2018/05/using-optional/>)

Published: 2026-09-28T00:00:00Z

Content type: tutorial

Language: en

Sources: [C++ Stories](<https://devfeed.tech/sources/c-stories.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [union types](<https://devfeed.tech/topics/union-types.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [c-plus-plus-20](<https://devfeed.tech/tags/c-plus-plus-20.md>), [c-plus-plus-23](<https://devfeed.tech/tags/c-plus-plus-23.md>), [c-plus-plus-26](<https://devfeed.tech/tags/c-plus-plus-26.md>), [haskell](<https://devfeed.tech/tags/haskell.md>), [null](<https://devfeed.tech/tags/null.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rust](<https://devfeed.tech/tags/rust.md>), [type-safety](<https://devfeed.tech/tags/type-safety.md>)

### AI overview

This tutorial explains std::optional, a C++17 value type that represents a value that may be absent. It discusses its type safety, memory behavior, and uses such as nullable values, computation results, lazy resource loading, and optional function parameters.

### Source excerpt

Let's take a pair of two types <YourType, bool> - what can you do with such composition? In this article, I'll describe std::optional - a helper "vocabulary" type added in C++17. It's a wrapper that either contains a value of your type or is empty. Let's see where it can be useful and how you can use it. Updated in September 2026 with C++20, C++23, and C++26 changes. Intro By adding the boolean flag to other types, you can achieve a thing called "nullable types". As mentioned, the flag is used to indicate whether the value is available or not. Such wrapper represents an object that might be empty in an expressive way (so not via comments :)) While you can achieve "null-ability" by using unique values (-1, infinity, nullptr), it's not as clear as the separate wrapper type. Alternatively, you could even use std::unique_ptr<Type> and treat the empty pointer as not initialized - this works, but comes with the cost of allocating memory for the object. Optional types - that come from functional programming world - bring type safety and expressiveness. Most of other languages have something similar: for example std::option in Rust, Optional<T> in Java, Data.Maybe in Haskell. std::optional was added in C++17 and brings a lot of experience from boost::optional that was available for many years. Since C++17 you can just #include <optional> and use the type. Such wrapper is still a value type (so you can copy it, via deep copy). What's more, std::optional doesn't need to allocate any memory on the free store. std::optional is a part of C++ vocabulary types along with std::any, std::variant and std::string_view. When to use Usually, you can use an optional wrapper in the following scenarios: If you want to represent a nullable type nicely. Rather than using unique values (like -1, nullptr, NO_VALUE or something) For example, user's middle name is optional. You could assume that an empty string would work here, but knowing if a user entered something or not might be important. W

## A summer of AI optimization

DevFeed: [A summer of AI optimization](<https://devfeed.tech/articles/a-summer-of-ai-optimization-58458.md>)

Original publisher: [Read original article](<https://lemire.me/blog/2026/09/22/a-summer-of-ai-optimization/>)

Author: Daniel Lemire

Published: 2026-09-22T02:27:44Z

Content type: article

Language: en

Sources: [Daniel Lemire](<https://devfeed.tech/sources/daniel-lemire.md>)

Topics: [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Programming Languages / Compilers](<https://devfeed.tech/topics/programming-languages-compilers.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-optimization](<https://devfeed.tech/tags/ai-optimization.md>), [c-plus-plus-26](<https://devfeed.tech/tags/c-plus-plus-26.md>), [chromium](<https://devfeed.tech/tags/chromium.md>), [claude](<https://devfeed.tech/tags/claude.md>), [claude-opus-5](<https://devfeed.tech/tags/claude-opus-5.md>), [coding](<https://devfeed.tech/tags/coding.md>), [cursor](<https://devfeed.tech/tags/cursor.md>), [database](<https://devfeed.tech/tags/database.md>), [deepseek](<https://devfeed.tech/tags/deepseek.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [js](<https://devfeed.tech/tags/js.md>), [json](<https://devfeed.tech/tags/json.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [roaring](<https://devfeed.tech/tags/roaring.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [unicode](<https://devfeed.tech/tags/unicode.md>), [urls](<https://devfeed.tech/tags/urls.md>)

### AI overview

The author reports that six mature open-source libraries gained measurable performance in 2026, often within weeks, attributing the burst in part to the lower cost of trying optimization ideas; AI use varied by contributor and was not known in every case. Reported gains include ada URL parsing rising from 0.54 to 1.28 GB/s in six weeks, fast_float improving 43% and 70% on two files, simdjson C++26 reflection serialization becoming 1.6-2.1 times faster, and simdutf ASCII validation increasing from 83 to 160 GB/s. Roaring Go and CRoaring also saw substantial workload-specific gains, including up to 5.9 times faster iteration and 4.9 times faster 64-bit bitmap cardinality. These are benchmark results from one Xeon machine or specified datasets, not claims that every operation improved equally.

### Source excerpt

I maintain and comaintain several open-source libraries. Some of them are widely used: ada parses URLs in Node.js, fast_float parses numbers in GCC's standard library and in Chromium, simdjson parses JSON in Node.js, simdutf validates and transcodes Unicode in Node.js, and the Roaring bitmap libraries sit inside many database engines. These libraries are mature. They ... Continue reading A summer of AI optimization

## CodeQL 2.24.1 improves Maven private registry support and improves query accuracy

DevFeed: [CodeQL 2.24.1 improves Maven private registry support and improves query accuracy](<https://devfeed.tech/articles/codeql-2-24-1-improves-maven-private-registry-support-and-improves-query-accuracy-72047.md>)

Original publisher: [Read original article](<https://github.blog/changelog/2026-02-06-codeql-2-24-1-improves-maven-private-registry-support-and-improves-query-accuracy>)

Author: Allison

Published: 2026-02-07T00:05:05Z

Content type: release

Language: en

Sources: [GitHub Changelog](<https://devfeed.tech/sources/github-changelog.md>)

Topics: [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>), [Maven](<https://devfeed.tech/topics/maven.md>)

Tags: [1-6](<https://devfeed.tech/tags/1-6.md>), [1-7](<https://devfeed.tech/tags/1-7.md>), [agents](<https://devfeed.tech/tags/agents.md>), [buffer-overflow](<https://devfeed.tech/tags/buffer-overflow.md>), [c](<https://devfeed.tech/tags/c.md>), [c-c-plus-plus](<https://devfeed.tech/tags/c-c-plus-plus.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [c-plus-plus-26](<https://devfeed.tech/tags/c-plus-plus-26.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [code-scanning](<https://devfeed.tech/tags/code-scanning.md>), [codeql](<https://devfeed.tech/tags/codeql.md>), [false-positives](<https://devfeed.tech/tags/false-positives.md>), [github](<https://devfeed.tech/tags/github.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [maven](<https://devfeed.tech/tags/maven.md>), [openai](<https://devfeed.tech/tags/openai.md>), [private-registry](<https://devfeed.tech/tags/private-registry.md>), [security](<https://devfeed.tech/tags/security.md>), [static-analysis](<https://devfeed.tech/tags/static-analysis.md>)

### AI overview

CodeQL 2.24.1 expands language and dependency support and updates analysis accuracy. It supports Kotlin through 2.3.0 (while dropping Kotlin 1.6.x and 1.7.x), Struts 7.x package names, C23 and C++26 `#embed`, and C# 14 null-conditional assignments. For Maven private registries configured in organization Default Setup, Maven now uses them as plugin repositories too. Other changes include Python models for list elements and selected modules, an experimental `py/prompt-injection` query, improved buffer-size and unreleased-lock query accuracy, and a fix for crashes on long GitHub Actions expressions. The release deploys automatically to GitHub code scanning on github.com; it will reach GHES in a future release, with manual upgrades available for older GHES versions.

### Source excerpt

CodeQL is the static analysis engine behind GitHub code scanning, which finds and remediates security issues in your code. We've recently released CodeQL 2.24.1, improving support for Maven private package...