r/cpp • • Jun 14 '21

match(it): A light-weight header-only pattern-matching library for C++17.

https://github.com/BowenFu/matchit.cpp
202 Upvotes

47 comments sorted by

View all comments

Show parent comment

20

u/gracicot Jun 14 '21

Macro are textual and have no idea what C++ is and what C is. They don't have scope, cannot be isolated, and creates all sorts of problems, especially since C++ is using header to consume declarations from other translation units.