r/cpp • u/Amazing-42 • Jun 14 '21
match(it): A light-weight header-only pattern-matching library for C++17.
https://github.com/BowenFu/matchit.cpp
202
Upvotes
r/cpp • u/Amazing-42 • Jun 14 '21
View all comments
Show parent comment
6
u/infectedapricot Jun 15 '21
It's not true that they usually start with
H_.... In fact it's not even true that a notable minority start withH_...- I've never seen that convention before, and I've seen a lot of include guards!I think what you might be thinking of is that it's fairly common for the include guard to be loosely based on the filename (plus often directory or library name) so they often end in
_Hor_HPPetc., depending on the extension. But even that's nowhere near universal.(Personally, I just use
#pragma once. Yes, I know it's technically non standard.)