Re: [PATCH 00/37] removal of some c++ keywords
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jan 30, 2018, 00:13 UTC
- Message-ID
- <CACsJy8Cm8HsopKisiJkwtPyfv-O6Ei3waew6CsKLXzKv7=TriQ@mail.gmail.com>
- In-Reply-To
- <20180129223728.30569-1-bmwill@google.com>
On Tue, Jan 30, 2018 at 5:36 AM, Brandon Williams <bmwill@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...).
Show 5 quoted lines
> 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