In all the new IDEs when using open and close curly brackets the auto-formatting usually indents, and uses the extendable block (with the + sign) even if it is not necessary.
For example, I like when all my functions have there own little extendable block but when I place them all in a namespace it makes unnecessary indent and my functions no-longer have the block i.e.
namespace my {
int myfunc() {
code
more code
}
}
instead of preferred version --
namespace my {
int myfunc() {
code
more code
}
}
It always bothered me, but now I randomly thought of a solution, using defines!
#define OPENBRACKET {
#define CLOSEBRACKET }
namespace my OPENBRACKET
int myfunc() {
code
more code
}
CLOSEBRACKET
I was so happy, I had to share it with someone :D.
P.S. I love the C-styled #defines :icon_evil: