On Tue, Jan 30, 2018 at 5:36 AM, Brandon Williams <bmw...@google.com> wrote: > A while back there was some discussion of getting our codebase into a state > where we could use a c++ compiler if we wanted to (for various reason like > leveraging c++ only analysis tools, etc.). Johannes Sixt had a very large
I would be more convinced if I knew exactly what leverage we could have here (e.g. what tool, how many problems it caught...). > patch that achieved this but it wasn't in a state where it could be > upstreamed. > I took that idea and did some removals of c++ keywords (new, template, try, > this, etc) but broke it up into several (well maybe more than several) > patches. > I don't believe I've captured all of them in this series but this is at least > moving a step closer to being able to compile using a c++ compiler. Is it simpler (though hacky) to just do #ifdef __cplusplus #define new not_new #define try really_try ... somewhere in git-compat-util.h? Do we use any C features that are incompatible with C++? (or do we not need to care?) > I don't know if this is something the community still wants to move towards, > but if this is something people are still interested in, and this series is > wanted, then we can keep doing these sort of conversions in chunks slowly. You're going to need to setup C++ build job on Travis or something to catch new C++ keywords from entering the code base as well if you move this to the end. -- Duy