> 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

Reply via email to