Proxy 4.1.0 is a focused feature-and-ergonomics release. It smooths out the authoring experience, delivers dramatic compile-time speedups, adds a low-level dispatch optimization hook, and broadens portability to freestanding environments and Bazel. All while staying source-compatible with 4.0.x.
What's inside
Ergonomics and API
- Unqualified
invokeandreflect.pro::proxyandpro::proxy_indirect_accessornow exposeinvokeandreflectas hidden friend functions, so dispatch and reflector authors no longer need to qualify their calls.proxy_invokeandproxy_reflectare deprecated in favor of the unqualified forms. (#23) - A clearer facade-composition API. New
add_facade_with_substitutiononbasic_facade_buildersays what it does at the call site, replacing the terseadd_facade<F, true>. (#27) - New optimization hook:
reinterpret_invoke. When the concrete contained pointer type is already known at a call site,reinterpret_invokedispatches directly against that type: no type erasure, no runtime metadata lookup, no virtual call. Reach for it on hot paths or when authoring custom dispatch types and accessors. Ordinary code should still preferinvoke. (#36) - Clearer diagnostics. A facade with an ill-formed facade-aware overload now produces a focused, actionable error instead of a cascade of unrelated failures. (#29)
- The feature-test macro
__msft_lib_proxyis now202606L.
Performance
- Convention-heavy facades compile dramatically faster: roughly +29% with 10 conventions, +71% with 30, and up to ~8.5× with 200. A special thanks to @Kim-J-Smith for his insights. (#32)
Portability
- First-class Bazel support. Proxy now integrates with Bazel alongside CMake and Meson. Bzlmod (Bazel 7+) is the recommended path (
bazel_dep(name = "proxy", version = "4.1.0")). LegacyWORKSPACEmode is supported back to Bazel 5.1+. SeeREADME.mdfor setup. (#40) - Freestanding modules support. Proxy is now validated in freestanding environments, including its C++20 module, with coverage across all three build systems. (#49)
- Built-in compatibility guards. Proxy emits a clear error on pre-C++20 compilers and actively guards against a known clang-cl miscompile (llvm/llvm-project#143245) that could otherwise silently corrupt
pro::proxy. (#50)
Tooling and CI
- Aligned CMake/Meson build configuration and made doc-example testing reconfigure promptly when docs change. (#39)
- Added pre-commit hooks, a
CONTRIBUTING.md, and a lint CI job. (#41) - Stood up automated weekly dependency updates (self-hosted Renovate plus a companion script for CMake/Meson pins). (#43, #46, #47, #48)
- Refreshed toolchains and dependencies: Clang 22, NVHPC 26.3, Google Benchmark 1.9.5, a Clang 21 regression job, and assorted action/dependency bumps. (#25, #44, #52, #31, #22)
- Fixed a benchmark bug that also improved the reported numbers. (#26)
Deprecations
Deprecated APIs still compile and work; they emit deprecation warnings.
| Deprecated | Use instead |
|---|---|
proxy_invoke / proxy_reflect |
unqualified invoke / reflect |
add_facade<F, true> |
add_facade_with_substitution |
Upgrading
Most users can update to 4.1.0 and rebuild while public APIs are source-compatible. The deprecated APIs above still compile and work. Migrate to their replacements at your convenience to silence the warnings.
Full Changelog: 4.0.2...4.1.0