Boost logo

Boost :

Subject: Re: [boost] Guidence on #pragma once
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-11-24 00:01:41


AMDG

On 11/23/2018 04:36 PM, Robert Ramey via Boost wrote:
> In the safe numerics library my *.hpp files start with the following
> boiler plate:
>
> #ifndef BOOST_NUMERIC_AUTOMATIC_HPP
> #define BOOST_NUMERIC_AUTOMATIC_HPP
>
> // MS compatible compilers support #pragma once
> #if defined(_MSC_VER) && (_MSC_VER >= 1020)
> # pragma once
> #endif
>
> ...
>
> I would like to replace all this in every file with just
>
> #pragma once
>
> <snip> It would be
> interesting to know what others might have to say about this.
>

I never use #pragma once. It just isn't
compelling enough to make me write
non-standard code.

In Christ,
Steven Watanabe


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