# Announcing beman.indirect

**URL:** <https://discourse.bemanproject.org/t/announcing-beman-indirect/571>\
**Category:** Beman Libraries\
**Created:** [April 2, 2026, 7:36pm UTC](https://discourse.bemanproject.org/t/announcing-beman-indirect/571 "2026-04-02T19:36:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsankel](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.bemanproject.org/dsankel/32/5_2.png) [@dsankel](https://discourse.bemanproject.org/u/dsankel)\
**Post date:** [April 2, 2026, 7:36pm UTC](https://discourse.bemanproject.org/t/announcing-beman-indirect/571/1 "2026-04-02T19:36:10Z")

</div>

I’m happy to announce that [beman.indirect](https://github.com/bemanproject/indirect) is now available. It implements `std::indirect` and `std::polymorphic` as proposed in [https://wg21.link/P3019R14](https://wg21.link/P3019R14) — vocabulary types for composite class design that provide value semantics for owned heap-allocated objects.

### What’s in the library

- `indirect<T>`: Owns a heap-allocated T with deep-copy semantics and const-propagation.
- `polymorphic<T>`: Owns a heap-allocated object derived from T with polymorphic deep-copy via type erasure.

The library supports C++17 through C++26 across GCC, Clang, AppleClang, and MSVC. C++20 features (concepts, `<=>`, `constexpr` destructors, `[[no_unique_address]]`) are used when available, with SFINAE and explicit operator fallbacks for C++17. The C++17 port adds some complexity, but we have a use case for it in that environment and I think the trade-off is worth it.

### The AI experiment

This was an experiment using [Claude code](https://claude.ai/claude-code) to do the bulk of the implementation work. The result, I think, speaks for itself — it’s a complete, tested, CI-passing implementation. The total token cost was about $40, and the whole effort took roughly half a day.

That said, this was not a case of “press a button and walk away.” I needed to carefully monitor what Claude was doing throughout and frequently prompt it with my C++ expertise — knowledge of the standard, Beman conventions like `[CPP.NO_FLAG_FORKING]`, and judgment calls about the right approach. It wouldn’t have worked without that.

### Broader implications

I think we should have a broader conversation about how AI tooling will impact the Beman project. The fact that a complete library implementation — including C++17 compatibility, CI, tests, and examples — could be done in about half a day is notable. If I get a few spare moments, I’ll write up a more detailed experience report.

Feedback and contributions welcome!
