// wro.cpp · established 2021

Modern C++
from Wrocław.

Modern C++ for production. Safety, performance, security, and the tooling that makes C++ ship in cars, trading systems, and hospitals. Flagship posts in English; community chat in Polish, over on Slack.

posts 153flagship 65short 88reflection-series 29/18events 24slack wrocpp.slack.com · meetup wro-cpp
01Latest posts
all posts →
/short

Hand a task to another thread without leaving a copy behind

Two ways to stop a std::function from leaving a copy behind when it crosses to another thread: empty the source with an exchange, or box the task in a shared_ptr at the entry point. In a demo on libc++, the plain by-value chain destroys the task on the sending thread and both fixes destroy it on the worker.

  • #news
  • #cpp
  • #stdlib
  • #concurrency
/flagship/cpp26-reflection 30/18

Four official Qt examples build and run without moc

Four examples from Qt 6.10.3 (a QThread renderer, a QML tutorial, a widgets example and a queued custom type) were rewritten by a migration tool and built with AUTOMOC off. Each prints the same harness output as the moc build, with 0 warnings, and a build in which moc is replaced by a failing trap passes. The diffs are 14 to 111 changed lines, the tool left nothing for manual work, and the limits and the timing noise are listed.

  • #reflection
  • #cpp26
  • #qt
  • #moc
/short

C++26 tightened unevaluated strings, and GCC did half of it

P2361R6 makes encoding prefixes and numeric escapes ill-formed in the strings that only exist at compile time. GCC 16.1 rejects the prefixes and accepts the escapes; Clang 22.1 rejects both. The same source compiles on one and fails on the other, which is worth knowing before you rely on either.

  • #cpp26
  • #gcc
  • #clang
  • #string-literals
/short

simdjson 5.0 reads a struct from JSON keys in any order

simdjson 5.0.0 (28 Sep 2026) lists static reflection as an officially supported feature. A struct with a string, an int, a bool, a nested struct and a vector read from JSON with shuffled keys on GCC 16.2 and simdjson 5.0.2, and an integer of exactly 2^64 is now a big integer. The 1.8x speedup in the release notes covers parsing escaped Unicode.

  • #news
  • #cpp26
  • #p2996
  • #simdjson
/short

Parsing your config file before the program exists

#embed puts a file into the translation unit and reflection enumerates a struct's fields. Together they turn a configuration file into a compile-time constant, with the keys derived from the struct rather than written twice, and a missing entry becoming a build error rather than a failed startup.

  • #cpp26
  • #reflection
  • #embed
  • #compile-time
/short

libstdc++ on GCC trunk rejects a pair that binds a temporary

On GCC trunk, building a std::pair or std::tuple whose reference member binds to a temporary is an error from C++11 to C++26. GCC 16.2 rejects it only from C++20 on. The same weeks brought a libstdc++ fix for CVE-2026-102010, now on the GCC 14, 15 and 16 branches, and a std::bitset fix that is on trunk only. Compiler Explorer runs show 16.2 and trunk side by side.

  • #news
  • #gcc
  • #stdlib
02What to expect
wednesday · flagship

Long-form technical posts

Hands-on deep dives with runnable code: C++26 reflection, language features, patterns, case studies from local shops.

monday · short

"C++ This Fortnight"

Curated news, tool spotlights, conference talk picks, tiny patterns worth sharing.

monthly · events

Meetups & talks

Monthly online meetups streamed on YouTube + quarterly in-person at local venues in Wrocław.

evergreen · toolset

Reference + recipes

Compiler support, AI agents, local LLMs, sanitizers, profiling, hardened stdlib, qualified compilers. Premium open-source first;browse the hub.