Swap include guards to #ifndef (#271)

Compilers implement a multiple-include optimization where they avoid
preprocessing an included file if it is "properly guarded". Compilers
differ as to what constitutes a "properly guarded" file. In particular,
Microsoft Visual Studio does not recognize `#if !defined(GUARD)` for
the optimization. This does not affect the correctness of using Fusion
on Microsoft Visual Studio, but it will increase the time taken to build
any project on this compiler.

This commit changes all include guards to use `#ifndef`, but leaves all
other `#if !defined` preprocessor directives that are not related to
guarding a file.

Co-authored-by: IncludeGuardian <hello@includeguardian.io>
This commit is contained in:
IncludeGuardian
2024-02-25 04:37:08 +00:00
committed by GitHub
parent 7d4c03fa03
commit ce8b031f54
682 changed files with 682 additions and 682 deletions

View File

@@ -5,7 +5,7 @@
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_EXAMPLE_STRUCT_ITERATOR)
#ifndef BOOST_FUSION_EXAMPLE_STRUCT_ITERATOR
#define BOOST_FUSION_EXAMPLE_STRUCT_ITERATOR
#include <boost/fusion/support/iterator_base.hpp>