[Boost-bugs] [Boost C++ Libraries] #1532: #pragma once

Subject: [Boost-bugs] [Boost C++ Libraries] #1532: #pragma once
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-12-21 00:37:42


#1532: #pragma once
--------------------------+-------------------------------------------------
 Reporter: NN | Type: Feature Requests
   Status: new | Milestone: Boost 1.35.0
Component: None | Version: Boost 1.34.1
 Severity: Optimization | Keywords:
--------------------------+-------------------------------------------------
 The most of modern compilers do support #pragma once feature.
 This can reduce significantly the compilation time.
 Boost should use this too.

 Proposal:
 In boost/config.hpp define the BOOST_ONCE macro: (Of course this should be
 defined in the right compiler configuration header file)
 {{{
 !#cpp
 // VC >4.0
 // GCC >=4.30
 // ICC >10
 #if (defined(_MSC_VER) && _MSC_VER > 1000) || \
     (defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 30) ||
 (__GNUC__ > 4))) || \
     (defined(__ICC) && __ICC > 1000)
 # define BOOST_ONCE once
 #else
 # define BOOST_ONCE message("")
 #endif
 }}}

 Using in other files:
 boost/xxx/yyy.hpp
 {{{
 !#cpp
 #ifndef BOOST_XXX_YYY_INCLUDED
 #define BOOST_XXX_YYY_INCLUDED

 #include <boost/config.hpp>

 #pragma BOOST_ONCE

 #endif // BOOST_XXX_YYY_INCLUDED
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1532>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC