Boost logo

Boost :

Subject: Re: [boost] BOOST_HAS_PRAGMA_ONCE
From: alanbirtles (alan_at_[hidden])
Date: 2015-02-04 12:11:21


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

--
View this message in context: http://boost.2283326.n4.nabble.com/BOOST-HAS-PRAGMA-ONCE-tp4671872p4672042.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk