Compare commits

..

1 Commits

Author SHA1 Message Date
Beman Dawes f5a6688925 Release 1.37.0
[SVN r51178]
2009-02-10 13:14:42 +00:00
73 changed files with 129 additions and 168 deletions
+12 -4
View File
@@ -8,11 +8,11 @@ path-constant admonishment_location : ../../../../doc/src/images ;
xml unordered : unordered.qbk ;
boostbook standalone : unordered :
<xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
<xsl:param>admon.graphics.path=images/
<xsl:param>navig.graphics.path=images/
<xsl:param>html.stylesheet=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
<xsl:param>generate.section.toc.level=2
@@ -23,6 +23,9 @@ boostbook standalone : unordered :
<xsl:param>boost.compact.function=0
<xsl:param>boost.compact.enum=0
<dependency>css
<dependency>images
# PDF Options:
# TOC Generation: this is needed for FOP-0.9 and later:
<xsl:param>fop1.extensions=0
@@ -48,6 +51,11 @@ boostbook standalone : unordered :
<format>pdf:<xsl:param>img.src.path=$(images_location)/
#<format>pdf:<xsl:param>admon.graphics.path=$(admonishment_location)
<format>pdf:<xsl:param>draft.mode="no"
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/unordered/doc/html
;
install css : [ glob $(BOOST_ROOT)/doc/src/*.css ]
: <location>html ;
install images : [ glob $(BOOST_ROOT)/doc/src/images/*.png ]
: <location>html/images ;
explicit css ;
explicit images ;
+1 -1
View File
@@ -1,5 +1,5 @@
<!--
Copyright Daniel James 2008-2009
Copyright Daniel James 2008
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)
-->
+2 -10
View File
@@ -44,7 +44,7 @@ First official release.
[h2 Boost 1.38.0]
* Use [@boost:/libs/utility/swap.html `boost::swap`].
* Use [@../../libs/utility/swap.html `boost::swap`].
* [@https://svn.boost.org/trac/boost/ticket/2237 Ticket 2237]:
Document that the equality and inequality operators are undefined for two
objects if their equality predicates aren't equivalent. Thanks to Daniel
@@ -53,7 +53,7 @@ First official release.
Use a larger prime number list. Thanks to Thorsten Ottosen and Hervé
Brönnimann.
* Use
[@boost:/libs/type_traits/doc/html/boost_typetraits/category/alignment.html
[@../../libs/type_traits/doc/html/boost_typetraits/category/alignment.html
aligned storage] to store the types. This changes the way the allocator is
used to construct nodes. It used to construct the node with two calls to
the allocator's `construct` method - once for the pointers and once for the
@@ -62,12 +62,4 @@ First official release.
* Add support for C++0x initializer lists where they're available (currently
only g++ 4.4 in C++0x mode).
[h2 Boost 1.39.0]
* [@https://svn.boost.org/trac/boost/ticket/2756 Ticket 2756]: Avoid a warning
on Visual C++ 2009.
* Some other minor internal changes to the implementation, tests and
documentation.
* Avoid an unnecessary copy in `operator[]`.
[endsect]
+2 -2
View File
@@ -23,7 +23,7 @@ but not the equality predicate. For example, if you wanted to use the
[import src_code/dictionary.cpp]
[case_sensitive_dictionary_fnv]
There is an [@boost:/libs/unordered/examples/fnv1.hpp implementation
There is an [@../../libs/unordered/examples/fnv1.hpp implementation
of FNV-1] in the examples directory.
If you wish to use a different equality function,
@@ -38,7 +38,7 @@ Which you can then use in a case insensitive dictionary:
[case_insensitive_dictionary]
This is a simplified version of the example at
[@boost:/libs/unordered/examples/case_insensitive.hpp /libs/unordered/examples/case_insensitive.hpp]
[@../../libs/unordered/examples/case_insensitive.hpp /libs/unordered/examples/case_insensitive.hpp]
which supports other locales and string types.
[caution
+21 -21
View File
@@ -1,5 +1,5 @@
<!--
Copyright Daniel James 2006-2009
Copyright Daniel James 2006-2008
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)
--><library-reference>
@@ -19,12 +19,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
<default><type>std::allocator&lt;Value&gt;</type></default>
</template-type-parameter>
</template>
<purpose><simpara>
<purpose>
An unordered associative container that stores unique values.
</simpara></purpose>
</purpose>
<description>
<para>For the normative reference see chapter 23 of
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008-2009/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@@ -69,11 +69,11 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</typedef>
<typedef name="reference">
<type>typename allocator_type::reference</type>
<purpose><simpara>lvalue of <type>value_type</type>.</simpara></purpose>
<purpose>lvalue of <type>value_type</type>.</purpose>
</typedef>
<typedef name="const_reference">
<type>typename allocator_type::const_reference</type>
<purpose><simpara>const lvalue of <type>value_type</type>.</simpara></purpose>
<purpose>const lvalue of <type>value_type</type>.</purpose>
</typedef>
<typedef name="size_type">
<type><emphasis>implementation-defined</emphasis></type>
@@ -753,12 +753,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
<default><type>std::allocator&lt;Value&gt;</type></default>
</template-type-parameter>
</template>
<purpose><simpara>
<purpose>
An unordered associative container that stores values. The same key can be stored multiple times.
</simpara></purpose>
</purpose>
<description>
<para>For the normative reference see chapter 23 of
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008-2009/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@@ -803,11 +803,11 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</typedef>
<typedef name="reference">
<type>typename allocator_type::reference</type>
<purpose><simpara>lvalue of <type>value_type</type>.</simpara></purpose>
<purpose>lvalue of <type>value_type</type>.</purpose>
</typedef>
<typedef name="const_reference">
<type>typename allocator_type::const_reference</type>
<purpose><simpara>const lvalue of <type>value_type</type>.</simpara></purpose>
<purpose>const lvalue of <type>value_type</type>.</purpose>
</typedef>
<typedef name="size_type">
<type><emphasis>implementation-defined</emphasis></type>
@@ -1491,12 +1491,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
<default><type>std::allocator&lt;std::pair&lt;Key const, Mapped&gt; &gt;</type></default>
</template-type-parameter>
</template>
<purpose><simpara>
<purpose>
An unordered associative container that associates unique keys with another value.
</simpara></purpose>
</purpose>
<description>
<para>For the normative reference see chapter 23 of
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008-2009/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@@ -1547,11 +1547,11 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</typedef>
<typedef name="reference">
<type>typename allocator_type::reference</type>
<purpose><simpara>lvalue of <type>value_type</type>.</simpara></purpose>
<purpose>lvalue of <type>value_type</type>.</purpose>
</typedef>
<typedef name="const_reference">
<type>typename allocator_type::const_reference</type>
<purpose><simpara>const lvalue of <type>value_type</type>.</simpara></purpose>
<purpose>const lvalue of <type>value_type</type>.</purpose>
</typedef>
<typedef name="size_type">
<type><emphasis>implementation-defined</emphasis></type>
@@ -2274,12 +2274,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
<default><type>std::allocator&lt;std::pair&lt;Key const, Mapped&gt; &gt;</type></default>
</template-type-parameter>
</template>
<purpose><simpara>
<purpose>
An unordered associative container that associates keys with another value. The same key can be stored multiple times.
</simpara></purpose>
</purpose>
<description>
<para>For the normative reference see chapter 23 of
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008-2009/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@@ -2330,11 +2330,11 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</typedef>
<typedef name="reference">
<type>typename allocator_type::reference</type>
<purpose><simpara>lvalue of <type>value_type</type>.</simpara></purpose>
<purpose>lvalue of <type>value_type</type>.</purpose>
</typedef>
<typedef name="const_reference">
<type>typename allocator_type::const_reference</type>
<purpose><simpara>const lvalue of <type>value_type</type>.</simpara></purpose>
<purpose>const lvalue of <type>value_type</type>.</purpose>
</typedef>
<typedef name="size_type">
<type><emphasis>implementation-defined</emphasis></type>
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2008-2009 Daniel James.
// Copyright 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)
@@ -1,5 +1,5 @@
// Copyright 2005-2009 Daniel James.
// 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2008-2009 Daniel James.
// Copyright 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)
@@ -1,6 +1,6 @@
// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
// Copyright (C) 2005-2009 Daniel James
// Copyright (C) 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)
@@ -87,7 +87,7 @@ namespace boost {
1610612741ul, 3221225473ul, 4294967291ul };
template<typename T>
std::ptrdiff_t const prime_list_template<T>::length = 40;
std::ptrdiff_t const prime_list_template<T>::length = 28;
typedef prime_list_template<std::size_t> prime_list;
@@ -224,15 +224,10 @@ namespace boost {
functions_ptr func_; // The currently active functions.
};
#if defined(BOOST_MSVC)
# define BOOST_UNORDERED_DESTRUCT(x, type) (x)->~type();
#else
# define BOOST_UNORDERED_DESTRUCT(x, type) boost::unordered_detail::destroy(x)
template <typename T>
void destroy(T* x) {
x->~T();
}
#endif
}
}
@@ -1,6 +1,6 @@
// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
// Copyright (C) 2005-2009 Daniel James
// Copyright (C) 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)
@@ -130,7 +130,7 @@ namespace boost {
void destroy(link_ptr ptr)
{
node* raw_ptr = static_cast<node*>(&*ptr);
BOOST_UNORDERED_DESTRUCT(&raw_ptr->value(), value_type);
boost::unordered_detail::destroy(&raw_ptr->value());
node_ptr n(node_alloc_.address(*raw_ptr));
node_alloc_.destroy(n);
node_alloc_.deallocate(n, 1);
@@ -172,7 +172,7 @@ namespace boost {
{
if (node_) {
if (value_constructed_) {
BOOST_UNORDERED_DESTRUCT(&node_->value(), value_type);
boost::unordered_detail::destroy(&node_->value());
}
if (node_constructed_)
@@ -215,22 +215,6 @@ namespace boost {
}
#endif
template <typename K, typename M>
void construct_pair(K const& k, M*)
{
BOOST_ASSERT(!node_);
node_constructed_ = false;
value_constructed_ = false;
node_ = allocators_.node_alloc_.allocate(1);
allocators_.node_alloc_.construct(node_, node());
node_constructed_ = true;
new(node_->address()) value_type(k, M());
value_constructed_ = true;
}
node_ptr get() const
{
BOOST_ASSERT(node_);
@@ -1119,7 +1103,7 @@ namespace boost {
// This can throw, but BOOST_UNORDERED_TABLE_DATA's destructor will clean
// up.
x.copy_buckets_to(data_);
copy_buckets(x.data_, data_, functions_.current());
}
// Copy Construct with allocator
@@ -1134,7 +1118,7 @@ namespace boost {
// This can throw, but BOOST_UNORDERED_TABLE_DATA's destructor will clean
// up.
x.copy_buckets_to(data_);
copy_buckets(x.data_, data_, functions_.current());
}
// Move Construct
@@ -1159,14 +1143,14 @@ namespace boost {
if(x.data_.buckets_) {
// This can throw, but BOOST_UNORDERED_TABLE_DATA's destructor will clean
// up.
x.copy_buckets_to(data_);
copy_buckets(x.data_, data_, functions_.current());
}
}
// Assign
//
// basic exception safety, if buffered_functions::buffer or reserver throws
// the container is left in a sane, empty state. If copy_buckets_to
// the container is left in a sane, empty state. If copy_buckets
// throws the container is left with whatever was successfully
// copied.
@@ -1180,7 +1164,7 @@ namespace boost {
mlf_ = x.mlf_; // no throw
calculate_max_load(); // no throw
reserve(x.size()); // throws
x.copy_buckets_to(data_); // throws
copy_buckets(x.data_, data_, functions_.current()); // throws
}
return *this;
@@ -1223,10 +1207,10 @@ namespace boost {
// which will clean up if anything throws an exception.
// (all can throw, but with no effect as these are new objects).
data new_this(data_, x.min_buckets_for_size(x.data_.size_));
x.copy_buckets_to(new_this);
copy_buckets(x.data_, new_this, functions_.*new_func_this);
data new_that(x.data_, min_buckets_for_size(data_.size_));
copy_buckets_to(new_that);
x.copy_buckets(data_, new_that, x.functions_.*new_func_that);
// Start updating the data here, no throw from now on.
data_.swap(new_this);
@@ -1267,7 +1251,7 @@ namespace boost {
// which will clean up if anything throws an exception.
// (all can throw, but with no effect as these are new objects).
data new_this(data_, x.min_buckets_for_size(x.data_.size_));
x.copy_buckets_to(new_this);
copy_buckets(x.data_, new_this, functions_.*new_func_this);
// Start updating the data here, no throw from now on.
data_.move(new_this);
@@ -1510,23 +1494,22 @@ namespace boost {
return;
data new_buckets(data_, n); // throws, seperate
move_buckets_to(new_buckets); // basic/no throw
move_buckets(data_, new_buckets, hash_function());
// basic/no throw
new_buckets.swap(data_); // no throw
calculate_max_load(); // no throw
}
// move_buckets_to & copy_buckets_to
// move_buckets & copy_buckets
//
// if the hash function throws, basic excpetion safety
// no throw otherwise
void move_buckets_to(data& dst)
static void move_buckets(data& src, data& dst, hasher const& hf)
{
BOOST_ASSERT(dst.size_ == 0);
//BOOST_ASSERT(src.allocators_.node_alloc_ == dst.allocators_.node_alloc_);
data& src = this->data_;
hasher const& hf = this->hash_function();
bucket_ptr end = src.buckets_end();
for(; src.cached_begin_bucket_ != end;
@@ -1550,14 +1533,12 @@ namespace boost {
// basic excpetion safety. If an exception is thrown this will
// leave dst partially filled.
void copy_buckets_to(data& dst) const
static void copy_buckets(data const& src, data& dst, functions const& f)
{
BOOST_ASSERT(dst.size_ == 0);
// no throw:
data const& src = this->data_;
hasher const& hf = this->hash_function();
bucket_ptr end = src.buckets_end();
hasher const& hf = f.hash_function();
// no throw:
for(bucket_ptr i = src.cached_begin_bucket_; i != end; ++i) {
@@ -1773,7 +1754,7 @@ namespace boost {
// Create the node before rehashing in case it throws an
// exception (need strong safety in such a case).
node_constructor a(data_.allocators_);
a.construct_pair(k, (mapped_type*) 0);
a.construct(value_type(k, mapped_type()));
// reserve has basic exception safety if the hash function
// throws, strong otherwise.
+1 -1
View File
@@ -1,6 +1,6 @@
// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
// Copyright (C) 2005-2009 Daniel James.
// Copyright (C) 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)
@@ -1,5 +1,5 @@
// Copyright (C) 2008-2009 Daniel James.
// Copyright (C) 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)
+1 -1
View File
@@ -1,6 +1,6 @@
// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
// Copyright (C) 2005-2009 Daniel James.
// Copyright (C) 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)
@@ -1,5 +1,5 @@
// Copyright (C) 2008-2009 Daniel James.
// Copyright (C) 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2005-2009 Daniel James.
// 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2008-2009 Daniel James.
// Copyright 2008 Daniel James.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or move at http://www.boost.org/LICENSE_1_0.txt)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2005-2009 Daniel James.
// 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2005-2009 Daniel James.
// 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2005-2009 Daniel James.
// 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+6 -21
View File
@@ -1,5 +1,5 @@
// Copyright 2008-2009 Daniel James.
// Copyright 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)
@@ -144,7 +144,6 @@ namespace test
list& operator=(list const& other) {
clear();
insert(other.begin(), other.end());
return *this;
}
iterator begin() { return iterator(data_.first_); }
@@ -243,28 +242,14 @@ namespace test
node** merge_adjacent_ranges(node** first, node** second,
node** third, Less less)
{
while(true) {
while(true) {
if(first == second) return third;
if(less((*second)->value_, (*first)->value_)) break;
first = &(*first)->next_;
while(first != second) {
if(less((*second)->value_, (*first)->value_)) {
swap_adjacent_ranges(first, second, third);
std::swap(second, third);
}
swap_adjacent_ranges(first, second, third);
first = &(*first)->next_;
// Since the two ranges we just swapped, the order is now:
// first...third...second
while(true) {
if(first == third) return second;
if(!less((*first)->value_, (*third)->value_)) break;
first = &(*first)->next_;
}
swap_adjacent_ranges(first, third, second);
first = &(*first)->next_;
}
return third;
}
void swap_adjacent_ranges(node** first, node** second, node** third)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2005-2009 Daniel James.
// 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2005-2009 Daniel James.
// 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2005-2009 Daniel James.
// 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2007-2009 Daniel James.
// Copyright 2007-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2005-2009 Daniel James.
// 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2008-2009 Daniel James.
// Copyright 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2008-2009 Daniel James.
// Copyright 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2008-2009 Daniel James.
// Copyright 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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2007-2009 Daniel James.
// Copyright 2007-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2008-2009 Daniel James.
// Copyright 2008 Daniel James.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or move at http://www.boost.org/LICENSE_1_0.txt)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)
+1 -1
View File
@@ -1,5 +1,5 @@
// Copyright 2006-2009 Daniel James.
// Copyright 2006-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)