Published on: 2025-07-29 22:36:58
Last week, we discussed language features that are becoming constexpr in C++26. Today, let’s turn our attention to the standard library features that will soon be usable at compile time. One topic is missing: exceptions. As they need both core language and library changes, I thought they deserved their own post. P2562R1: constexpr stable sorting This paper proposes making std::stable_sort , std::stable_partition , std::inplace_merge , and their ranges counterparts usable in constant expression
Keywords: constexpr default destructor std trivial
Find related items on AmazonPublished on: 2025-08-12 20:13:03
Since constexpr was added to the language in C++11, its scope has been gradually expanded. In the beginning, we couldn’t even use if , else or loops, which were changed in C++14. C++17 added support for constexpr lambdas. C++20 added the ability to use allocation and use std::vector and std::string in constant expressions. In this article, let’s see how constexpr evolves with C++26. To be more punctual, let’s see what language features become more constexpr -friendly. We’ll discuss library chang
Keywords: article constant constexpr std void
Find related items on AmazonPublished on: 2025-09-24 04:51:12
P1306 gives us compile time repetition of a statement for each element of a range - what if we instead want the elements as a pack without introducing a new function scope? In this blog post we’ll look at the expand helper, expansion statements and how arbitrary ranges can be made decomposable via structured bindings to reduce the need for IILEs. Element-wise expansion The expand pattern The reflection features introduced in P2996 by themselves are sufficient to iterate over a compile time r
Keywords: auto constexpr operator std template
Find related items on AmazonGo K’awiil is a project by nerdhub.co that curates technology news from a variety of trusted sources. We built this site because, although news aggregation is incredibly useful, many platforms are cluttered with intrusive ads and heavy JavaScript that can make mobile browsing a hassle. By hand-selecting our favorite tech news outlets, we’ve created a cleaner, more mobile-friendly experience.
Your privacy is important to us. Go K’awiil does not use analytics tools such as Facebook Pixel or Google Analytics. The only tracking occurs through affiliate links to amazon.com, which are tagged with our Amazon affiliate code, helping us earn a small commission.
We are not currently offering ad space. However, if you’re interested in advertising with us, please get in touch at [email protected] and we’ll be happy to review your submission.