logoalt Hacker News

kevin_thibedeau12/09/20241 replyview on HN

> Since indentation is generally not used there,

Then indent your macros for readability. clang-format can do it for you if you don't want to maintain them.


Replies

eqvinox12/09/2024

Thanks but I'm not asking for a better way to handle #ifdef's, indenting them is extra work¹ and there's still an unnecessary outermost block for the include guard. You've also not made any further argument against the use of "#pragma once".

¹ especially across an open source project with more than a hundred contributors from a multitude of companies.