|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49855 - in branches/release: . boost/detail boost/functional/detail boost/functional/hash boost/functional/hash/detail boost/spirit/home/classic/iterator boost/unordered boost/unordered/detail libs/functional/hash/doc libs/spirit/classic/test libs/unordered/doc libs/utility tools/boostbook/xsl
From: daniel_james_at_[hidden]
Date: 2008-11-20 17:53:22
Author: danieljames
Date: 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
New Revision: 49855
URL: http://svn.boost.org/trac/boost/changeset/49855
Log:
Merged revisions 49661-49662,49666,49669,49735,49756,49770,49811 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r49661 | danieljames | 2008-11-09 12:03:45 +0000 (Sun, 09 Nov 2008) | 1 line
Move hash detail headers out of boost/functional/detail.
........
r49662 | danieljames | 2008-11-09 12:11:50 +0000 (Sun, 09 Nov 2008) | 1 line
Add a forwarding header for container_fwd.hpp
........
r49666 | danieljames | 2008-11-09 19:12:05 +0000 (Sun, 09 Nov 2008) | 1 line
Avoid comparing default initialised iterators in position_iterator.
........
r49669 | danieljames | 2008-11-09 21:57:38 +0000 (Sun, 09 Nov 2008) | 2 lines
Add link to the header to the synopsis in reference documentation.
Refs #2214
........
r49735 | danieljames | 2008-11-14 12:51:00 +0000 (Fri, 14 Nov 2008) | 1 line
Explicitly specify the template parameters in the unordered container friend, in order to avoid some warnings.
........
r49756 | danieljames | 2008-11-14 16:11:16 +0000 (Fri, 14 Nov 2008) | 1 line
Use pragmas to suppress a Visual C++ warning.
........
r49770 | danieljames | 2008-11-15 13:07:29 +0000 (Sat, 15 Nov 2008) | 1 line
Use the new swap library.
........
r49811 | danieljames | 2008-11-16 23:10:00 +0000 (Sun, 16 Nov 2008) | 1 line
Fix a typo.
........
Added:
branches/release/boost/detail/container_fwd.hpp
- copied unchanged from r49662, /trunk/boost/detail/container_fwd.hpp
branches/release/boost/functional/detail/container_fwd.hpp
- copied unchanged from r49662, /trunk/boost/functional/detail/container_fwd.hpp
branches/release/boost/functional/hash/detail/
- copied from r49662, /trunk/boost/functional/hash/detail/
branches/release/boost/functional/hash/detail/float_functions.hpp
- copied unchanged from r49662, /trunk/boost/functional/hash/detail/float_functions.hpp
branches/release/boost/functional/hash/detail/hash_float.hpp
- copied unchanged from r49662, /trunk/boost/functional/hash/detail/hash_float.hpp
Removed:
branches/release/boost/functional/detail/float_functions.hpp
branches/release/boost/functional/detail/hash_float.hpp
Properties modified:
branches/release/ (props changed)
Text files modified:
branches/release/boost/functional/hash/hash.hpp | 4
branches/release/boost/spirit/home/classic/iterator/position_iterator.hpp | 2
branches/release/boost/unordered/detail/hash_table.hpp | 12 ----
branches/release/boost/unordered/detail/hash_table_impl.hpp | 12 ++--
branches/release/boost/unordered/unordered_map.hpp | 21 ++++++-
branches/release/boost/unordered/unordered_set.hpp | 21 ++++++-
branches/release/libs/functional/hash/doc/changes.qbk | 4 +
branches/release/libs/spirit/classic/test/position_iterator_tests.cpp | 100 ++++++++++++++++++++++++++++++++++++++++
branches/release/libs/unordered/doc/changes.qbk | 4 +
branches/release/libs/utility/in_place_factories.html | 4
branches/release/tools/boostbook/xsl/docbook.xsl | 21 ++++++++
branches/release/tools/boostbook/xsl/function.xsl | 2
branches/release/tools/boostbook/xsl/global.xsl | 1
branches/release/tools/boostbook/xsl/macro.xsl | 1
branches/release/tools/boostbook/xsl/type.xsl | 3 +
15 files changed, 182 insertions(+), 30 deletions(-)
Deleted: branches/release/boost/functional/detail/float_functions.hpp
==============================================================================
--- branches/release/boost/functional/detail/float_functions.hpp 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
+++ (empty file)
@@ -1,158 +0,0 @@
-
-// Copyright 2005-2008 Daniel James.
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#if !defined(BOOST_FUNCTIONAL_DETAIL_FLOAT_FUNCTIONS_HPP)
-#define BOOST_FUNCTIONAL_DETAIL_FLOAT_FUNCTIONS_HPP
-
-#include <boost/config/no_tr1/cmath.hpp>
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// The C++ standard requires that the C float functions are overloarded
-// for float, double and long double in the std namespace, but some of the older
-// library implementations don't support this. On some that don't, the C99
-// float functions (frexpf, frexpl, etc.) are available.
-//
-// Some of this is based on guess work. If I don't know any better I assume that
-// the standard C++ overloaded functions are available. If they're not then this
-// means that the argument is cast to a double and back, which is inefficient
-// and will give pretty bad results for long doubles - so if you know better
-// let me know.
-
-// STLport:
-#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
-# if (defined(__GNUC__) && __GNUC__ < 3 && (defined(linux) || defined(__linux) || defined(__linux__))) || defined(__DMC__)
-# define BOOST_HASH_USE_C99_FLOAT_FUNCS
-# elif defined(BOOST_MSVC) && BOOST_MSVC < 1300
-# define BOOST_HASH_USE_C99_FLOAT_FUNCS
-# else
-# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
-# endif
-
-// Roguewave:
-//
-// On borland 5.51, with roguewave 2.1.1 the standard C++ overloads aren't
-// defined, but for the same version of roguewave on sunpro they are.
-#elif defined(_RWSTD_VER)
-# if defined(__BORLANDC__)
-# define BOOST_HASH_USE_C99_FLOAT_FUNCS
-# define BOOST_HASH_C99_NO_FLOAT_FUNCS
-# elif defined(__DECCXX)
-# define BOOST_HASH_USE_C99_FLOAT_FUNCS
-# else
-# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
-# endif
-
-// libstdc++ (gcc 3.0 onwards, I think)
-#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
-# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
-
-// SGI:
-#elif defined(__STL_CONFIG_H)
-# if defined(linux) || defined(__linux) || defined(__linux__)
-# define BOOST_HASH_USE_C99_FLOAT_FUNCS
-# else
-# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
-# endif
-
-// Dinkumware.
-#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
-// Some versions of Visual C++ don't seem to have the C++ overloads but they
-// all seem to have the c99 float overloads
-# if defined(BOOST_MSVC)
-# define BOOST_HASH_USE_C99_FLOAT_FUNCS
-// On other platforms the C++ overloads seem to have been introduced sometime
-// before 402.
-# elif defined(_CPPLIB_VER) && (_CPPLIB_VER >= 402)
-# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
-# else
-# define BOOST_HASH_USE_C99_FLOAT_FUNCS
-# endif
-
-// Digital Mars
-#elif defined(__DMC__)
-# define BOOST_HASH_USE_C99_FLOAT_FUNCS
-
-// Use overloaded float functions by default.
-#else
-# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
-#endif
-
-namespace boost
-{
- namespace hash_detail
- {
-
- inline float call_ldexp(float v, int exp)
- {
- using namespace std;
-#if defined(BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS) || \
- defined(BOOST_HASH_C99_NO_FLOAT_FUNCS)
- return ldexp(v, exp);
-#else
- return ldexpf(v, exp);
-#endif
- }
-
- inline double call_ldexp(double v, int exp)
- {
- using namespace std;
- return ldexp(v, exp);
- }
-
- inline long double call_ldexp(long double v, int exp)
- {
- using namespace std;
-#if defined(BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS)
- return ldexp(v, exp);
-#else
- return ldexpl(v, exp);
-#endif
- }
-
- inline float call_frexp(float v, int* exp)
- {
- using namespace std;
-#if defined(BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS) || \
- defined(BOOST_HASH_C99_NO_FLOAT_FUNCS)
- return frexp(v, exp);
-#else
- return frexpf(v, exp);
-#endif
- }
-
- inline double call_frexp(double v, int* exp)
- {
- using namespace std;
- return frexp(v, exp);
- }
-
- inline long double call_frexp(long double v, int* exp)
- {
- using namespace std;
-#if defined(BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS)
- return frexp(v, exp);
-#else
- return frexpl(v, exp);
-#endif
- }
- }
-}
-
-#if defined(BOOST_HASH_USE_C99_FLOAT_FUNCS)
-#undef BOOST_HASH_USE_C99_FLOAT_FUNCS
-#endif
-
-#if defined(BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS)
-#undef BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
-#endif
-
-#if defined(BOOST_HASH_C99_NO_FLOAT_FUNCS)
-#undef BOOST_HASH_C99_NO_FLOAT_FUNCS
-#endif
-
-#endif
Deleted: branches/release/boost/functional/detail/hash_float.hpp
==============================================================================
--- branches/release/boost/functional/detail/hash_float.hpp 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
+++ (empty file)
@@ -1,201 +0,0 @@
-
-// Copyright 2005-2008 Daniel James.
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// Based on Peter Dimov's proposal
-// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
-// issue 6.18.
-
-#if !defined(BOOST_FUNCTIONAL_DETAIL_HASH_FLOAT_HEADER)
-#define BOOST_FUNCTIONAL_DETAIL_HASH_FLOAT_HEADER
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-#if defined(BOOST_MSVC)
-#pragma warning(push)
-#if BOOST_MSVC >= 1400
-#pragma warning(disable:6294) // Ill-defined for-loop: initial condition does
- // not satisfy test. Loop body not executed
-#endif
-#endif
-
-#include <boost/functional/detail/float_functions.hpp>
-#include <boost/integer/static_log2.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/limits.hpp>
-#include <boost/assert.hpp>
-
-// Select implementation for the current platform.
-
-// Cygwn
-#if defined(__CYGWIN__)
-# if defined(__i386__) || defined(_M_IX86)
-# define BOOST_HASH_USE_x86_BINARY_HASH
-# endif
-
-// STLport
-#elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
-// fpclassify aren't good enough on STLport.
-
-// GNU libstdc++ 3
-#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
-# if (defined(__USE_ISOC99) || defined(_GLIBCXX_USE_C99_MATH)) && \
- !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
-# define BOOST_HASH_USE_FPCLASSIFY
-# endif
-
-// Dinkumware Library, on Visual C++
-#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
-
-// Not using _fpclass because it is only available for double.
-
-#endif
-
-// On OpenBSD, numeric_limits is not reliable for long doubles, but
-// the macros defined in <float.h> are.
-
-#if defined(__OpenBSD__)
-#include <float.h>
-#endif
-
-namespace boost
-{
- namespace hash_detail
- {
- template <class T>
- struct limits : std::numeric_limits<T> {};
-
-#if defined(__OpenBSD__)
- template <>
- struct limits<long double>
- : std::numeric_limits<long double>
- {
- static long double epsilon() {
- return LDBL_EPSILON;
- }
-
- static long double (max)() {
- return LDBL_MAX;
- }
-
- static long double (min)() {
- return LDBL_MIN;
- }
-
- BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG);
- BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP);
- BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP);
- };
-#endif // __OpenBSD__
-
- inline void hash_float_combine(std::size_t& seed, std::size_t value)
- {
- seed ^= value + (seed<<6) + (seed>>2);
- }
-
-// A simple, non-portable hash algorithm for x86.
-#if defined(BOOST_HASH_USE_x86_BINARY_HASH)
- inline std::size_t float_hash_impl(float v)
- {
- boost::uint32_t* ptr = (boost::uint32_t*)&v;
- std::size_t seed = *ptr;
- return seed;
- }
-
- inline std::size_t float_hash_impl(double v)
- {
- boost::uint32_t* ptr = (boost::uint32_t*)&v;
- std::size_t seed = *ptr++;
- hash_float_combine(seed, *ptr);
- return seed;
- }
-
- inline std::size_t float_hash_impl(long double v)
- {
- boost::uint32_t* ptr = (boost::uint32_t*)&v;
- std::size_t seed = *ptr++;
- hash_float_combine(seed, *ptr++);
- hash_float_combine(seed, *(boost::uint16_t*)ptr);
- return seed;
- }
-
-#else
-
- template <class T>
- inline std::size_t float_hash_impl(T v)
- {
- int exp = 0;
-
- v = boost::hash_detail::call_frexp(v, &exp);
-
- // A postive value is easier to hash, so combine the
- // sign with the exponent.
- if(v < 0) {
- v = -v;
- exp += limits<T>::max_exponent -
- limits<T>::min_exponent;
- }
-
- // The result of frexp is always between 0.5 and 1, so its
- // top bit will always be 1. Subtract by 0.5 to remove that.
- v -= T(0.5);
- v = boost::hash_detail::call_ldexp(v,
- limits<std::size_t>::digits + 1);
- std::size_t seed = static_cast<std::size_t>(v);
- v -= seed;
-
- // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1;
- std::size_t const length
- = (limits<T>::digits *
- boost::static_log2<limits<T>::radix>::value - 1)
- / limits<std::size_t>::digits;
-
- for(std::size_t i = 0; i != length; ++i)
- {
- v = boost::hash_detail::call_ldexp(v,
- limits<std::size_t>::digits);
- std::size_t part = static_cast<std::size_t>(v);
- v -= part;
- hash_float_combine(seed, part);
- }
-
- hash_float_combine(seed, exp);
-
- return seed;
- }
-#endif
-
- template <class T>
- inline std::size_t float_hash_value(T v)
- {
-#if defined(BOOST_HASH_USE_FPCLASSIFY)
- using namespace std;
- switch (fpclassify(v)) {
- case FP_ZERO:
- return 0;
- case FP_INFINITE:
- return (std::size_t)(v > 0 ? -1 : -2);
- case FP_NAN:
- return (std::size_t)(-3);
- case FP_NORMAL:
- case FP_SUBNORMAL:
- return float_hash_impl(v);
- default:
- BOOST_ASSERT(0);
- return 0;
- }
-#else
- return v == 0 ? 0 : float_hash_impl(v);
-#endif
- }
- }
-}
-
-#if defined(BOOST_MSVC)
-#pragma warning(pop)
-#endif
-
-#endif
Modified: branches/release/boost/functional/hash/hash.hpp
==============================================================================
--- branches/release/boost/functional/hash/hash.hpp (original)
+++ branches/release/boost/functional/hash/hash.hpp 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -12,8 +12,8 @@
#include <boost/functional/hash_fwd.hpp>
#include <functional>
-#include <boost/functional/detail/hash_float.hpp>
-#include <boost/functional/detail/container_fwd.hpp>
+#include <boost/functional/hash/detail/hash_float.hpp>
+#include <boost/detail/container_fwd.hpp>
#include <string>
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
Modified: branches/release/boost/spirit/home/classic/iterator/position_iterator.hpp
==============================================================================
--- branches/release/boost/spirit/home/classic/iterator/position_iterator.hpp (original)
+++ branches/release/boost/spirit/home/classic/iterator/position_iterator.hpp 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -289,7 +289,7 @@
OtherDerivedT const &rhs = static_cast<OtherDerivedT const &>(x);
bool x_is_end = rhs._isend;
- return (_isend && x_is_end) || (this->base() == rhs.base());
+ return (_isend == x_is_end) && (_isend || this->base() == rhs.base());
}
protected:
Modified: branches/release/boost/unordered/detail/hash_table.hpp
==============================================================================
--- branches/release/boost/unordered/detail/hash_table.hpp (original)
+++ branches/release/boost/unordered/detail/hash_table.hpp 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -29,6 +29,7 @@
#include <boost/mpl/if.hpp>
#include <boost/mpl/and.hpp>
#include <boost/detail/workaround.hpp>
+#include <boost/utility/swap.hpp>
#include <boost/mpl/aux_/config/eti.hpp>
@@ -58,17 +59,6 @@
static const std::size_t default_initial_bucket_count = 50;
static const float minimum_max_load_factor = 1e-3f;
- template <class T>
- inline void hash_swap(T& x, T& y)
- {
-#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
- std::swap(x,y);
-#else
- using std::swap;
- swap(x, y);
-#endif
- }
-
inline std::size_t double_to_size_t(double f)
{
return f >= static_cast<double>((std::numeric_limits<std::size_t>::max)()) ?
Modified: branches/release/boost/unordered/detail/hash_table_impl.hpp
==============================================================================
--- branches/release/boost/unordered/detail/hash_table_impl.hpp (original)
+++ branches/release/boost/unordered/detail/hash_table_impl.hpp 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -143,8 +143,8 @@
void swap(allocators& x)
{
- unordered_detail::hash_swap(node_alloc_, x.node_alloc_);
- unordered_detail::hash_swap(bucket_alloc_, x.bucket_alloc_);
+ boost::swap(node_alloc_, x.node_alloc_);
+ boost::swap(bucket_alloc_, x.bucket_alloc_);
}
bool operator==(allocators const& x)
@@ -238,10 +238,10 @@
void swap(allocators& x)
{
- unordered_detail::hash_swap(node_alloc_, x.node_alloc_);
- unordered_detail::hash_swap(bucket_alloc_, x.bucket_alloc_);
- unordered_detail::hash_swap(value_alloc_, x.value_alloc_);
- unordered_detail::hash_swap(node_base_alloc_, x.node_base_alloc_);
+ boost::swap(node_alloc_, x.node_alloc_);
+ boost::swap(bucket_alloc_, x.bucket_alloc_);
+ boost::swap(value_alloc_, x.value_alloc_);
+ boost::swap(node_base_alloc_, x.node_base_alloc_);
}
bool operator==(allocators const& x)
Modified: branches/release/boost/unordered/unordered_map.hpp
==============================================================================
--- branches/release/boost/unordered/unordered_map.hpp (original)
+++ branches/release/boost/unordered/unordered_map.hpp 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -21,6 +21,15 @@
#include <boost/unordered/detail/move.hpp>
#endif
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC >= 1400
+#pragma warning(disable:4396) //the inline specifier cannot be used when a
+ // friend declaration refers to a specialization
+ // of a function template
+#endif
+#endif
+
namespace boost
{
template <class Key, class T, class Hash, class Pred, class Alloc>
@@ -385,8 +394,8 @@
friend bool operator==(unordered_map const&, unordered_map const&);
friend bool operator!=(unordered_map const&, unordered_map const&);
#else
- friend bool operator==<>(unordered_map const&, unordered_map const&);
- friend bool operator!=<>(unordered_map const&, unordered_map const&);
+ friend bool operator==<Key, T, Hash, Pred, Alloc>(unordered_map const&, unordered_map const&);
+ friend bool operator!=<Key, T, Hash, Pred, Alloc>(unordered_map const&, unordered_map const&);
#endif
}; // class template unordered_map
@@ -757,8 +766,8 @@
friend bool operator==(unordered_multimap const&, unordered_multimap const&);
friend bool operator!=(unordered_multimap const&, unordered_multimap const&);
#else
- friend bool operator==<>(unordered_multimap const&, unordered_multimap const&);
- friend bool operator!=<>(unordered_multimap const&, unordered_multimap const&);
+ friend bool operator==<Key, T, Hash, Pred, Alloc>(unordered_multimap const&, unordered_multimap const&);
+ friend bool operator!=<Key, T, Hash, Pred, Alloc>(unordered_multimap const&, unordered_multimap const&);
#endif
}; // class template unordered_multimap
@@ -785,4 +794,8 @@
} // namespace boost
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
#endif // BOOST_UNORDERED_UNORDERED_MAP_HPP_INCLUDED
Modified: branches/release/boost/unordered/unordered_set.hpp
==============================================================================
--- branches/release/boost/unordered/unordered_set.hpp (original)
+++ branches/release/boost/unordered/unordered_set.hpp 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -21,6 +21,15 @@
#include <boost/unordered/detail/move.hpp>
#endif
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC >= 1400
+#pragma warning(disable:4396) //the inline specifier cannot be used when a
+ // friend declaration refers to a specialization
+ // of a function template
+#endif
+#endif
+
namespace boost
{
template <class Value, class Hash, class Pred, class Alloc>
@@ -357,8 +366,8 @@
friend bool operator==(unordered_set const&, unordered_set const&);
friend bool operator!=(unordered_set const&, unordered_set const&);
#else
- friend bool operator==<>(unordered_set const&, unordered_set const&);
- friend bool operator!=<>(unordered_set const&, unordered_set const&);
+ friend bool operator==<Value, Hash, Pred, Alloc>(unordered_set const&, unordered_set const&);
+ friend bool operator!=<Value, Hash, Pred, Alloc>(unordered_set const&, unordered_set const&);
#endif
}; // class template unordered_set
@@ -714,8 +723,8 @@
friend bool operator==(unordered_multiset const&, unordered_multiset const&);
friend bool operator!=(unordered_multiset const&, unordered_multiset const&);
#else
- friend bool operator==<>(unordered_multiset const&, unordered_multiset const&);
- friend bool operator!=<>(unordered_multiset const&, unordered_multiset const&);
+ friend bool operator==<Value, Hash, Pred, Alloc>(unordered_multiset const&, unordered_multiset const&);
+ friend bool operator!=<Value, Hash, Pred, Alloc>(unordered_multiset const&, unordered_multiset const&);
#endif
}; // class template unordered_multiset
@@ -742,4 +751,8 @@
} // namespace boost
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
#endif // BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED
Modified: branches/release/libs/functional/hash/doc/changes.qbk
==============================================================================
--- branches/release/libs/functional/hash/doc/changes.qbk (original)
+++ branches/release/libs/functional/hash/doc/changes.qbk 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -69,5 +69,9 @@
* Changed the warnings in the deprecated headers from 1.34.0 to errors. These
will be removed in a future version of Boost.
+* Moved detail headers out of `boost/functional/detail`, since they are part of
+ functional/hash, not functional. `boost/functional/detail/container_fwd.hpp`
+ has been moved to `boost/detail/container_fwd.hpp` as it's used outside of
+ this library, the others have been moved to `boost/functional/hash/detail`.
[endsect]
Modified: branches/release/libs/spirit/classic/test/position_iterator_tests.cpp
==============================================================================
--- branches/release/libs/spirit/classic/test/position_iterator_tests.cpp (original)
+++ branches/release/libs/spirit/classic/test/position_iterator_tests.cpp 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -13,6 +13,7 @@
#include <string>
#include <list>
#include <algorithm>
+#include <boost/iterator.hpp>
#include <boost/config.hpp>
#include <boost/concept_check.hpp>
#include <boost/mpl/list.hpp>
@@ -62,6 +63,7 @@
void CheckColumnCounting(void);
void CheckLineExtraction(void);
void CheckDistance(void);
+void CheckSingular();
void CheckInstantiation(void)
{
@@ -84,6 +86,7 @@
CheckColumnCounting();
CheckLineExtraction();
CheckDistance();
+ CheckSingular();
return boost::report_errors();
}
@@ -470,3 +473,100 @@
test_impl::CheckDistance(position_iterator<iter_t, file_position_without_column>(b, b+15, ""));
test_impl::CheckDistance(position_iterator2<iter_t, file_position_without_column>(b, b+15, ""));
}
+
+///////////////////////////////////////////////////////////////////////////////
+
+namespace test_impl {
+
+ class check_singular_iterator
+ : public boost::iterator<std::forward_iterator_tag, int>
+ {
+ bool singular_;
+ int count_;
+
+ public:
+
+ check_singular_iterator() : singular_(true), count_(0) {}
+ explicit check_singular_iterator(int x) : singular_(false), count_(x) {}
+
+ int const& operator*() const {
+ BOOST_TEST(!singular_);
+ return count_;
+ }
+
+ int const* operator->() const {
+ BOOST_TEST(!singular_);
+ return &count_;
+ }
+
+ check_singular_iterator& operator++() {
+ BOOST_TEST(count_ > 0);
+ --count_;
+ return *this;
+ }
+
+ check_singular_iterator operator++(int) {
+ check_singular_iterator tmp(*this);
+ ++(*this);
+ return tmp;
+ }
+
+ bool operator==(check_singular_iterator const& other) const {
+ BOOST_TEST(!singular_ && !other.singular_);
+ return count_ == other.count_;
+ }
+
+ bool operator!=(check_singular_iterator const& other) const {
+ return !(*this == other);
+ }
+ };
+
+ template <typename CountIterator>
+ void CheckSingular()
+ {
+ CountIterator begin(check_singular_iterator(5), check_singular_iterator(0));
+ CountIterator end1(check_singular_iterator(0), check_singular_iterator(0));
+ CountIterator end2;
+
+ BOOST_TEST(begin == begin);
+ BOOST_TEST(begin != end1);
+ BOOST_TEST(begin != end2);
+
+ BOOST_TEST(end1 != begin);
+ BOOST_TEST(end1 == end1);
+ BOOST_TEST(end1 == end2);
+
+ BOOST_TEST(end2 != begin);
+ BOOST_TEST(end2 == end1);
+ BOOST_TEST(end2 == end2);
+
+ BOOST_TEST(std::distance(begin, begin) == 0);
+ BOOST_TEST(std::distance(begin, end1) == 5);
+ BOOST_TEST(std::distance(begin, end2) == 5);
+
+ BOOST_TEST(std::distance(end1, end1) == 0);
+ BOOST_TEST(std::distance(end1, end2) == 0);
+
+ BOOST_TEST(std::distance(end2, end1) == 0);
+ BOOST_TEST(std::distance(end2, end2) == 0);
+ }
+}
+
+void CheckSingular()
+{
+ test_impl::CheckSingular<
+ position_iterator<test_impl::check_singular_iterator, file_position>
+ >();
+
+ test_impl::CheckSingular<
+ position_iterator<test_impl::check_singular_iterator, file_position_without_column>
+ >();
+
+ test_impl::CheckSingular<
+ position_iterator2<test_impl::check_singular_iterator, file_position>
+ >();
+
+ test_impl::CheckSingular<
+ position_iterator2<test_impl::check_singular_iterator, file_position_without_column>
+ >();
+}
Modified: branches/release/libs/unordered/doc/changes.qbk
==============================================================================
--- branches/release/libs/unordered/doc/changes.qbk (original)
+++ branches/release/libs/unordered/doc/changes.qbk 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -42,4 +42,8 @@
* Move all the implementation inside `boost/unordered`, to assist
modularization and hopefully make it easier to track changes in subversion.
+[h2 Boost 1.38.0]
+
+* Use [@../../libs/utility/swap.html `boost::swap`].
+
[endsect]
Modified: branches/release/libs/utility/in_place_factories.html
==============================================================================
--- branches/release/libs/utility/in_place_factories.html (original)
+++ branches/release/libs/utility/in_place_factories.html 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -99,7 +99,7 @@
<H2><A NAME="framework"></A>Framework</H2>
<p>
This library proposes a framework to allow some containers to directly contruct contained objects in-place without requiring
-the entire set of constructor overloads ftom the contained type. It also allows the container to remove the CopyConstuctible
+the entire set of constructor overloads from the contained type. It also allows the container to remove the CopyConstuctible
requirement from the contained type since objects can be directly constructed in-place without need of a copy.<br>
The only requirement on the container is that it must provide proper storage (that is, correctly aligned and sized).
Naturally, the container will typically support uninitialized storage to avoid the in-place construction to override
@@ -293,4 +293,4 @@
HREF="http://www.boost.org">www.boost.org</A>, and the boost
<A HREF="http://www.boost.org/more/mailing_lists.htm#main">discussion lists</A></P>
</BODY>
-</HTML>
\ No newline at end of file
+</HTML>
Modified: branches/release/tools/boostbook/xsl/docbook.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/docbook.xsl (original)
+++ branches/release/tools/boostbook/xsl/docbook.xsl 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -474,4 +474,25 @@
<xsl:template match="part/part/chapter/chapterinfo|part/part/appendix/appendixinfo">
<sectioninfo><xsl:apply-templates/></sectioninfo>
</xsl:template>
+
+ <!-- Header link comment to be inserted at the start of a reference page's
+ synopsis -->
+ <xsl:template name="header-link">
+ <xsl:if test="ancestor::header">
+ <xsl:call-template name="highlight-comment">
+ <xsl:with-param name="text">
+ <xsl:text>// In header: <</xsl:text>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id">
+ <xsl:with-param name="node" select="ancestor::header[1]"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="ancestor::header[1]/@name" />
+ </xsl:call-template>
+ <xsl:text>> </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
</xsl:stylesheet>
Modified: branches/release/tools/boostbook/xsl/function.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/function.xsl (original)
+++ branches/release/tools/boostbook/xsl/function.xsl 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -895,6 +895,7 @@
<xsl:call-template name="generate.id"/>
</xsl:with-param>
<xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
<xsl:call-template name="function">
<xsl:with-param name="indentation" select="0"/>
<xsl:with-param name="is-reference" select="true()"/>
@@ -976,6 +977,7 @@
<xsl:call-template name="generate.id"/>
</xsl:with-param>
<xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
<xsl:for-each select="signature">
<xsl:call-template name="function">
<xsl:with-param name="indentation" select="0"/>
Modified: branches/release/tools/boostbook/xsl/global.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/global.xsl (original)
+++ branches/release/tools/boostbook/xsl/global.xsl 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -39,6 +39,7 @@
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
<xsl:call-template name="global-synopsis-impl">
<xsl:with-param name="link-type" select="'none'" />
</xsl:call-template>
Modified: branches/release/tools/boostbook/xsl/macro.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/macro.xsl (original)
+++ branches/release/tools/boostbook/xsl/macro.xsl 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -38,6 +38,7 @@
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
<xsl:call-template name="macro-synopsis">
<xsl:with-param name="link-type" select="'none'"/>
</xsl:call-template>
Modified: branches/release/tools/boostbook/xsl/type.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/type.xsl (original)
+++ branches/release/tools/boostbook/xsl/type.xsl 2008-11-20 17:53:20 EST (Thu, 20 Nov 2008)
@@ -410,6 +410,7 @@
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
<xsl:call-template name="type.typedef.display.aligned">
<xsl:with-param name="compact" select="false()"/>
<xsl:with-param name="indentation" select="0"/>
@@ -1056,6 +1057,7 @@
<xsl:call-template name="type.display.name"/>
</xsl:with-param>
<xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
<xsl:call-template name="class-type-synopsis">
<xsl:with-param name="indentation" select="$indentation"/>
<xsl:with-param name="allow-synopsis-anchors" select="true()"/>
@@ -1284,6 +1286,7 @@
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="synopsis">
+ <xsl:call-template name="header-link"/>
<xsl:call-template name="type.enum.display"/>
</xsl:with-param>
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