using enum declaration
2 is a big number in programming. When something repeat more than one time in the code, I tend to pack them in a function, member function or lambda, depend of the context.
using enum
declaration added by C++20 and allows us to avoid qualifying enum type when reaching enumerators. With it, instead of:
Expr Parser::comparison() { |
we can write:
Expr Parser::comparison() { |
Thanks for reading :)
more on: