Boost logo

Boost :

Subject: Re: [boost] BOOST_HAS_PRAGMA_ONCE
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2015-02-04 12:18:09

El 04/02/2015 a las 18:11, alanbirtles escribió:
> Stephen Kelly-2 wrote
>> You added
>> +#ifndef BOOST_CONFIG_HPP
>> +# include <boost/config.hpp>
>> +#endif
>> instead of
>> +#include <boost/config.hpp>
>> Why the needless noise?
> In theory the former prevents the compiler from opening the file at all
> whereas for the latter the compiler would have to open and reparse the
> header file. In reality as far as I know most modern compilers are aware of
> include guards and #pragma once and will not reparse headers when they are
> included multiple times

Yes, it should be a very tiny help.. except if config.hpp also uses
pragma once ;-)



Boost list run by bdawes at, gregod at, cpdaniel at, john at