Some Informal Remarks Towards a New Theory of Trait Customization

A Possible Technique constexpr bool g(int lhs, int rhs) { auto& op = partial_eq<int>; return op.ne(lhs, rhs); } Compiler Explorer with Supporting Code A trait is defined as a template variable that implements the required operations. Implementation of those operations is possible via a variety of techniques, but existence is concept checkable. It might prove …

A local CMake workflow with Docker

l#+BLOG: sdowney An outline of a template that provides an automated workflow driving a CMake project in a docker container. This post must be read in concert with https://github.com/steve-downey/scratch of which it is part. Routine process should be automated Building a project that uses cmake runs through a predictable lifecycle that you should be able …

std::execution, Sender/Receiver, and the Continuation Monad

Some thoughts on the std::execution proposal and my understanding of the underlying theory. What's proposed From the paper's Introduction This paper proposes a self-contained design for a Standard C++ framework for managing asynchronous execution on generic execution contexts. It is based on the ideas in [P0443R14] and its companion papers. Which doesn't tell you much. …

Standard Vocabulary for Algorithms

This is feedback after considering A Plan for C++23 Ranges Disclosure: I voted in favor of this. It does not suggest work on views::maybe [P1255R6]​. I'm fine with that priority. Vocabulary is not just Types between Components There's broad agreement that 'vocabulary types' belong in the standard. Domain independent types that can be used between …

Blog Infrastructure Work

What feels like actual productive work, but is only work adjacent? Fixing up the blog. I managed to gradually destroy the whole thing after a decade or more of platform migrations and upgrades. This is a new and from (mostly) scratch install, into which I've imported the contents of the old one. Good backups and …

Value Oriented Programming: A Manifesto

Object Oriented Programming The primitive entities are objects which have certain properties Objects have Identity Objects have State Objects have Behavior Values are not Objects The primitive entities are values which have none of the properties of Objects Values have no identity Values have no State Values have no Behavior A positive definition of VOP …

Building Saar Raz’s clang concepts branch

A Recipe for building Saar Raz's clang concepts branch Saar Raz has been working on a Concepts implementation, available at https://github.com/saarraz/clang-concepts It's not much harder to build it than clang usually is, it's just a matter of getting things checked out into the right places before configuring the build. Just like LLVM and clang normally. …

Should Unicode literals be guaranteed to be well-formed?

TL;DR Betteridge's law applies: No. Are you still here? Unicode Literals In C++ 20 there are 2 kinds and 6 forms of Unicode literals. Character literals and string literals, in UTF-8, UTF-16, and UTF-32 encodings. Each of them uses a distinct char type to signal in the type system what the encoding is for the …