forked from boostorg/config
Added BOOST_HAS_PRAGMA_ONCE for compilers that support it. The macro was already defined for DMC, but not for other compilers and was not documented.
[SVN r84796]
This commit is contained in:
@ -397,6 +397,12 @@ See [@../../../../boost/operators.hpp `<boost/operators.hpp>`] for example.
|
|||||||
The standard library has a partially conforming `std::allocator` class, but
|
The standard library has a partially conforming `std::allocator` class, but
|
||||||
without any of the member templates.
|
without any of the member templates.
|
||||||
]]
|
]]
|
||||||
|
[[`BOOST_HAS_PRAGMA_ONCE`][Compiler][
|
||||||
|
The compiler recognizes the `#pragma once` directive which tells that the
|
||||||
|
containing header should be included only once while preprocessing the
|
||||||
|
current translation unit. The pragma may improve compile times of large projects
|
||||||
|
with some compilers.
|
||||||
|
]]
|
||||||
[[`BOOST_HAS_PTHREAD_DELAY_NP`][Platform][
|
[[`BOOST_HAS_PTHREAD_DELAY_NP`][Platform][
|
||||||
The platform has the POSIX API `pthread_delay_np`.
|
The platform has the POSIX API `pthread_delay_np`.
|
||||||
]]
|
]]
|
||||||
|
@ -283,7 +283,3 @@
|
|||||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||||
|
|
||||||
#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
|
#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
// Clang compiler setup.
|
// Clang compiler setup.
|
||||||
|
|
||||||
|
#define BOOST_HAS_PRAGMA_ONCE
|
||||||
|
|
||||||
#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
|
#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
|
||||||
# define BOOST_NO_EXCEPTIONS
|
# define BOOST_NO_EXCEPTIONS
|
||||||
#endif
|
#endif
|
||||||
|
@ -72,6 +72,12 @@
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Reportedly, #pragma once is supported since C++ Builder 2010
|
||||||
|
#if (__CODEGEARC__ >= 0x620)
|
||||||
|
# define BOOST_HAS_PRAGMA_ONCE
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// C++0x macros:
|
// C++0x macros:
|
||||||
//
|
//
|
||||||
|
@ -54,6 +54,11 @@
|
|||||||
# define BOOST_NO_LONG_LONG
|
# define BOOST_NO_LONG_LONG
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
// Not sure what version was the first to support #pragma once, but
|
||||||
|
// different EDG-based compilers (e.g. Intel) supported it for ages.
|
||||||
|
// Add a proper version check if it causes problems.
|
||||||
|
#define BOOST_HAS_PRAGMA_ONCE
|
||||||
|
|
||||||
//
|
//
|
||||||
// C++0x features
|
// C++0x features
|
||||||
//
|
//
|
||||||
|
@ -80,6 +80,11 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links
|
||||||
|
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
||||||
|
#define BOOST_HAS_PRAGMA_ONCE
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
|
#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
|
||||||
// Previous versions of GCC did not completely implement value-initialization:
|
// Previous versions of GCC did not completely implement value-initialization:
|
||||||
// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize
|
// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize
|
||||||
|
@ -34,6 +34,10 @@
|
|||||||
// Attempt to suppress VC6 warnings about the length of decorated names (obsolete):
|
// Attempt to suppress VC6 warnings about the length of decorated names (obsolete):
|
||||||
#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
|
#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
|
||||||
|
|
||||||
|
#if _MSC_VER >= 1020
|
||||||
|
# define BOOST_HAS_PRAGMA_ONCE
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// versions check:
|
// versions check:
|
||||||
// we don't support Visual C++ prior to version 6:
|
// we don't support Visual C++ prior to version 6:
|
||||||
|
Reference in New Issue
Block a user