Updated copyright and fixed trailing whitespaces

[SVN r79435]
This commit is contained in:
Ion Gaztañaga
2012-07-12 07:21:17 +00:00
parent 30215558ae
commit a74f5d8942
74 changed files with 283 additions and 324 deletions

View File

@ -1,5 +1,5 @@
[/
/ Copyright (c) 2006-2011 Ion Gaztanaga
/ Copyright (c) 2006-2012 Ion Gaztanaga
/
/ 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)
@ -8,7 +8,7 @@
[library Boost.Intrusive
[quickbook 1.4]
[authors [Krzikalla, Olaf], [Gaztanaga, Ion]]
[copyright 2005 Olaf Krzikalla, 2006-2011 Ion Gaztanaga]
[copyright 2005 Olaf Krzikalla, 2006-2012 Ion Gaztanaga]
[id intrusive]
[dirname intrusive]
[purpose Intrusive containers]
@ -323,7 +323,7 @@ and optionally, the user can specify options. We have 3 option types:
container to store an additional member to keep track of the current size of the
container. By default, constant-time size is activated.
* [*`size_type<bool Enabled>`]: Specifies a type that can hold
* [*`size_type<class SizeType>`]: Specifies an unsigned type that can hold
the size of the container. This type will be the type returned by `list.size()`
and the type stored in the intrusive container if `constant_time_size<true>`
is requested.
@ -340,14 +340,16 @@ the base hook with the default tag:
typedef list<Foo> FooList;
Example of a intrusive list with non constant-time size that will store Foo objects:
Example of an intrusive list with non constant-time size that will store Foo objects:
[c++]
typedef list<Foo, constant_time_size<false> > FooList;
Remember that the user must specify the base hook if the base hook has no default tag
(e.g: if more than one base hook is used):
Remember that the user must specify the base hook in the container declaration
if the base hook has no default tag, because that usually means that the type
has more than one base hook, and a container shall know which hook will be
using:
[c++]
@ -355,13 +357,16 @@ Remember that the user must specify the base hook if the base hook has no defaul
using namespace boost::intrusive;
struct my_tag;
struct my_tag1;
struct my_tag2;
typedef list_base_hook< tag<my_tag> > BaseHook;
class Foo : public BaseHook
typedef list_base_hook< tag<my_tag2> > BaseHook2;
class Foo : public BaseHook, public BaseHook2
{ /**/ };
typedef list< Foo, base_hook<BaseHook> > FooList;
typedef list< Foo, base_hook<BaseHook2> > FooList2;
Once the list is defined, we can use it:
@ -508,11 +513,11 @@ chapters:
[variablelist Brief Concepts Summary
[[Node Algorithms][A class containing typedefs and static functions that define
basic operations that can be applied to a group of nodes. It's independent
basic operations that can be applied to a group of `node`s. It's independent
from the node definition and configured using a NodeTraits template
parameter that describes the node.]]
[[Node Traits][A class that stores basic information and operations to insert a node into a group of nodes.]]
[[Hook][A class that a user must add as a base class or as a member to make the user class compatible with intrusive containers.]]
[[Hook][A class that a user must add as a base class or as a member to make the user class compatible with intrusive containers. A Hook encapsulates a `node`]]
[[Intrusive Container][A class that stores user classes that have the needed hooks. It takes a ValueTraits template parameter as configuration information.]]
[[Semi-Intrusive Container][Similar to an intrusive container but a semi-intrusive container needs additional memory (e.g. an auxiliary array) to work.]]
[[Value Traits][A class containing typedefs and operations to obtain the node to be used by Node Algorithms from the user class and the inverse.]]
@ -584,12 +589,12 @@ offers two types of hooks for each container type:
Apart from that, [*Boost.Intrusive] offers additional features:
* [*Safe mode hooks]: Hook constructor initializes the internal data to a well-known
* [*Safe mode hooks]: Hook constructor initializes the internal `node` to a well-known
safe state and intrusive containers check that state before inserting a value in the
container. When erasing an element from the container, the container puts the hook
in the safe state again. This allows a safer use mode and it can be used to detect
programming errors. It implies a slight performance overhead in some operations
and can convert some constant time operations to linear time operations.
container using that hook. When erasing an element from the container, the container
puts the `node` of the hook in the safe state again. This allows a safer use mode and it can
be used to detect programming errors. It implies a slight performance overhead in some
operations and can convert some constant time operations to linear time operations.
* [*Auto-unlink hooks]: The hook destructor removes the object from the container
automatically and the user can safely unlink the object from the container without
@ -2431,7 +2436,7 @@ before explaining the customization options of [*Boost.Intrusive].
singly linked list is a group of nodes, where each node has a pointer to the
next node. [*Node Algorithms] just require a [*NodeTraits]
template parameter and they can work with any [*NodeTraits] class that fulfills
the needed interface. As an example, here is a class that implements operations7'
the needed interface. As an example, here is a class that implements operations
to manage a group of nodes forming a circular singly linked list:
[c++]

View File

@ -1,6 +1,6 @@
# Boost Intrusive Library Example Jamfile
# (C) Copyright Ion Gaztanaga 2006-2007.
# (C) Copyright Ion Gaztanaga 2006-2012.
# Use, modification and distribution are subject to 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)

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2008
// (C) Copyright Ion Gaztanaga 2008-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2010-2010
// (C) Copyright Ion Gaztanaga 2010-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2011
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2009-2009
// (C) Copyright Ion Gaztanaga 2009-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2010-2010
// (C) Copyright Ion Gaztanaga 2010-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
# Boost Intrusive Library Performance test Jamfile
# (C) Copyright Ion Gaztanaga 2006-2007.
# (C) Copyright Ion Gaztanaga 2006-2012.
# Use, modification and distribution are subject to 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)

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@ -18,6 +18,8 @@
-> Take all pointers by const reference to optimize shared memory pointers
-> Return pointers by const reference if node traits return them by const reference to optimize shared memory pointers
-> Detect call signatures by has_member_function_callable_with instead of exact match to allow taking by const reference
-> Optimize operations taking const_node_pointer using template parameters and SFINAE to allow node_ptr
The article explains it quite well: Linear Hashing The cost of hash table expansion is spread out across each hash table insertion operation, as opposed to being incurred all at once. Linear hashing is therefore well suited for interactive applications.

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2010-2010
// (C) Copyright Ion Gaztanaga 2010-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@ -207,6 +207,7 @@ void test_generic_multiset<ValueTraits, ContainerDefiner>::test_find(std::vector
multiset_type testset (values.begin(), values.end());
typedef typename multiset_type::iterator iterator;
{
value_type cmp_val;
cmp_val.value_ = 2;
iterator i = testset.find (cmp_val);
@ -221,6 +222,7 @@ void test_generic_multiset<ValueTraits, ContainerDefiner>::test_find(std::vector
cmp_val.value_ = 7;
BOOST_TEST (testset.find (cmp_val) == testset.end());
}
}
}}} //namespace boost::intrusive::test

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@ -278,6 +278,7 @@ void test_generic_set<ValueTraits, ContainerDefiner>::test_find(std::vector<type
set_type testset (values.begin(), values.end());
typedef typename set_type::iterator iterator;
{
value_type cmp_val;
cmp_val.value_ = 2;
iterator i = testset.find (cmp_val);
@ -292,6 +293,7 @@ void test_generic_set<ValueTraits, ContainerDefiner>::test_find(std::vector<type
cmp_val.value_ = 7;
BOOST_TEST (testset.find (cmp_val) == testset.end());
}
}
}}} //namespace boost::intrusive::test

View File

@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2011-2011. Distributed under the Boost
// (C) Copyright Ion Gaztanaga 2011-2012. 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)
//

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2011-2011. Distributed under the Boost
// (C) Copyright Ion Gaztanaga 2011-2012. 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)
//

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2010
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007.
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -113,18 +113,6 @@ class smart_ptr
: m_ptr(0)
{}
/*
//!Constructor from raw pointer (allows "0" pointer conversion). Never throws.
explicit smart_ptr(pointer ptr = 0)
: m_ptr(ptr)
{}
//!Constructor from other pointer. Never throws.
template <class T>
smart_ptr(T *ptr)
: m_ptr(ptr)
{}
*/
//!Constructor from other smart_ptr
smart_ptr(const smart_ptr& ptr)
: m_ptr(ptr.m_ptr)
@ -139,35 +127,7 @@ class smart_ptr
smart_ptr(const smart_ptr<T2> &ptr)
: m_ptr(ptr.m_ptr)
{}
/*
//!Emulates static_cast operator. Never throws.
template<class Y>
smart_ptr(const smart_ptr<Y> & r, detail::static_cast_tag)
: m_ptr(static_cast<PointedType*>(r.m_ptr))
{}
//!Emulates const_cast operator. Never throws.
template<class Y>
smart_ptr(const smart_ptr<Y> & r, detail::const_cast_tag)
: m_ptr(const_cast<PointedType*>(r.m_ptr))
{}
//!Emulates dynamic_cast operator. Never throws.
template<class Y>
smart_ptr(const smart_ptr<Y> & r, detail::dynamic_cast_tag)
: m_ptr(dynamic_cast<PointedType*>(r.m_ptr))
{}
//!Emulates reinterpret_cast operator. Never throws.
template<class Y>
smart_ptr(const smart_ptr<Y> & r, detail::reinterpret_cast_tag)
: m_ptr(reinterpret_cast<PointedType*>(r.m_ptr))
{}
//!Obtains raw pointer from offset. Never throws.
pointer get() const
{ return m_ptr; }
*/
//!Pointer-like -> operator. It can return 0 pointer. Never throws.
pointer operator->() const
{ return m_ptr; }
@ -180,11 +140,7 @@ class smart_ptr
//!Indexing operator. Never throws.
reference operator[](std::ptrdiff_t idx) const
{ return m_ptr[idx]; }
/*
//!Assignment from pointer (saves extra conversion). Never throws.
smart_ptr& operator= (pointer from)
{ m_ptr = from; return *this; }
*/
//!Assignment from other smart_ptr. Never throws.
smart_ptr& operator= (const smart_ptr & pt)
{ m_ptr = pt.m_ptr; return *this; }
@ -235,14 +191,6 @@ class smart_ptr
//!Never throws.
bool operator! () const
{ return m_ptr == 0; }
/*
friend void swap (smart_ptr &pt, smart_ptr &pt2)
{
value_type *ptr = pt.get();
pt = pt2;
pt2 = ptr;
}
*/
};
//!smart_ptr<T1> == smart_ptr<T2>. Never throws.

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007.
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2011
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009
// (C) Copyright Ion Gaztanaga 2006-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2009.
// (C) Copyright Ion Gaztanaga 2006-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2009
// (C) Copyright Ion Gaztanaga 2007-2012
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at