Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74319 - trunk/libs/unordered/test/unordered
From: dnljms_at_[hidden]
Date: 2011-09-08 17:11:17


Author: danieljames
Date: 2011-09-08 17:11:16 EDT (Thu, 08 Sep 2011)
New Revision: 74319
URL: http://svn.boost.org/trac/boost/changeset/74319

Log:
Unordered: Sunpro doesn't have nullary `emplace()`.
Text files modified:
   trunk/libs/unordered/test/unordered/insert_tests.cpp | 4 ++++
   trunk/libs/unordered/test/unordered/unnecessary_copy_tests.cpp | 4 ++++
   2 files changed, 8 insertions(+), 0 deletions(-)

Modified: trunk/libs/unordered/test/unordered/insert_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/insert_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/insert_tests.cpp 2011-09-08 17:11:16 EDT (Thu, 08 Sep 2011)
@@ -541,9 +541,11 @@
 {
     boost::unordered_map<int, overloaded_constructor> x;
 
+#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
     x.emplace();
     BOOST_TEST(x.find(0) != x.end() &&
         x.find(0)->second == overloaded_constructor());
+#endif
 
     x.emplace(2, 3);
     BOOST_TEST(x.find(2) != x.end() &&
@@ -569,8 +571,10 @@
     boost::unordered_set<overloaded_constructor> x;
     overloaded_constructor check;
 
+#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
     x.emplace();
     BOOST_TEST(x.find(check) != x.end() && *x.find(check) == check);
+#endif
 
     x.clear();
     x.emplace(1);

Modified: trunk/libs/unordered/test/unordered/unnecessary_copy_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/unnecessary_copy_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/unnecessary_copy_tests.cpp 2011-09-08 17:11:16 EDT (Thu, 08 Sep 2011)
@@ -238,6 +238,7 @@
         // 0 arguments
         //
 
+#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
         // The container will have to create a copy in order to compare with
         // the existing element.
         reset();
@@ -248,6 +249,7 @@
         // source_cost doesn't make much sense here, but it seems to fit.
         COPY_COUNT(1); MOVE_COUNT(source_cost);
 #endif
+#endif
 
         //
         // 1 argument
@@ -323,10 +325,12 @@
         // 0 arguments
         //
 
+#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
         // COPY_COUNT(1) would be okay here.
         reset();
         x.emplace();
         COPY_COUNT(2); MOVE_COUNT(0);
+#endif
 
         reset();
         x.emplace(boost::unordered::piecewise_construct,


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk