From 0b75ce040552967dc9070c4e3bbe49321b624ba9 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 24 Apr 2014 11:32:11 +0100 Subject: [PATCH 1/4] Update comments to reflect https://svn.boost.org/trac/boost/ticket/9595 --- include/boost/config/user.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/boost/config/user.hpp b/include/boost/config/user.hpp index 5a4a9d47..d226a2d1 100644 --- a/include/boost/config/user.hpp +++ b/include/boost/config/user.hpp @@ -85,8 +85,7 @@ // (this macro is used to turn on __declspec(dllimport) modifiers, so that // the compiler knows which symbols to look for in a dll rather than in a // static library). Note that there may be some libraries that can only -// be statically linked (Boost.Test for example) and others which may only -// be dynamically linked (Boost.Threads for example), in these cases this +// be linked in one way (statically or dynamically), in these cases this // macro has no effect. // #define BOOST_ALL_DYN_LINK @@ -97,9 +96,9 @@ // BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) // modifiers, so that the compiler knows which symbols to look for in a dll // rather than in a static library). -// Note that there may be some libraries that can only be statically linked -// (Boost.Test for example) and others which may only be dynamically linked -// (Boost.Threads for example), in these cases this macro is unsupported. +// Note that there may be some libraries that can only +// be linked in one way (statically or dynamically), +// in these cases this macro is unsupported. // #define BOOST_WHATEVER_DYN_LINK // BOOST_ALL_NO_LIB: Tells the config system not to automatically select From c89ac4829568a84720b174d83d765482373774fd Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Thu, 8 May 2014 11:13:43 -0700 Subject: [PATCH 2/4] BOOST_NO_CXX11_ALLOCATOR should be defined with libc++ in C++03 mode --- include/boost/config/stdlib/libcpp.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index 761017f2..88184ef9 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -23,6 +23,14 @@ # define BOOST_NO_CXX11_HDR_TUPLE #endif +// BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11 +// allocator model. The C++11 allocator model requires a conforming +// std::allocator_traits which is only possible with C++11 template +// aliases since members rebind_alloc and rebind_traits require it. +#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES) +# define BOOST_NO_CXX11_ALLOCATOR +#endif + // // These appear to be unusable/incomplete so far: // From ac11ae9890786678325e6d02795fed9f60b631d2 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Thu, 8 May 2014 11:53:50 -0700 Subject: [PATCH 3/4] Add test case for BOOST_NO_CXX11_ALLOCATOR --- test/boost_no_cxx11_allocator.ipp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/boost_no_cxx11_allocator.ipp b/test/boost_no_cxx11_allocator.ipp index 07eb35e0..84ec78ee 100644 --- a/test/boost_no_cxx11_allocator.ipp +++ b/test/boost_no_cxx11_allocator.ipp @@ -31,11 +31,13 @@ int test() std::allocator ia; std::allocator_traits >::rebind_alloc ra(ia); std::allocator* pva = &ra; + std::allocator_traits >::rebind_traits::pointer pt; (void)aat; (void)ua; (void)at; (void)pva; + (void)pt; return 0; } From 72dff45159d856366da556769aa16e1f4ec6c7ea Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Tue, 20 May 2014 15:38:03 -0500 Subject: [PATCH 4/4] Add constants for memory models used by gnu "__ATOMIC..." intrinsics. These should be supplied by the compiler, but until they are we will define them here. Once they are defined in the compiler we will need to start sorting out compiler versions in cray.hpp --- include/boost/config/compiler/cray.hpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/cray.hpp b/include/boost/config/compiler/cray.hpp index c2adff69..f0d2776d 100644 --- a/include/boost/config/compiler/cray.hpp +++ b/include/boost/config/compiler/cray.hpp @@ -25,11 +25,12 @@ // -// Cray peculiarities, probably version 7 specific: // +#define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_HAS_NRVO +#define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_UNICODE_LITERALS @@ -64,4 +65,24 @@ #define BOOST_SP_USE_PTHREADS #define BOOST_AC_USE_PTHREADS +/* everything that follows is working around what are thought to be + * compiler shortcomings. Revist all of these regularly. + */ + +//#define BOOST_USE_ENUM_STATIC_ASSERT +//#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define + +// These constants should be provided by the +// compiler, at least when -hgnu is asserted on the command line. + +#ifndef __ATOMIC_RELAXED +#define __ATOMIC_RELAXED 0 +#define __ATOMIC_CONSUME 1 +#define __ATOMIC_ACQUIRE 2 +#define __ATOMIC_RELEASE 3 +#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_SEQ_CST 5 +#endif + +