cppmatch
github.com · Open source · Quiet
Header-only C++ library for Rust-style pattern matching and error handling
- Developer tools
- Open source
- C++
- Day-7 check
- Day-30 check
- pattern matching
- error handling
- cpp error handling
- rust match c
- header only cpp
- std variant match
- c exceptionless errors
- Stars
- 46
- Forks
- 1
- Open issues
- 0
- Last commit
- Releases
- 2
- Found
- 20 months ago
GitHub figures as of . They are context, not a ranking.
cppmatch is a lightweight, header-only C++ library that adds Rust-style pattern matching and error handling. It uses a GCC extension to imitate the ? operator, and a match construct for std::variant, which suits C++ developers who want explicit error values instead of exceptions.
What it does
- Header-only Rust-style match for std::variant
- Expect macro returns errors early, imitating the ? operator
- Exceptionless error handling with explicit error values
Good for
- Propagate errors without exceptions in a C++ function
- Match on std::variant values with Rust-style syntax
Suits: C++ developers who want explicit error values instead of exceptions.
Worth knowing: Relies on a GCC extension (statement expressions), so it needs GCC or Clang
What you can try
Read the README on GitHub and install from source.
Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.
Found vs. released
Kip first saw cppmatch on , when Rucadi posted it to Show HN. The oldest published release on GitHub is initial_release, dated . Its first tagged release landed the same day it was found. 2 releases have been published in total; the latest is 0.0.1 ().
Day-7 and day-30 updates
Day 7 no new release
- No tagged release was published in the first 7 days after it was found (GitHub release dates).
- Show HN discussion at check time: 42 points, 9 comments. API record
Checked , later than day 7 because tracking began after.
Day 30 1 release shipped
- 1 release in the first 30 days: 0.0.1 (23 Mar 2025)
- Show HN discussion at check time: 42 points, 9 comments. API record
Checked , later than day 30 because tracking began after.
Release timeline every entry links to its source
- Repository created on GitHub: Rucadi/cpp-match
- Release initial_release
- Found: Rucadi posted it to Show HN. Show HN
- Release 0.0.1
- Day-7 check recorded by Kip (details)
- Day-30 check recorded by Kip (details)
Quick answers
- When was cppmatch released?
- Its first tagged release on GitHub is dated 16 Mar 2025. Kip found it on Show HN on 16 Mar 2025.
- Is cppmatch open source?
- Its source is public on GitHub at Rucadi/cpp-match under the MIT licence.
- What does cppmatch run on?
- Library.
- Is cppmatch free?
- It is open source, so the code is free to read and run; check the licence for terms.
- Is cppmatch still maintained?
- It has had no commit or release for over a year as of the latest check.
Provenance
| Source | Record | Last checked |
|---|---|---|
| Show HN | listing official API record | |
| GitHub repository | Rucadi/cpp-match REST API record | |
| GitHub Releases | release list REST API record |
Stable ID hn-43380487. Summary written by KipFound’s editor.
Share
Similar tools
Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.