Consider using clang-format
Another project I'm working on uses clang-format to automatically format the source code based on pre-specified rules: https://www.clangpowertools.com/blog/getting-started-with-clang-format-style-options.html
I've found it works pretty well. The only downside is that everyone would need to have it on their machine and run it before committing so as not to mess up the commit history. I know there's straightforward integration with Atom and vim, but I down't know about other editors.