Upon further reflection, I'm going to drop this idea for now.  I mostly wanted 
#pragma once to attempt to clean up some of the verbosity and boilerplate of 
the header files, but there are use cases where someone might want to be able 
to tell if a header has been included or not, and the include guards are the 
way to do that.  #pragma once will never support such a thing.

Thanks for the feedback,

Howard

On Feb 8, 2010, at 10:52 AM, Black, Michael (IS) wrote:

> Just one objection -- it's not "standard".
>  
> http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Windows_Code#Windows_Code
>  
> If you intend to restrict your code to only compatible compilers, then fine.  
> The other recommendations I saw said to use both #ifdef and #pragma once -- 
> then you get both.  But if maximum portability is not your concern.....
>  
> Looks like it's still in the throws of being implemented -- and without it 
> being a standard it seems risky...
>  http://software.intel.com/en-us/articles/cdiag1782/
> If it ain't broke -- don't fix it... 
>  
> Michael D. Black
> Senior Scientist
> Northrop Grumman Mission Systems
>  
> 
> From: [email protected] on behalf of Howard Butler
> Sent: Mon 2/8/2010 9:06 AM
> To: [email protected]
> Subject: [Liblas-devel] #pragma once
> 
> All,
> 
> I would like to remove our #ifdef-style include guards in all of our .hpp and 
> .h files and instead use the "#pragma once" [1] compiler directive.  I can't 
> think of any compilers that people are using with libLAS that do not support 
> this directive, and it will cut down on a lot of the boilerplate that exists 
> in the headers.
> 
> Any objections?
> 
> Howard
> 
> [1] 
> http://en.wikipedia.org/wiki/Pragma_once_______________________________________________
> Liblas-devel mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/liblas-devel
> 
> _______________________________________________
> Liblas-devel mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/liblas-devel

_______________________________________________
Liblas-devel mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/liblas-devel

Reply via email to