From 7b5f73f6c296eece53f156be96d554f676fc6de3 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 30 Apr 2017 10:41:22 +0100 Subject: [PATCH] Disable all sunpro workarounds on latest version I have no idea if they're still working. I wasn't able to run the latest solaris in a virtual machine on my computer, so this is the only way to test. --- include/boost/unordered/detail/implementation.hpp | 11 +++++++---- include/boost/unordered/unordered_map.hpp | 8 ++++---- include/boost/unordered/unordered_set.hpp | 8 ++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index 0c1a71ea..6774ce00 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -13,6 +13,7 @@ #pragma once #endif +#include #include #include #include @@ -113,7 +114,9 @@ // #if defined(BOOST_UNORDERED_TUPLE_ARGS) -#elif defined(__SUNPRO_CC) +#elif BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0) +// I had problems with tuples on older versions of the sunpro. +// Might be fixed in an earlier version than I specified here. #define BOOST_UNORDERED_TUPLE_ARGS 0 #elif !defined(BOOST_NO_CXX11_HDR_TUPLE) #define BOOST_UNORDERED_TUPLE_ARGS 10 @@ -239,7 +242,7 @@ template struct prime_list_template { static std::size_t const value[]; -#if !defined(SUNPRO_CC) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) static std::ptrdiff_t const length; #else static std::ptrdiff_t const length = @@ -251,7 +254,7 @@ template std::size_t const prime_list_template::value[] = { BOOST_PP_SEQ_ENUM(BOOST_UNORDERED_PRIMES)}; -#if !defined(SUNPRO_CC) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) template std::ptrdiff_t const prime_list_template::length = BOOST_PP_SEQ_SIZE( BOOST_UNORDERED_PRIMES); @@ -1305,7 +1308,7 @@ inline void construct_value(T* address, BOOST_FWD_REF(A0) a0) // // Used to emulate piecewise construction. -#if !defined(__SUNPRO_CC) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) #define BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(z, n, namespace_) \ template class unordered_map #else -#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) // 0 argument emplace requires special treatment in case // the container is instantiated with a value type that @@ -292,7 +292,7 @@ template class unordered_map #else -#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) iterator emplace_hint(const_iterator hint, boost::unordered::detail::empty_emplace = @@ -1031,7 +1031,7 @@ template class unordered_multimap #else -#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) // 0 argument emplace requires special treatment in case // the container is instantiated with a value type that @@ -1091,7 +1091,7 @@ template class unordered_multimap #else -#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) iterator emplace_hint(const_iterator hint, boost::unordered::detail::empty_emplace = diff --git a/include/boost/unordered/unordered_set.hpp b/include/boost/unordered/unordered_set.hpp index bbd07f60..de8b6ea7 100644 --- a/include/boost/unordered/unordered_set.hpp +++ b/include/boost/unordered/unordered_set.hpp @@ -228,7 +228,7 @@ template class unordered_set #else -#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) // 0 argument emplace requires special treatment in case // the container is instantiated with a value type that @@ -290,7 +290,7 @@ template class unordered_set #else -#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) iterator emplace_hint(const_iterator hint, boost::unordered::detail::empty_emplace = @@ -737,7 +737,7 @@ template class unordered_multiset #else -#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) // 0 argument emplace requires special treatment in case // the container is instantiated with a value type that @@ -797,7 +797,7 @@ template class unordered_multiset #else -#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) +#if !(BOOST_COMP_SUNPRO && BOOST_COMP_SUNPRO < BOOST_VERSION_NUMBER(5,21,0)) iterator emplace_hint(const_iterator hint, boost::unordered::detail::empty_emplace =