Skip to content

Instantly share code, notes, and snippets.

View riogu's full-sized avatar
✏️
コンパイラ作成中

egas riogu

✏️
コンパイラ作成中
View GitHub Profile
@riogu
riogu / 1-printable-enum.md
Last active July 18, 2025 22:16
printable C++ enums with macros

a few lines of macros for making a printable enum.

@riogu
riogu / 1-match-construct.md
Last active July 24, 2025 15:30
match construct for std::variant using macros

using some templates with some hacky macros to allow matching on the contents of a std::variant, and getting the underlying value immediately.

also ignores if we match() on unique_ptr/shared_ptr/stack variable, match() works the same.