|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59911 - in branches/release: boost/functional/hash boost/unordered boost/unordered/detail libs/functional/hash libs/functional/hash/doc libs/functional/hash/test libs/unordered libs/unordered/doc libs/unordered/test/exception libs/unordered/test/unordered
From: daniel_james_at_[hidden]
Date: 2010-02-25 14:05:02
Author: danieljames
Date: 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
New Revision: 59911
URL: http://svn.boost.org/trac/boost/changeset/59911
Log:
Merge hash and unordered from trunk.
- Replace uses of deprecated C++0x macros
- Set length of primes inside template on Sun C++. Fixes #3854
- Missing newline at end of file.
Properties modified:
branches/release/boost/functional/hash/ (props changed)
branches/release/boost/unordered/ (props changed)
branches/release/libs/functional/hash/ (props changed)
branches/release/libs/unordered/ (props changed)
Text files modified:
branches/release/boost/functional/hash/hash.hpp | 6 +++---
branches/release/boost/unordered/detail/fwd.hpp | 2 +-
branches/release/boost/unordered/detail/util.hpp | 20 ++++++++++++++------
branches/release/boost/unordered/unordered_map.hpp | 6 +++---
branches/release/boost/unordered/unordered_set.hpp | 6 +++---
branches/release/libs/functional/hash/doc/Jamfile.v2 | 3 ---
branches/release/libs/functional/hash/test/Jamfile.v2 | 4 ++--
branches/release/libs/functional/hash/test/container_no_fwd_test.cpp | 2 +-
branches/release/libs/functional/hash/test/hash_number_test.cpp | 2 +-
branches/release/libs/unordered/doc/Jamfile.v2 | 3 ---
branches/release/libs/unordered/test/exception/insert_exception_tests.cpp | 4 ++--
branches/release/libs/unordered/test/unordered/insert_tests.cpp | 4 ++--
branches/release/libs/unordered/test/unordered/move_tests.cpp | 2 +-
branches/release/libs/unordered/test/unordered/unnecessary_copy_tests.cpp | 10 +++++-----
14 files changed, 38 insertions(+), 36 deletions(-)
Modified: branches/release/boost/functional/hash/hash.hpp
==============================================================================
--- branches/release/boost/functional/hash/hash.hpp (original)
+++ branches/release/boost/functional/hash/hash.hpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -44,7 +44,7 @@
std::size_t hash_value(wchar_t);
#endif
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
std::size_t hash_value(boost::long_long_type);
std::size_t hash_value(boost::ulong_long_type);
#endif
@@ -174,7 +174,7 @@
}
#endif
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
inline std::size_t hash_value(boost::long_long_type v)
{
return hash_detail::hash_value_signed(v);
@@ -408,7 +408,7 @@
BOOST_HASH_SPECIALIZE_REF(std::wstring)
#endif
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
BOOST_HASH_SPECIALIZE(boost::long_long_type)
BOOST_HASH_SPECIALIZE(boost::ulong_long_type)
#endif
Modified: branches/release/boost/unordered/detail/fwd.hpp
==============================================================================
--- branches/release/boost/unordered/detail/fwd.hpp (original)
+++ branches/release/boost/unordered/detail/fwd.hpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -31,7 +31,7 @@
// G = Grouped/Ungrouped
// E = Key Extractor
-#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
# if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
// STLport doesn't have std::forward.
# else
Modified: branches/release/boost/unordered/detail/util.hpp
==============================================================================
--- branches/release/boost/unordered/detail/util.hpp (original)
+++ branches/release/boost/unordered/detail/util.hpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -32,12 +32,6 @@
////////////////////////////////////////////////////////////////////////////
// primes
- template<class T> struct prime_list_template
- {
- static std::size_t const value[];
- static std::ptrdiff_t const length;
- };
-
#define BOOST_UNORDERED_PRIMES \
(5ul)(11ul)(17ul)(29ul)(37ul)(53ul)(67ul)(79ul) \
(97ul)(131ul)(193ul)(257ul)(389ul)(521ul)(769ul) \
@@ -47,14 +41,28 @@
(50331653ul)(100663319ul)(201326611ul)(402653189ul)(805306457ul) \
(1610612741ul)(3221225473ul)(4294967291ul)
+ template<class T> struct prime_list_template
+ {
+ static std::size_t const value[];
+
+#if !defined(SUNPRO_CC)
+ static std::ptrdiff_t const length;
+#else
+ static std::ptrdiff_t const length
+ = BOOST_PP_SEQ_SIZE(BOOST_UNORDERED_PRIMES);
+#endif
+ };
+
template<class T>
std::size_t const prime_list_template<T>::value[] = {
BOOST_PP_SEQ_ENUM(BOOST_UNORDERED_PRIMES)
};
+#if !defined(SUNPRO_CC)
template<class T>
std::ptrdiff_t const prime_list_template<T>::length
= BOOST_PP_SEQ_SIZE(BOOST_UNORDERED_PRIMES);
+#endif
#undef BOOST_UNORDERED_PRIMES
Modified: branches/release/boost/unordered/unordered_map.hpp
==============================================================================
--- branches/release/boost/unordered/unordered_map.hpp (original)
+++ branches/release/boost/unordered/unordered_map.hpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -19,7 +19,7 @@
#include <boost/unordered/detail/equivalent.hpp>
#include <boost/unordered/detail/unique.hpp>
-#if !defined(BOOST_HAS_RVALUE_REFS)
+#if defined(BOOST_NO_RVALUE_REFERENCES)
#include <boost/unordered/detail/move.hpp>
#endif
@@ -159,7 +159,7 @@
~unordered_map() {}
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
unordered_map(unordered_map&& other)
: table_(other.table_, boost::unordered_detail::move_tag())
{
@@ -699,7 +699,7 @@
~unordered_multimap() {}
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
unordered_multimap(unordered_multimap&& other)
: table_(other.table_, boost::unordered_detail::move_tag())
{
Modified: branches/release/boost/unordered/unordered_set.hpp
==============================================================================
--- branches/release/boost/unordered/unordered_set.hpp (original)
+++ branches/release/boost/unordered/unordered_set.hpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -19,7 +19,7 @@
#include <boost/unordered/detail/equivalent.hpp>
#include <boost/unordered/detail/unique.hpp>
-#if !defined(BOOST_HAS_RVALUE_REFS)
+#if defined(BOOST_NO_RVALUE_REFERENCES)
#include <boost/unordered/detail/move.hpp>
#endif
@@ -153,7 +153,7 @@
~unordered_set() {}
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
unordered_set(unordered_set&& other)
: table_(other.table_, boost::unordered_detail::move_tag())
{
@@ -645,7 +645,7 @@
~unordered_multiset() {}
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
unordered_multiset(unordered_multiset&& other)
: table_(other.table_, boost::unordered_detail::move_tag())
{
Modified: branches/release/libs/functional/hash/doc/Jamfile.v2
==============================================================================
--- branches/release/libs/functional/hash/doc/Jamfile.v2 (original)
+++ branches/release/libs/functional/hash/doc/Jamfile.v2 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -5,10 +5,7 @@
xml hash : hash.qbk ;
boostbook standalone : hash :
- <xsl:param>html.stylesheet=../../../../../doc/html/boostbook.css
<xsl:param>boost.root=../../../../..
- <xsl:param>boost.libraries=../../../../libraries.htm
- <xsl:param>navig.graphics=1
<xsl:param>chunk.first.sections=1
<xsl:param>chunk.section.depth=2
Modified: branches/release/libs/functional/hash/test/Jamfile.v2
==============================================================================
--- branches/release/libs/functional/hash/test/Jamfile.v2 (original)
+++ branches/release/libs/functional/hash/test/Jamfile.v2 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -13,8 +13,8 @@
<toolset>gcc:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter"
<toolset>darwin:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter"
<toolset>msvc:<warnings-as-errors>on
- #<toolset>gcc:<warnings-as-errors>on
- #<toolset>darwin:<warnings-as-errors>on
+ <toolset>gcc:<warnings-as-errors>on
+ <toolset>darwin:<warnings-as-errors>on
;
test-suite functional/hash
Modified: branches/release/libs/functional/hash/test/container_no_fwd_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/container_no_fwd_test.cpp (original)
+++ branches/release/libs/functional/hash/test/container_no_fwd_test.cpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -11,4 +11,4 @@
{
std::set<int> x;
std::vector<std::string> y;
-}
\ No newline at end of file
+}
Modified: branches/release/libs/functional/hash/test/hash_number_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_number_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_number_test.cpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -152,7 +152,7 @@
NUMERIC_TEST(long, hash_long)
NUMERIC_TEST(unsigned long, ulong)
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
NUMERIC_TEST_NO_LIMITS(boost::long_long_type, long_long)
NUMERIC_TEST_NO_LIMITS(boost::ulong_long_type, ulong_long)
#endif
Modified: branches/release/libs/unordered/doc/Jamfile.v2
==============================================================================
--- branches/release/libs/unordered/doc/Jamfile.v2 (original)
+++ branches/release/libs/unordered/doc/Jamfile.v2 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -8,10 +8,7 @@
xml unordered : unordered.qbk ;
boostbook standalone : unordered :
- <xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
<xsl:param>boost.root=../../../..
- <xsl:param>boost.libraries=../../../libraries.htm
- <xsl:param>navig.graphics=1
<xsl:param>chunk.first.sections=1
<xsl:param>chunk.section.depth=2
Modified: branches/release/libs/unordered/test/exception/insert_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/insert_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/insert_exception_tests.cpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -39,7 +39,7 @@
}
};
-#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
template <class T>
struct emplace_test1 : public insert_test_base<T>
@@ -238,7 +238,7 @@
(insert_test1)(insert_test2)(insert_test3)(insert_test4) \
(insert_test_rehash1)(insert_test_rehash2)(insert_test_rehash3)
-#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
#define ALL_TESTS (emplace_test1)BASIC_TESTS
#else
#define ALL_TESTS BASIC_TESTS
Modified: branches/release/libs/unordered/test/unordered/insert_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/insert_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/insert_tests.cpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -231,7 +231,7 @@
}
}
-#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
template <class X>
void unique_emplace_tests1(X*,
@@ -403,7 +403,7 @@
((default_generator)(generate_collisions))
)
-#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
UNORDERED_TEST(unique_emplace_tests1,
((test_set)(test_map))
((default_generator)(generate_collisions))
Modified: branches/release/libs/unordered/test/unordered/move_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/move_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/move_tests.cpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -134,7 +134,7 @@
{
test::random_values<T> v(25, generator);
T y(create(v, count, hf, eq, al, 1.0), al);
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
BOOST_TEST(count == test::global_object_count);
#else
BOOST_TEST(
Modified: branches/release/libs/unordered/test/unordered/unnecessary_copy_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/unnecessary_copy_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/unnecessary_copy_tests.cpp 2010-02-25 14:05:01 EST (Thu, 25 Feb 2010)
@@ -31,7 +31,7 @@
: tag_(x.tag_) { ++copies; }
count_copies(count_copies const& x) : tag_(x.tag_) { ++copies; }
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
count_copies(count_copies&& x) : tag_(x.tag_) {
x.tag_ = -1; ++moves;
}
@@ -136,7 +136,7 @@
reset();
T x;
x.emplace(source<BOOST_DEDUCED_TYPENAME T::value_type>());
-#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
COPY_COUNT(1);
#else
COPY_COUNT(2);
@@ -148,7 +148,7 @@
UNORDERED_TEST(unnecessary_copy_emplace_rvalue_test,
((set)(multiset)(map)(multimap)))
-#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
template <class T>
void unnecessary_copy_emplace_move_test(T*)
{
@@ -199,7 +199,7 @@
x.emplace(source<count_copies>());
COPY_COUNT(1); MOVE_COUNT(0);
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
// No move should take place.
reset();
x.emplace(std::move(a));
@@ -271,7 +271,7 @@
//x.emplace(a_ref);
//COPY_COUNT(0); MOVE_COUNT(0);
-#if defined(BOOST_HAS_RVALUE_REFS)
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
// No move should take place.
// (since a is already in the container)
reset();
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