$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r74541 - trunk/boost/unordered/detail
From: dnljms_at_[hidden]
Date: 2011-09-23 16:27:23
Author: danieljames
Date: 2011-09-23 16:27:22 EDT (Fri, 23 Sep 2011)
New Revision: 74541
URL: http://svn.boost.org/trac/boost/changeset/74541
Log:
Unordered: Don't use `BOOST_UNORDERED_HAS_FUNCTION` with Sun.
Something is causing the sun compiler to crash. I don't know if it's the
member detection or testing if the member if callable, so try disabling
the callable test to see if that works better.
Text files modified: 
   trunk/boost/unordered/detail/allocator_helpers.hpp |    69 ++++++++++++++++++++++++++------------- 
   1 files changed, 45 insertions(+), 24 deletions(-)
Modified: trunk/boost/unordered/detail/allocator_helpers.hpp
==============================================================================
--- trunk/boost/unordered/detail/allocator_helpers.hpp	(original)
+++ trunk/boost/unordered/detail/allocator_helpers.hpp	2011-09-23 16:27:22 EDT (Fri, 23 Sep 2011)
@@ -178,6 +178,9 @@
 
 #if !defined(BOOST_NO_SFINAE_EXPR) || BOOST_WORKAROUND(BOOST_MSVC, >= 1500)
 
+#   define BOOST_UNORDERED_HAVE_CALL_0_DETECTION 1
+#   define BOOST_UNORDERED_HAVE_CALL_N_DETECTION 1
+
     template <typename T, unsigned int> struct expr_test;
     template <typename T> struct expr_test<T, sizeof(char)> : T {};
     template <typename U> static char for_expr_test(U const&);
@@ -203,30 +206,12 @@
         enum { value = sizeof(test<T>(choose())) == sizeof(choice1::type) };\
     }
 
-    template <typename T>
-    BOOST_UNORDERED_HAS_FUNCTION(
-        select_on_container_copy_construction, U const, (), 0
-    );
-
-    // Only supporting the basic copy constructor for now.
-
-    template <typename T, typename ValueType>
-    BOOST_UNORDERED_HAS_FUNCTION(
-        construct, U, (make<ValueType*>(), make<ValueType const>()), 2
-    );
-
-    template <typename T, typename ValueType>
-    BOOST_UNORDERED_HAS_FUNCTION(
-        destroy, U, (make<ValueType*>()), 1
-    );
-
-    template <typename T>
-    BOOST_UNORDERED_HAS_FUNCTION(
-        max_size, U const, (), 0
-    );
-
 #else
 
+#   define BOOST_UNORDERED_HAVE_CALL_0_DETECTION 0
+#   define BOOST_UNORDERED_HAVE_CALL_N_DETECTION \
+    !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
+
     template <typename T> struct identity { typedef T type; };
 
 #define BOOST_UNORDERED_CHECK_MEMBER(count, result, name, member)           \
@@ -298,9 +283,27 @@
         };                                                                  \
     }
 
+#endif
+
+#if BOOST_UNORDERED_HAVE_CALL_0_DETECTION
+    template <typename T>
+    BOOST_UNORDERED_HAS_FUNCTION(
+        select_on_container_copy_construction, U const, (), 0
+    );
+
+    template <typename T>
+    BOOST_UNORDERED_HAS_FUNCTION(
+        max_size, U const, (), 0
+    );
+#else
     template <typename T>
     BOOST_UNORDERED_HAS_MEMBER(select_on_container_copy_construction);
 
+    template <typename T>
+    BOOST_UNORDERED_HAS_MEMBER(max_size);
+#endif
+
+#if BOOST_UNORDERED_HAVE_CALL_N_DETECTION
     template <typename T, typename ValueType>
     BOOST_UNORDERED_HAS_FUNCTION(
         construct, U, (make<ValueType*>(), make<ValueType const>()), 2
@@ -310,10 +313,12 @@
     BOOST_UNORDERED_HAS_FUNCTION(
         destroy, U, (make<ValueType*>()), 1
     );
-
+#else
     template <typename T>
-    BOOST_UNORDERED_HAS_MEMBER(max_size);
+    BOOST_UNORDERED_HAS_MEMBER(construct);
 
+    template <typename T>
+    BOOST_UNORDERED_HAS_MEMBER(destroy);
 #endif
 
     template <typename Alloc>
@@ -513,4 +518,20 @@
     };
 }}}
 
+#undef BOOST_UNORDERED_DEFAULT_TYPE_TMPLT
+#undef BOOST_UNORDERED_DEFAULT_TYPE
+#undef BOOST_UNORDERED_HAVE_CALL_0_DETECTION
+#undef BOOST_UNORDERED_HAVE_CALL_N_DETECTION
+#undef BOOST_UNORDERED_HAS_FUNCTION
+#if defined(BOOST_UNORDERED_CHECK_EXPRESSION)
+#   undef BOOST_UNORDERED_CHECK_EXPRESSION
+#   undef BOOST_UNORDERED_DEFAULT_EXPRESSION
+#endif
+#if defined(BOOST_UNORDERED_HAS_MEMBER)
+#   undef BOOST_UNORDERED_HAS_MEMBER
+#   undef BOOST_UNORDERED_CHECK_MEMBER
+#   undef BOOST_UNORDERED_DEFAULT_MEMBER
+#   undef BOOST_UNORDERED_WRAP_PARAMATERS
+#endif
+
 #endif