nowfound

Life & fun · August 17, 2022

Match(it): A C++17 pattern-matching library with lots of good stuffs

A lightweight single-header pattern-matching library for C++17 with macro-free APIs. Try it at https://godbolt.org/z/8YMr8Kz8j

Match(it): A C++17 pattern-matching library with lots of good stuffs launched on August 17, 2022 with 85 votes, #432 of 3,307 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 4 years on.

Visit github.com ↗Alternativestop 13% of August 2022

In plain words

Match(it) is a single-header C++17 library that enables pattern matching without macros. Designed for C++ developers, it provides a lightweight approach to pattern matching through a macro-free API. The library is available as a standalone header file, allowing developers to integrate pattern-matching capabilities into their projects with minimal overhead.

written from the facts on this page · September 2026

From the sources

match(it): A lightweight single-header pattern-matching library for C++17 with macro-free APIs. - BowenFu/matchit.cpp

Does a similar job

all alternatives →
  • Matcheroni, a tiny C++20 header library for building lexers/parsers2023 · github.com · ▲96

    Howdy HN, as part of my ongoing programming language experiments I've ended up creating my own C++20 lexing and parsing library of sorts. Matcheroni is an alternative to parser generators and regular expressions that uses trees of C++ templates to implement highly customizable lexers and parsers that have minimal impact on build times or binary sizes, while still remaining comparable in performance to Boost regular expressions. The repo includes two example projects - a simple regex parser in ~300 heavily documented lines of code, and a much larger but not quite finished C99 lexer and…

  • Single-Header Profiler for C++172025 · github.com · ▲68

    Morning HN. I often found myself wondering "how much does this code segment take in terms of total runtime" and it's often quite annoying to figure out with optimizations enabled, especially when working on something new or testing someone else's implementation without the proper tooling set up. Wanted to have a single include lib that would allow us to write something like: ``` PROFILE("Loop 1") for (...) // some work ``` and have the next expression automatically record time & dump results to a table. Wrote a few macros to do exactly that a few months back, but they were…

  • Matches.js -- Powerful Pattern Matching for Javascript2012 · github.com · ▲96

    Powerful pattern matching for Javascript. Contribute to natefaubion/matches.js development by creating an account on GitHub.

  • Cppmatch – Rust-Like Pattern Matching and Error Handling for C++2025 · github.com · ▲42

    I've created cppmatch, a lightweight, header-only C++ library that brings Rust-inspired pattern matching and error handling to C++. It tries to imitate the functionality of the questionmark (?) operator in C++ by using a macro that uses the gcc extension https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html This allows to create exceptionless code with non-intrusive error-as-value that unlike Exceptions, makes it clear which kinds of error a function can generate and forces you to handle (or ignore) them. The ? operator translates to *expect* To handle the errors I…

  • A Fast, Malloc-Free C++14 Json Parser and Encoder2014 · github.com · ▲98

    Meta programming utilities for C++14. Merged in matt-42/lithium - matt-42/iod

  • Drogon – A C++14/17 based high performance HTTP application framework2019 · github.com · ▲189

    Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows - drogonframework/drogon

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, August 2022

the whole month →
  • Xnapper▲1,517

    Take beautiful screenshots instantly

    Work · 2022 · xnapper.com

  • Gamma▲1,169

    Auto-generate decks, docs & social posts inside any workflow

    Work · 2022 · gamma.app

  • Threado▲921

    The command center for community builders

    Life & fun · 2022

  • Build remote engineering teams in 24 hours

    Dev tools · 2022 · remotebase.com

  • Convert Figma designs into Flutter 3.0 & React code rapidly

    Dev tools · 2022 · dhiwise.com

  • PA

    Hey HN, I've been working on https://pornpen.ai, a site for generating adult images. Please only visit the site if you are 18+ and willing to look at NSFW images. This site is an experiment using newer text-to-image models. I explicitly removed the ability to specify custom text to avoid harmful imagery from being generated. New tags will be added once the prompt-engineering algorithm is fine-tuned further. If the servers are overloaded, take a look at the feed and search pages to look through past results. For comments/suggestions/feedback please visit…

    AI · 2022 · pornpen.ai