IMHO precompiled headers are only useful if used on headers that do not or at 
most rarely change. That leaves little options for which headers to include:

Including the standard C/C++ headers in a precompiled header is useful. These 
should not change anyways.

The question if other headers change _rarely_ boils down to your usage pattern. 
If you are a OSG library developer you would probably not like it if you have 
to compile all of the osg libraries if you change just any one header in the 
core osg library. This is one of the consequences though if one takes the 
precompiled headers a step to far, because all .cpp files will depend on the 
precompiled header, which in its turn depends on the headers it includes. On 
the other hand, people who just compile the whole of OSG from source once in a 
while will probably experience a significant speedup if using precompiled 
headers. This is one reason it is very important to make precompiled headers 
optional using cmake, probably defaulting to off.

    Erik den Dekker

On 19-01-2010, at 06:37, Ulrich Hertlein wrote:

> On 19/01/10 15:21 , Martin Beckett wrote:
>> This causes an issue with ShadowVolumeOccluder which defines a std::pair 
>> named Point,
>> but the precompiled header already includes an osg::Point.  
>> ShadowVolumeOccluder  has a
>> "using namespace osg" which leads to a clash.
>> ... 
>> Would it be a good idea to avoid "using namespace osg" in the headers?
> 
> Absolutely!
> 
> In which OSG include file do you find this?  My version of 
> ShadowVolumeOccluder hasn't it
> and a grep on svn trunk doesn't show anything too...
> 
> /ulrich
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to