Seriously... I am fine with one big PR, but it will be big. (adding one line, removing 3 for each header) I think it is easier to do smaller batches Jason On Monday, July 31, 2017, 3:19:33 PM CDT, Jason Kenny <jke...@yahoo-inc.com.INVALID> wrote:
So we should make a massive PR to fix all headers? This is not some ploy to say you got rid of the more lines of code. :-) Jason On Monday, July 31, 2017, 2:09:54 PM CDT, Phil Sorber <sor...@apache.org> wrote: I agree with James, we should have one PR that does all this and then we maintain going forward. I was trying to see if clang-tidy had anything that supports this but I could not find it. On Mon, Jul 31, 2017 at 12:08 PM Jason Kenny <jke...@yahoo-inc.com.invalid> wrote: > I don't see the need for making more complex configure checks... this is a > supported feature of all compilers that supports C++11. > Jason > On Monday, July 31, 2017, 11:17:37 AM CDT, James Peach <jpe...@apache.org> > wrote: > > > > On Jul 31, 2017, at 8:11 AM, Alan Carroll > <solidwallofc...@yahoo-inc.com.INVALID> wrote: > > > > I'll put in for allowing #pragma once. AFAIK it's supported by all the > compilers we support and is reasonably standard usage. I have read up on > the problems that can arise and IMHO those are better dealt with by > cleaning up the includes and source structure rather than depending on > being saved by include guards. > > Then let's add a configure check to enforce that the compiler supports > this and make a sweep over the whole codebase. I would like to avoid the > kind of never-ending transition we have seen with this kind of thing in the > past. > > > > > > > > > On Monday, July 31, 2017, 9:54:59 AM CDT, Jason Kenny > <jke...@yahoo-inc.com.INVALID> wrote: > > > > I want to bump this again. I started moving to this already. However > James Peach was wanting to talk about this in dev for a different code > review by someone else. I personally took the lack of discussion here a > sign this was obvious ok, and a good thing to do as it is generally > standard practice by most modern C++ people. However, this may not be so. > So I want to bring the discussion on this again, for those that want to use > inefficient #ifdef guards over the more modern #prgama once replacement. > > Jason > > > > On Friday, July 7, 2017, 2:07:14 PM CDT, Jason Kenny < > jke...@yahoo-inc.com> wrote: > > > > Hi all, > > I would suggest we start using > > #pragma once > > instead of the classic header guard of > > #ifndef MYHEADER_H > > #define MYHEADER_H > > ...#endif //MYHEADER_H > > The reason for this is that #pragma once: > > 1) is supported on all the compilers and all the platform combination we > use for quite some time now. 2) it is easier to use than trying to deal > with header guards, such as getting the name correct etc..3) the compiler > already can optimize loading of headers better with pragma once, so compile > times will only be faster and safer than before > > I suggest we allow the usage on new headers or in a code diff in which > we clean up the code. We can use both at the same time without issue. This > is a very safe and nice change to make > > Jason >