foonathan/type_safe
Zero overhead utilities for preventing bugs at compile time observed · 2026-08-28
Health v2 · maintenance only
44/100
- Activity 46
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3616
- days_rel: n/a
- days_push: 324
- n_releases_24m: 0
Adoption not part of the score
1649 stars · 128 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A C++ library providing zero-overhead abstractions that leverage the type system to prevent bugs at compile time. It offers improved wrappers for built-in types, vocabulary types like non-null references, and enhanced optional/variant implementations.
Use cases
- prevent integer overflow and lossy conversion bugs at compile time
- enforce non-null pointers in C++ APIs
- replace raw bool parameters with expressive flag types
- get a space-efficient optional type with no overhead
- make C++ APIs safer using strong typedefs
- constrain values with validated types
When to choose
- you write modern C++ and want compile-time prevention of common bugs like uninitialized values or lossy conversions
- you need zero runtime overhead in release builds while keeping debug-mode assertions
- you want safer alternatives to std::optional, std::variant, and raw pointers
When to avoid
- you work in a language other than C++
- you need runtime type safety or dynamic validation rather than compile-time guarantees
- your codebase cannot adopt C++11 or newer standards
Facets
library · maturity active
type-system error-handling programming-languages developer-tools cpp cross-platform type-safety zero-overhead vocabulary-types strong-typedefs header-only optional variant algorithms
1 source
- readme: https://github.com/foonathan/type_safe · fetched 2026-08-28 · c1d63658e8d5
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| foonathan/type_safe | main | 44 |
For agents
markdown · JSON · MCP: product_card(name="foonathan/type_safe")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem