2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
|
2011-08-21 19:19:12 +00:00
|
|
|
// Copyright (C) 2005-2011 Daniel James.
|
2008-09-18 11:30:59 +00:00
|
|
|
// 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)
|
|
|
|
|
|
|
|
|
|
// See http://www.boost.org/libs/unordered for documentation
|
|
|
|
|
|
|
|
|
|
#ifndef BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED
|
|
|
|
|
#define BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED
|
|
|
|
|
|
|
|
|
|
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
|
|
|
|
# pragma once
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include <boost/unordered/unordered_set_fwd.hpp>
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
#include <boost/unordered/detail/allocator_helpers.hpp>
|
|
|
|
|
#include <boost/unordered/detail/equivalent.hpp>
|
|
|
|
|
#include <boost/unordered/detail/unique.hpp>
|
2011-10-09 18:30:10 +00:00
|
|
|
#include <boost/unordered/detail/util.hpp>
|
|
|
|
|
#include <boost/functional/hash.hpp>
|
|
|
|
|
#include <boost/move/move.hpp>
|
2008-09-18 11:30:59 +00:00
|
|
|
|
Merge latest changes for unordered. Improved compatability and a few tweaks.
Merged revisions 53127,53253,53256,53311,53314,53316-53318 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r53127 | danieljames | 2009-05-20 07:43:38 +0100 (Wed, 20 May 2009) | 1 line
Better configuration for boost.unordered.
........
r53253 | danieljames | 2009-05-25 20:14:07 +0100 (Mon, 25 May 2009) | 3 lines
Add explicit destructors to the unordered containers. Refs #2908.
Isn't really needed but it doesn't hurt.
........
r53256 | danieljames | 2009-05-25 20:45:23 +0100 (Mon, 25 May 2009) | 1 line
Unordered change log for explicit destructors.
........
r53311 | danieljames | 2009-05-27 18:42:01 +0100 (Wed, 27 May 2009) | 1 line
Missing changelog entry.
........
r53314 | danieljames | 2009-05-27 18:44:09 +0100 (Wed, 27 May 2009) | 1 line
Use lightweight_test for unordered.
........
r53316 | danieljames | 2009-05-27 19:19:32 +0100 (Wed, 27 May 2009) | 1 line
Some workarounds for old versions of Borland.
........
r53317 | danieljames | 2009-05-27 19:32:22 +0100 (Wed, 27 May 2009) | 1 line
Fix a change accidentally included in the last commit.
........
r53318 | danieljames | 2009-05-27 19:32:38 +0100 (Wed, 27 May 2009) | 1 line
Remove an unused function.
........
[SVN r53465]
2009-05-30 17:34:12 +00:00
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
|
|
|
|
#include <initializer_list>
|
|
|
|
|
#endif
|
|
|
|
|
|
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.
........
[SVN r49855]
2008-11-20 22:53:20 +00:00
|
|
|
#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
|
|
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
namespace boost
|
2011-08-21 19:19:12 +00:00
|
|
|
{
|
|
|
|
|
namespace unordered
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
2009-12-07 19:26:26 +00:00
|
|
|
template <class T, class H, class P, class A>
|
2008-09-18 11:30:59 +00:00
|
|
|
class unordered_set
|
|
|
|
|
{
|
2012-01-15 20:22:15 +00:00
|
|
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
2011-08-21 19:19:12 +00:00
|
|
|
BOOST_COPYABLE_AND_MOVABLE(unordered_set)
|
2012-01-15 20:22:15 +00:00
|
|
|
#endif
|
2008-09-18 11:30:59 +00:00
|
|
|
public:
|
|
|
|
|
|
2009-12-07 19:26:26 +00:00
|
|
|
typedef T key_type;
|
|
|
|
|
typedef T value_type;
|
|
|
|
|
typedef H hasher;
|
|
|
|
|
typedef P key_equal;
|
|
|
|
|
typedef A allocator_type;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
private:
|
|
|
|
|
|
2011-12-11 21:39:18 +00:00
|
|
|
typedef boost::unordered::detail::set<A, T, H, P> types;
|
|
|
|
|
typedef typename types::allocator value_allocator;
|
|
|
|
|
typedef typename types::traits allocator_traits;
|
2011-10-09 18:30:10 +00:00
|
|
|
typedef typename types::table table;
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
2011-09-04 19:37:45 +00:00
|
|
|
typedef typename allocator_traits::pointer pointer;
|
|
|
|
|
typedef typename allocator_traits::const_pointer const_pointer;
|
2011-08-21 19:19:12 +00:00
|
|
|
|
|
|
|
|
typedef value_type& reference;
|
|
|
|
|
typedef value_type const& const_reference;
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
|
|
|
|
|
typedef std::size_t size_type;
|
|
|
|
|
typedef std::ptrdiff_t difference_type;
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
typedef typename table::cl_iterator const_local_iterator;
|
|
|
|
|
typedef typename table::cl_iterator local_iterator;
|
|
|
|
|
typedef typename table::c_iterator const_iterator;
|
|
|
|
|
typedef typename table::c_iterator iterator;
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
table table_;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
public:
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
// constructors
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
explicit unordered_set(
|
2011-10-09 18:30:10 +00:00
|
|
|
size_type = boost::unordered::detail::default_bucket_count,
|
2011-08-21 19:19:12 +00:00
|
|
|
const hasher& = hasher(),
|
|
|
|
|
const key_equal& = key_equal(),
|
|
|
|
|
const allocator_type& = allocator_type());
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
explicit unordered_set(allocator_type const&);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
template <class InputIt>
|
2011-10-09 18:30:10 +00:00
|
|
|
unordered_set(InputIt, InputIt);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
template <class InputIt>
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set(
|
|
|
|
|
InputIt, InputIt,
|
|
|
|
|
size_type,
|
|
|
|
|
const hasher& = hasher(),
|
2011-10-09 18:30:10 +00:00
|
|
|
const key_equal& = key_equal());
|
2011-08-21 19:19:12 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
template <class InputIt>
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set(
|
|
|
|
|
InputIt, InputIt,
|
|
|
|
|
size_type,
|
|
|
|
|
const hasher&,
|
|
|
|
|
const key_equal&,
|
|
|
|
|
const allocator_type&);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
// copy/move constructors
|
2011-03-02 08:47:34 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set(unordered_set const&);
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
unordered_set(unordered_set const&, allocator_type const&);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2012-01-15 20:22:15 +00:00
|
|
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set(BOOST_RV_REF(unordered_set) other)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(other.table_, boost::unordered::detail::move_tag())
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
|
|
|
|
}
|
2012-01-15 20:22:15 +00:00
|
|
|
#elif !defined(BOOST_NO_RVALUE_REFERENCES)
|
|
|
|
|
unordered_set(unordered_set&& other)
|
|
|
|
|
: table_(other.table_, boost::unordered::detail::move_tag())
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2011-08-21 19:19:12 +00:00
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
|
|
|
|
unordered_set(unordered_set&&, allocator_type const&);
|
2008-09-18 11:30:59 +00:00
|
|
|
#endif
|
|
|
|
|
|
Merge latest changes for unordered. Improved compatability and a few tweaks.
Merged revisions 53127,53253,53256,53311,53314,53316-53318 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r53127 | danieljames | 2009-05-20 07:43:38 +0100 (Wed, 20 May 2009) | 1 line
Better configuration for boost.unordered.
........
r53253 | danieljames | 2009-05-25 20:14:07 +0100 (Mon, 25 May 2009) | 3 lines
Add explicit destructors to the unordered containers. Refs #2908.
Isn't really needed but it doesn't hurt.
........
r53256 | danieljames | 2009-05-25 20:45:23 +0100 (Mon, 25 May 2009) | 1 line
Unordered change log for explicit destructors.
........
r53311 | danieljames | 2009-05-27 18:42:01 +0100 (Wed, 27 May 2009) | 1 line
Missing changelog entry.
........
r53314 | danieljames | 2009-05-27 18:44:09 +0100 (Wed, 27 May 2009) | 1 line
Use lightweight_test for unordered.
........
r53316 | danieljames | 2009-05-27 19:19:32 +0100 (Wed, 27 May 2009) | 1 line
Some workarounds for old versions of Borland.
........
r53317 | danieljames | 2009-05-27 19:32:22 +0100 (Wed, 27 May 2009) | 1 line
Fix a change accidentally included in the last commit.
........
r53318 | danieljames | 2009-05-27 19:32:38 +0100 (Wed, 27 May 2009) | 1 line
Remove an unused function.
........
[SVN r53465]
2009-05-30 17:34:12 +00:00
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set(
|
|
|
|
|
std::initializer_list<value_type>,
|
2011-10-09 18:30:10 +00:00
|
|
|
size_type = boost::unordered::detail::default_bucket_count,
|
2011-08-21 19:19:12 +00:00
|
|
|
const hasher& = hasher(),
|
|
|
|
|
const key_equal&l = key_equal(),
|
|
|
|
|
const allocator_type& = allocator_type());
|
2011-10-09 18:30:10 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// Destructor
|
|
|
|
|
|
|
|
|
|
~unordered_set();
|
|
|
|
|
|
|
|
|
|
// Assign
|
2011-08-21 19:19:12 +00:00
|
|
|
|
2012-01-15 20:22:15 +00:00
|
|
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
2011-10-09 18:30:10 +00:00
|
|
|
unordered_set& operator=(BOOST_COPY_ASSIGN_REF(unordered_set) x)
|
|
|
|
|
{
|
|
|
|
|
table_.assign(x.table_);
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unordered_set& operator=(BOOST_RV_REF(unordered_set) x)
|
|
|
|
|
{
|
|
|
|
|
table_.move_assign(x.table_);
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
2012-01-15 20:22:15 +00:00
|
|
|
#else
|
|
|
|
|
unordered_set& operator=(unordered_set const& x)
|
|
|
|
|
{
|
|
|
|
|
table_.assign(x.table_);
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
|
|
|
|
unordered_set& operator=(unordered_set&& x)
|
|
|
|
|
{
|
|
|
|
|
table_.move_assign(x.table_);
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
2011-10-09 18:30:10 +00:00
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set& operator=(std::initializer_list<value_type>);
|
Merge latest hash and unordered developments, and add support for initialiser
lists to config.
Merged revisions 49338,49924-49927,49955,50029,50118 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r49338 | danieljames | 2008-10-15 10:44:41 +0100 (Wed, 15 Oct 2008) | 2 lines
Revert [49229], it fixes the same problem as [48674].
........
r49924 | danieljames | 2008-11-24 22:55:14 +0000 (Mon, 24 Nov 2008) | 1 line
Extra tests for equality with different hash functions.
........
r49925 | danieljames | 2008-11-24 22:55:47 +0000 (Mon, 24 Nov 2008) | 1 line
Document operator==/operator!= as undefined if the equality predicates aren't equivalent.
........
r49926 | danieljames | 2008-11-24 22:56:04 +0000 (Mon, 24 Nov 2008) | 1 line
Use a larger prime number list.
........
r49927 | danieljames | 2008-11-24 23:15:55 +0000 (Mon, 24 Nov 2008) | 1 line
Use aligned storage for the value.
........
r49955 | danieljames | 2008-11-27 11:42:13 +0000 (Thu, 27 Nov 2008) | 1 line
Wild stab at getting destruction working on more compilers.
........
r50029 | danieljames | 2008-11-29 21:47:55 +0000 (Sat, 29 Nov 2008) | 1 line
Workaround another in-place destruction.
........
r50118 | danieljames | 2008-12-04 21:30:19 +0000 (Thu, 04 Dec 2008) | 1 line
Add support for initializer lists to config and the unordered containers.
........
[SVN r50451]
2009-01-03 23:18:33 +00:00
|
|
|
#endif
|
|
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
allocator_type get_allocator() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.node_alloc();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// size and capacity
|
|
|
|
|
|
|
|
|
|
bool empty() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.size_ == 0;
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
size_type size() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.size_;
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
size_type max_size() const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
// iterators
|
|
|
|
|
|
|
|
|
|
iterator begin()
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return iterator(table_.begin());
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_iterator begin() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return const_iterator(table_.begin());
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iterator end()
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
return iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_iterator end() const
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
return const_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_iterator cbegin() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return const_iterator(table_.begin());
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_iterator cend() const
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
return const_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
// emplace
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2012-01-15 20:22:15 +00:00
|
|
|
#if defined(BOOST_UNORDERED_VARIADIC_MOVE)
|
2008-09-18 11:30:59 +00:00
|
|
|
template <class... Args>
|
2011-10-09 18:30:10 +00:00
|
|
|
std::pair<iterator, bool> emplace(Args&&... args)
|
|
|
|
|
{
|
2012-01-15 20:22:15 +00:00
|
|
|
return table_.emplace(boost::forward<Args>(args)...);
|
2011-10-09 18:30:10 +00:00
|
|
|
}
|
|
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
template <class... Args>
|
2011-10-09 18:30:10 +00:00
|
|
|
iterator emplace_hint(const_iterator, Args&&... args)
|
|
|
|
|
{
|
2012-01-15 20:22:15 +00:00
|
|
|
return table_.emplace(boost::forward<Args>(args)...).first;
|
2011-10-09 18:30:10 +00:00
|
|
|
}
|
Second try at merging emplace support.
Note that the previously rolled back commit was [53257], not [52357].
Merged revisions 52393-52394,52397,52884-52885,53255 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r52393 | danieljames | 2009-04-14 18:23:37 +0100 (Tue, 14 Apr 2009) | 2 lines
Implement full extract_key for compilers without SFINAE and variadic
templates.
........
r52394 | danieljames | 2009-04-14 18:23:51 +0100 (Tue, 14 Apr 2009) | 1 line
Use emplace instead of insert in the backend as it's more appropriate.
........
r52397 | danieljames | 2009-04-14 18:51:34 +0100 (Tue, 14 Apr 2009) | 1 line
Add stream output to the count test helper for unordered.
........
r52884 | danieljames | 2009-05-10 22:24:41 +0100 (Sun, 10 May 2009) | 19 lines
Cherrypick some unordered container changes from sandbox. Not including
anything which depends on the new move library.
------------------------------------------------------------------------
r52746 | danieljames | 2009-05-03 11:12:30 +0100 (Sun, 03 May 2009) | 1 line
Merge latest unordered container changes.
------------------------------------------------------------------------
r52747 | danieljames | 2009-05-03 11:15:35 +0100 (Sun, 03 May 2009) | 4 lines
Put the C++0x emplace implementations before the non-C++0x versions.
I'm going to change the non-C++0x to be macro heavy emulations of the
C++0x versions, so this will put the readable version first.
------------------------------------------------------------------------
r52748 | danieljames | 2009-05-03 11:15:44 +0100 (Sun, 03 May 2009) | 1 line
Refactor the unordered implementation a tad, to make implementing emplace less painful.
------------------------------------------------------------------------
........
r52885 | danieljames | 2009-05-10 22:25:09 +0100 (Sun, 10 May 2009) | 1 line
Merge emplace support for sandbox - but without move support.
........
r53255 | danieljames | 2009-05-25 20:45:06 +0100 (Mon, 25 May 2009) | 1 line
Unordered change log.
........
[SVN r53328]
2009-05-27 21:31:08 +00:00
|
|
|
#else
|
|
|
|
|
|
2011-12-11 21:39:18 +00:00
|
|
|
#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
|
|
|
|
|
|
|
|
|
|
// 0 argument emplace requires special treatment in case
|
|
|
|
|
// the container is instantiated with a value type that
|
|
|
|
|
// doesn't have a default constructor.
|
|
|
|
|
|
|
|
|
|
std::pair<iterator, bool> emplace(
|
|
|
|
|
boost::unordered::detail::empty_emplace
|
|
|
|
|
= boost::unordered::detail::empty_emplace(),
|
|
|
|
|
value_type v = value_type())
|
|
|
|
|
{
|
|
|
|
|
return this->emplace(boost::move(v));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iterator emplace_hint(const_iterator hint,
|
|
|
|
|
boost::unordered::detail::empty_emplace
|
|
|
|
|
= boost::unordered::detail::empty_emplace(),
|
|
|
|
|
value_type v = value_type()
|
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
return this->emplace_hint(hint, boost::move(v));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
template <typename A0>
|
|
|
|
|
std::pair<iterator, bool> emplace(BOOST_FWD_REF(A0) a0)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename A0>
|
|
|
|
|
iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0))
|
|
|
|
|
).first;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename A0, typename A1>
|
|
|
|
|
std::pair<iterator, bool> emplace(
|
|
|
|
|
BOOST_FWD_REF(A0) a0,
|
|
|
|
|
BOOST_FWD_REF(A1) a1)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0),
|
|
|
|
|
boost::forward<A1>(a1))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename A0, typename A1>
|
|
|
|
|
iterator emplace_hint(const_iterator,
|
|
|
|
|
BOOST_FWD_REF(A0) a0,
|
|
|
|
|
BOOST_FWD_REF(A1) a1)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0),
|
|
|
|
|
boost::forward<A1>(a1))
|
|
|
|
|
).first;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename A0, typename A1, typename A2>
|
|
|
|
|
std::pair<iterator, bool> emplace(
|
|
|
|
|
BOOST_FWD_REF(A0) a0,
|
|
|
|
|
BOOST_FWD_REF(A1) a1,
|
|
|
|
|
BOOST_FWD_REF(A2) a2)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0),
|
|
|
|
|
boost::forward<A1>(a1),
|
|
|
|
|
boost::forward<A2>(a2))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename A0, typename A1, typename A2>
|
|
|
|
|
iterator emplace_hint(const_iterator,
|
|
|
|
|
BOOST_FWD_REF(A0) a0,
|
|
|
|
|
BOOST_FWD_REF(A1) a1,
|
|
|
|
|
BOOST_FWD_REF(A2) a2)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0),
|
|
|
|
|
boost::forward<A1>(a1),
|
|
|
|
|
boost::forward<A2>(a2))
|
|
|
|
|
).first;
|
|
|
|
|
}
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
#define BOOST_UNORDERED_EMPLACE(z, n, _) \
|
|
|
|
|
template < \
|
|
|
|
|
BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
|
|
|
|
|
> \
|
|
|
|
|
std::pair<iterator, bool> emplace( \
|
|
|
|
|
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
|
|
|
|
|
) \
|
|
|
|
|
{ \
|
|
|
|
|
return table_.emplace( \
|
|
|
|
|
boost::unordered::detail::create_emplace_args( \
|
|
|
|
|
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
|
|
|
|
|
a) \
|
|
|
|
|
)); \
|
|
|
|
|
} \
|
|
|
|
|
\
|
|
|
|
|
template < \
|
|
|
|
|
BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
|
|
|
|
|
> \
|
|
|
|
|
iterator emplace_hint( \
|
|
|
|
|
const_iterator, \
|
|
|
|
|
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
|
|
|
|
|
) \
|
|
|
|
|
{ \
|
2011-12-11 21:39:18 +00:00
|
|
|
return table_.emplace( \
|
2011-10-09 18:30:10 +00:00
|
|
|
boost::unordered::detail::create_emplace_args( \
|
|
|
|
|
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
|
|
|
|
|
a) \
|
2011-12-11 21:39:18 +00:00
|
|
|
)).first; \
|
2011-10-09 18:30:10 +00:00
|
|
|
}
|
|
|
|
|
|
2011-12-11 21:39:18 +00:00
|
|
|
BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT,
|
2011-10-09 18:30:10 +00:00
|
|
|
BOOST_UNORDERED_EMPLACE, _)
|
|
|
|
|
|
|
|
|
|
#undef BOOST_UNORDERED_EMPLACE
|
|
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
#endif
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
std::pair<iterator, bool> insert(value_type const& x)
|
|
|
|
|
{
|
|
|
|
|
return this->emplace(x);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::pair<iterator, bool> insert(BOOST_UNORDERED_RV_REF(value_type) x)
|
|
|
|
|
{
|
|
|
|
|
return this->emplace(boost::move(x));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iterator insert(const_iterator hint, value_type const& x)
|
|
|
|
|
{
|
|
|
|
|
return this->emplace_hint(hint, x);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iterator insert(const_iterator hint,
|
|
|
|
|
BOOST_UNORDERED_RV_REF(value_type) x)
|
|
|
|
|
{
|
|
|
|
|
return this->emplace_hint(hint, boost::move(x));
|
|
|
|
|
}
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
template <class InputIt> void insert(InputIt, InputIt);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
Merge unordred changes.
Merged revisions 56441,56461,56468,56557-56562 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r56441 | danieljames | 2009-09-27 20:12:04 +0100 (Sun, 27 Sep 2009) | 1 line
Try supporting reference parameters in pairs. Probably not required.
........
r56461 | danieljames | 2009-09-29 00:06:03 +0100 (Tue, 29 Sep 2009) | 1 line
Remove the optimization for std::pair with a key reference. It'll be too much hassle to get a very unusual use case to work on all compilers.
........
r56468 | danieljames | 2009-09-29 08:46:44 +0100 (Tue, 29 Sep 2009) | 1 line
Just remove the test since the test itself doesn't work on most compilers.
........
r56557 | danieljames | 2009-10-03 17:40:26 +0100 (Sat, 03 Oct 2009) | 1 line
Fix the iterator category.
........
r56558 | danieljames | 2009-10-03 17:40:53 +0100 (Sat, 03 Oct 2009) | 2 lines
Update reference docs to latest version of draft standard and fill in
some missing details.
........
r56559 | danieljames | 2009-10-03 17:41:11 +0100 (Sat, 03 Oct 2009) | 1 line
Stricter insert exception tests.
........
r56560 | danieljames | 2009-10-03 17:41:32 +0100 (Sat, 03 Oct 2009) | 1 line
Insert using initializer lists.
........
r56561 | danieljames | 2009-10-03 17:42:00 +0100 (Sat, 03 Oct 2009) | 1 line
Update the unordered rationale.
........
r56562 | danieljames | 2009-10-03 17:42:20 +0100 (Sat, 03 Oct 2009) | 1 line
Make sure inserting from a range of types other than the value type is better tested.
........
[SVN r56700]
2009-10-10 13:52:53 +00:00
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
2011-08-21 19:19:12 +00:00
|
|
|
void insert(std::initializer_list<value_type>);
|
Merge unordred changes.
Merged revisions 56441,56461,56468,56557-56562 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r56441 | danieljames | 2009-09-27 20:12:04 +0100 (Sun, 27 Sep 2009) | 1 line
Try supporting reference parameters in pairs. Probably not required.
........
r56461 | danieljames | 2009-09-29 00:06:03 +0100 (Tue, 29 Sep 2009) | 1 line
Remove the optimization for std::pair with a key reference. It'll be too much hassle to get a very unusual use case to work on all compilers.
........
r56468 | danieljames | 2009-09-29 08:46:44 +0100 (Tue, 29 Sep 2009) | 1 line
Just remove the test since the test itself doesn't work on most compilers.
........
r56557 | danieljames | 2009-10-03 17:40:26 +0100 (Sat, 03 Oct 2009) | 1 line
Fix the iterator category.
........
r56558 | danieljames | 2009-10-03 17:40:53 +0100 (Sat, 03 Oct 2009) | 2 lines
Update reference docs to latest version of draft standard and fill in
some missing details.
........
r56559 | danieljames | 2009-10-03 17:41:11 +0100 (Sat, 03 Oct 2009) | 1 line
Stricter insert exception tests.
........
r56560 | danieljames | 2009-10-03 17:41:32 +0100 (Sat, 03 Oct 2009) | 1 line
Insert using initializer lists.
........
r56561 | danieljames | 2009-10-03 17:42:00 +0100 (Sat, 03 Oct 2009) | 1 line
Update the unordered rationale.
........
r56562 | danieljames | 2009-10-03 17:42:20 +0100 (Sat, 03 Oct 2009) | 1 line
Make sure inserting from a range of types other than the value type is better tested.
........
[SVN r56700]
2009-10-10 13:52:53 +00:00
|
|
|
#endif
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
iterator erase(const_iterator);
|
|
|
|
|
size_type erase(const key_type&);
|
|
|
|
|
iterator erase(const_iterator, const_iterator);
|
|
|
|
|
void quick_erase(const_iterator it) { erase(it); }
|
|
|
|
|
void erase_return_void(const_iterator it) { erase(it); }
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
void clear();
|
|
|
|
|
void swap(unordered_set&);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
// observers
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
hasher hash_function() const;
|
|
|
|
|
key_equal key_eq() const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
// lookup
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
const_iterator find(const key_type&) const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2009-12-30 22:17:48 +00:00
|
|
|
template <class CompatibleKey, class CompatibleHash,
|
|
|
|
|
class CompatiblePredicate>
|
|
|
|
|
const_iterator find(
|
2011-08-21 19:19:12 +00:00
|
|
|
CompatibleKey const&,
|
|
|
|
|
CompatibleHash const&,
|
|
|
|
|
CompatiblePredicate const&) const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
size_type count(const key_type&) const;
|
2011-10-09 18:30:10 +00:00
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
std::pair<const_iterator, const_iterator>
|
2011-08-21 19:19:12 +00:00
|
|
|
equal_range(const key_type&) const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
// bucket interface
|
|
|
|
|
|
|
|
|
|
size_type bucket_count() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.bucket_count_;
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
size_type max_bucket_count() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.max_bucket_count();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
size_type bucket_size(size_type) const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
size_type bucket(const key_type& k) const
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
return table_.hash_function()(k) % table_.bucket_count_;
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local_iterator begin(size_type n)
|
|
|
|
|
{
|
2011-10-09 18:30:10 +00:00
|
|
|
return table_.size_ ? local_iterator(
|
|
|
|
|
table_.get_start(n), n, table_.bucket_count_) :
|
|
|
|
|
local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_local_iterator begin(size_type n) const
|
|
|
|
|
{
|
2011-10-09 18:30:10 +00:00
|
|
|
return table_.size_ ? const_local_iterator(
|
|
|
|
|
table_.get_start(n), n, table_.bucket_count_) :
|
|
|
|
|
const_local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
local_iterator end(size_type)
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
const_local_iterator end(size_type) const
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return const_local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_local_iterator cbegin(size_type n) const
|
|
|
|
|
{
|
2011-10-09 18:30:10 +00:00
|
|
|
return table_.size_ ? const_local_iterator(
|
|
|
|
|
table_.get_start(n), n, table_.bucket_count_) :
|
|
|
|
|
const_local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
const_local_iterator cend(size_type) const
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return const_local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// hash policy
|
|
|
|
|
|
|
|
|
|
float max_load_factor() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.mlf_;
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
float load_factor() const;
|
|
|
|
|
void max_load_factor(float);
|
2011-10-09 18:30:10 +00:00
|
|
|
void rehash(size_type);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
2011-08-21 19:19:12 +00:00
|
|
|
friend bool operator==<T,H,P,A>(
|
|
|
|
|
unordered_set const&, unordered_set const&);
|
|
|
|
|
friend bool operator!=<T,H,P,A>(
|
|
|
|
|
unordered_set const&, unordered_set const&);
|
2008-09-18 11:30:59 +00:00
|
|
|
#endif
|
|
|
|
|
}; // class template unordered_set
|
|
|
|
|
|
2009-12-07 19:26:26 +00:00
|
|
|
template <class T, class H, class P, class A>
|
2008-09-18 11:30:59 +00:00
|
|
|
class unordered_multiset
|
|
|
|
|
{
|
2012-01-15 20:22:15 +00:00
|
|
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
2011-08-21 19:19:12 +00:00
|
|
|
BOOST_COPYABLE_AND_MOVABLE(unordered_multiset)
|
2012-01-15 20:22:15 +00:00
|
|
|
#endif
|
2008-09-18 11:30:59 +00:00
|
|
|
public:
|
|
|
|
|
|
2009-12-07 19:26:26 +00:00
|
|
|
typedef T key_type;
|
|
|
|
|
typedef T value_type;
|
|
|
|
|
typedef H hasher;
|
|
|
|
|
typedef P key_equal;
|
|
|
|
|
typedef A allocator_type;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
private:
|
2009-11-28 11:40:08 +00:00
|
|
|
|
2011-12-11 21:39:18 +00:00
|
|
|
typedef boost::unordered::detail::multiset<A, T, H, P> types;
|
|
|
|
|
typedef typename types::allocator value_allocator;
|
|
|
|
|
typedef typename types::traits allocator_traits;
|
2011-10-09 18:30:10 +00:00
|
|
|
typedef typename types::table table;
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
|
|
|
|
|
public:
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-09-04 19:37:45 +00:00
|
|
|
typedef typename allocator_traits::pointer pointer;
|
|
|
|
|
typedef typename allocator_traits::const_pointer const_pointer;
|
2011-08-21 19:19:12 +00:00
|
|
|
|
|
|
|
|
typedef value_type& reference;
|
|
|
|
|
typedef value_type const& const_reference;
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
|
|
|
|
|
typedef std::size_t size_type;
|
|
|
|
|
typedef std::ptrdiff_t difference_type;
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
typedef typename table::cl_iterator const_local_iterator;
|
|
|
|
|
typedef typename table::cl_iterator local_iterator;
|
|
|
|
|
typedef typename table::c_iterator const_iterator;
|
|
|
|
|
typedef typename table::c_iterator iterator;
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
table table_;
|
|
|
|
|
|
|
|
|
|
public:
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
// constructors
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
explicit unordered_multiset(
|
2011-10-09 18:30:10 +00:00
|
|
|
size_type = boost::unordered::detail::default_bucket_count,
|
2011-08-21 19:19:12 +00:00
|
|
|
const hasher& = hasher(),
|
|
|
|
|
const key_equal& = key_equal(),
|
|
|
|
|
const allocator_type& = allocator_type());
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
explicit unordered_multiset(allocator_type const&);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
template <class InputIt>
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset(InputIt, InputIt);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
template <class InputIt>
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset(
|
|
|
|
|
InputIt, InputIt,
|
|
|
|
|
size_type,
|
|
|
|
|
const hasher& = hasher(),
|
|
|
|
|
const key_equal& = key_equal());
|
Merge unordered changes, including fixes for Boost.TR1.
Merged revisions 55099-55100,55132,55138,55184-55185 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55099 | danieljames | 2009-07-22 23:37:52 +0100 (Wed, 22 Jul 2009) | 1 line
Fix the insert tests when there is a small number of buckets.
........
r55100 | danieljames | 2009-07-22 23:38:08 +0100 (Wed, 22 Jul 2009) | 1 line
Adjust the unordered defaults so that emplace takes more parameters and less buckets are created by default.
........
r55132 | danieljames | 2009-07-23 18:53:59 +0100 (Thu, 23 Jul 2009) | 1 line
Remove the emulation of single argument C++0x std::pair constructor.
........
r55138 | danieljames | 2009-07-23 23:17:20 +0100 (Thu, 23 Jul 2009) | 1 line
Try to work around an odd Visual C++ 8 bug.
........
r55184 | danieljames | 2009-07-26 19:59:33 +0100 (Sun, 26 Jul 2009) | 1 line
Some extra changelog notes.
........
r55185 | danieljames | 2009-07-26 20:00:40 +0100 (Sun, 26 Jul 2009) | 1 line
Update the reference documentation to mention that emplace is now emulated.
........
[SVN r55189]
2009-07-26 20:22:48 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
template <class InputIt>
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset(
|
|
|
|
|
InputIt, InputIt,
|
|
|
|
|
size_type,
|
|
|
|
|
const hasher&,
|
|
|
|
|
const key_equal&,
|
|
|
|
|
const allocator_type&);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
// copy/move constructors
|
2011-03-02 08:47:34 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset(unordered_multiset const&);
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
unordered_multiset(unordered_multiset const&, allocator_type const&);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2012-01-15 20:22:15 +00:00
|
|
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset(BOOST_RV_REF(unordered_multiset) other)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(other.table_, boost::unordered::detail::move_tag())
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
|
|
|
|
}
|
2012-01-15 20:22:15 +00:00
|
|
|
#elif !defined(BOOST_NO_RVALUE_REFERENCES)
|
|
|
|
|
unordered_multiset(unordered_multiset&& other)
|
|
|
|
|
: table_(other.table_, boost::unordered::detail::move_tag())
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2011-08-21 19:19:12 +00:00
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
|
|
|
|
unordered_multiset(unordered_multiset&&, allocator_type const&);
|
2008-09-18 11:30:59 +00:00
|
|
|
#endif
|
|
|
|
|
|
Merge latest changes for unordered. Improved compatability and a few tweaks.
Merged revisions 53127,53253,53256,53311,53314,53316-53318 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r53127 | danieljames | 2009-05-20 07:43:38 +0100 (Wed, 20 May 2009) | 1 line
Better configuration for boost.unordered.
........
r53253 | danieljames | 2009-05-25 20:14:07 +0100 (Mon, 25 May 2009) | 3 lines
Add explicit destructors to the unordered containers. Refs #2908.
Isn't really needed but it doesn't hurt.
........
r53256 | danieljames | 2009-05-25 20:45:23 +0100 (Mon, 25 May 2009) | 1 line
Unordered change log for explicit destructors.
........
r53311 | danieljames | 2009-05-27 18:42:01 +0100 (Wed, 27 May 2009) | 1 line
Missing changelog entry.
........
r53314 | danieljames | 2009-05-27 18:44:09 +0100 (Wed, 27 May 2009) | 1 line
Use lightweight_test for unordered.
........
r53316 | danieljames | 2009-05-27 19:19:32 +0100 (Wed, 27 May 2009) | 1 line
Some workarounds for old versions of Borland.
........
r53317 | danieljames | 2009-05-27 19:32:22 +0100 (Wed, 27 May 2009) | 1 line
Fix a change accidentally included in the last commit.
........
r53318 | danieljames | 2009-05-27 19:32:38 +0100 (Wed, 27 May 2009) | 1 line
Remove an unused function.
........
[SVN r53465]
2009-05-30 17:34:12 +00:00
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset(
|
|
|
|
|
std::initializer_list<value_type>,
|
2011-10-09 18:30:10 +00:00
|
|
|
size_type = boost::unordered::detail::default_bucket_count,
|
2011-08-21 19:19:12 +00:00
|
|
|
const hasher& = hasher(),
|
|
|
|
|
const key_equal&l = key_equal(),
|
|
|
|
|
const allocator_type& = allocator_type());
|
2011-10-09 18:30:10 +00:00
|
|
|
#endif
|
2011-08-21 19:19:12 +00:00
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
// Destructor
|
|
|
|
|
|
|
|
|
|
~unordered_multiset();
|
|
|
|
|
|
|
|
|
|
// Assign
|
|
|
|
|
|
2012-01-15 20:22:15 +00:00
|
|
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
2011-10-09 18:30:10 +00:00
|
|
|
unordered_multiset& operator=(
|
|
|
|
|
BOOST_COPY_ASSIGN_REF(unordered_multiset) x)
|
|
|
|
|
{
|
|
|
|
|
table_.assign(x.table_);
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unordered_multiset& operator=(BOOST_RV_REF(unordered_multiset) x)
|
|
|
|
|
{
|
|
|
|
|
table_.move_assign(x.table_);
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
2012-01-15 20:22:15 +00:00
|
|
|
#else
|
|
|
|
|
unordered_multiset& operator=(unordered_multiset const& x)
|
|
|
|
|
{
|
|
|
|
|
table_.assign(x.table_);
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
|
|
|
|
unordered_multiset& operator=(unordered_multiset&& x)
|
|
|
|
|
{
|
|
|
|
|
table_.move_assign(x.table_);
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
2011-10-09 18:30:10 +00:00
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset& operator=(std::initializer_list<value_type>);
|
Merge latest hash and unordered developments, and add support for initialiser
lists to config.
Merged revisions 49338,49924-49927,49955,50029,50118 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r49338 | danieljames | 2008-10-15 10:44:41 +0100 (Wed, 15 Oct 2008) | 2 lines
Revert [49229], it fixes the same problem as [48674].
........
r49924 | danieljames | 2008-11-24 22:55:14 +0000 (Mon, 24 Nov 2008) | 1 line
Extra tests for equality with different hash functions.
........
r49925 | danieljames | 2008-11-24 22:55:47 +0000 (Mon, 24 Nov 2008) | 1 line
Document operator==/operator!= as undefined if the equality predicates aren't equivalent.
........
r49926 | danieljames | 2008-11-24 22:56:04 +0000 (Mon, 24 Nov 2008) | 1 line
Use a larger prime number list.
........
r49927 | danieljames | 2008-11-24 23:15:55 +0000 (Mon, 24 Nov 2008) | 1 line
Use aligned storage for the value.
........
r49955 | danieljames | 2008-11-27 11:42:13 +0000 (Thu, 27 Nov 2008) | 1 line
Wild stab at getting destruction working on more compilers.
........
r50029 | danieljames | 2008-11-29 21:47:55 +0000 (Sat, 29 Nov 2008) | 1 line
Workaround another in-place destruction.
........
r50118 | danieljames | 2008-12-04 21:30:19 +0000 (Thu, 04 Dec 2008) | 1 line
Add support for initializer lists to config and the unordered containers.
........
[SVN r50451]
2009-01-03 23:18:33 +00:00
|
|
|
#endif
|
|
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
allocator_type get_allocator() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.node_alloc();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// size and capacity
|
|
|
|
|
|
|
|
|
|
bool empty() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.size_ == 0;
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
size_type size() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.size_;
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
size_type max_size() const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
// iterators
|
|
|
|
|
|
|
|
|
|
iterator begin()
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return iterator(table_.begin());
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_iterator begin() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return const_iterator(table_.begin());
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iterator end()
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
return iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_iterator end() const
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
return const_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_iterator cbegin() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return const_iterator(table_.begin());
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_iterator cend() const
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
return const_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
// emplace
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2012-01-15 20:22:15 +00:00
|
|
|
#if defined(BOOST_UNORDERED_VARIADIC_MOVE)
|
2008-09-18 11:30:59 +00:00
|
|
|
template <class... Args>
|
2011-10-09 18:30:10 +00:00
|
|
|
iterator emplace(Args&&... args)
|
|
|
|
|
{
|
2012-01-15 20:22:15 +00:00
|
|
|
return table_.emplace(boost::forward<Args>(args)...);
|
2011-10-09 18:30:10 +00:00
|
|
|
}
|
|
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
template <class... Args>
|
2011-10-09 18:30:10 +00:00
|
|
|
iterator emplace_hint(const_iterator, Args&&... args)
|
|
|
|
|
{
|
2012-01-15 20:22:15 +00:00
|
|
|
return table_.emplace(boost::forward<Args>(args)...);
|
2011-10-09 18:30:10 +00:00
|
|
|
}
|
Second try at merging emplace support.
Note that the previously rolled back commit was [53257], not [52357].
Merged revisions 52393-52394,52397,52884-52885,53255 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r52393 | danieljames | 2009-04-14 18:23:37 +0100 (Tue, 14 Apr 2009) | 2 lines
Implement full extract_key for compilers without SFINAE and variadic
templates.
........
r52394 | danieljames | 2009-04-14 18:23:51 +0100 (Tue, 14 Apr 2009) | 1 line
Use emplace instead of insert in the backend as it's more appropriate.
........
r52397 | danieljames | 2009-04-14 18:51:34 +0100 (Tue, 14 Apr 2009) | 1 line
Add stream output to the count test helper for unordered.
........
r52884 | danieljames | 2009-05-10 22:24:41 +0100 (Sun, 10 May 2009) | 19 lines
Cherrypick some unordered container changes from sandbox. Not including
anything which depends on the new move library.
------------------------------------------------------------------------
r52746 | danieljames | 2009-05-03 11:12:30 +0100 (Sun, 03 May 2009) | 1 line
Merge latest unordered container changes.
------------------------------------------------------------------------
r52747 | danieljames | 2009-05-03 11:15:35 +0100 (Sun, 03 May 2009) | 4 lines
Put the C++0x emplace implementations before the non-C++0x versions.
I'm going to change the non-C++0x to be macro heavy emulations of the
C++0x versions, so this will put the readable version first.
------------------------------------------------------------------------
r52748 | danieljames | 2009-05-03 11:15:44 +0100 (Sun, 03 May 2009) | 1 line
Refactor the unordered implementation a tad, to make implementing emplace less painful.
------------------------------------------------------------------------
........
r52885 | danieljames | 2009-05-10 22:25:09 +0100 (Sun, 10 May 2009) | 1 line
Merge emplace support for sandbox - but without move support.
........
r53255 | danieljames | 2009-05-25 20:45:06 +0100 (Mon, 25 May 2009) | 1 line
Unordered change log.
........
[SVN r53328]
2009-05-27 21:31:08 +00:00
|
|
|
#else
|
|
|
|
|
|
2011-12-11 21:39:18 +00:00
|
|
|
#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
|
|
|
|
|
|
|
|
|
|
// 0 argument emplace requires special treatment in case
|
|
|
|
|
// the container is instantiated with a value type that
|
|
|
|
|
// doesn't have a default constructor.
|
|
|
|
|
|
|
|
|
|
iterator emplace(
|
|
|
|
|
boost::unordered::detail::empty_emplace
|
|
|
|
|
= boost::unordered::detail::empty_emplace(),
|
|
|
|
|
value_type v = value_type())
|
|
|
|
|
{
|
|
|
|
|
return this->emplace(boost::move(v));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iterator emplace_hint(const_iterator hint,
|
|
|
|
|
boost::unordered::detail::empty_emplace
|
|
|
|
|
= boost::unordered::detail::empty_emplace(),
|
|
|
|
|
value_type v = value_type()
|
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
return this->emplace_hint(hint, boost::move(v));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
template <typename A0>
|
|
|
|
|
iterator emplace(BOOST_FWD_REF(A0) a0)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename A0>
|
|
|
|
|
iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename A0, typename A1>
|
|
|
|
|
iterator emplace(
|
|
|
|
|
BOOST_FWD_REF(A0) a0,
|
|
|
|
|
BOOST_FWD_REF(A1) a1)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0),
|
|
|
|
|
boost::forward<A1>(a1))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename A0, typename A1>
|
|
|
|
|
iterator emplace_hint(const_iterator,
|
|
|
|
|
BOOST_FWD_REF(A0) a0,
|
|
|
|
|
BOOST_FWD_REF(A1) a1)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0),
|
|
|
|
|
boost::forward<A1>(a1))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename A0, typename A1, typename A2>
|
|
|
|
|
iterator emplace(
|
|
|
|
|
BOOST_FWD_REF(A0) a0,
|
|
|
|
|
BOOST_FWD_REF(A1) a1,
|
|
|
|
|
BOOST_FWD_REF(A2) a2)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0),
|
|
|
|
|
boost::forward<A1>(a1),
|
|
|
|
|
boost::forward<A2>(a2))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename A0, typename A1, typename A2>
|
|
|
|
|
iterator emplace_hint(const_iterator,
|
|
|
|
|
BOOST_FWD_REF(A0) a0,
|
|
|
|
|
BOOST_FWD_REF(A1) a1,
|
|
|
|
|
BOOST_FWD_REF(A2) a2)
|
|
|
|
|
{
|
|
|
|
|
return table_.emplace(
|
|
|
|
|
boost::unordered::detail::create_emplace_args(
|
|
|
|
|
boost::forward<A0>(a0),
|
|
|
|
|
boost::forward<A1>(a1),
|
|
|
|
|
boost::forward<A2>(a2))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
#define BOOST_UNORDERED_EMPLACE(z, n, _) \
|
|
|
|
|
template < \
|
|
|
|
|
BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
|
|
|
|
|
> \
|
|
|
|
|
iterator emplace( \
|
|
|
|
|
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
|
|
|
|
|
) \
|
|
|
|
|
{ \
|
2011-12-11 21:39:18 +00:00
|
|
|
return table_.emplace( \
|
2011-10-09 18:30:10 +00:00
|
|
|
boost::unordered::detail::create_emplace_args( \
|
|
|
|
|
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
|
|
|
|
|
a) \
|
2011-12-11 21:39:18 +00:00
|
|
|
)); \
|
2011-10-09 18:30:10 +00:00
|
|
|
} \
|
|
|
|
|
\
|
|
|
|
|
template < \
|
|
|
|
|
BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
|
|
|
|
|
> \
|
|
|
|
|
iterator emplace_hint( \
|
|
|
|
|
const_iterator, \
|
|
|
|
|
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
|
|
|
|
|
) \
|
|
|
|
|
{ \
|
2011-12-11 21:39:18 +00:00
|
|
|
return table_.emplace( \
|
2011-10-09 18:30:10 +00:00
|
|
|
boost::unordered::detail::create_emplace_args( \
|
|
|
|
|
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
|
|
|
|
|
a) \
|
2011-12-11 21:39:18 +00:00
|
|
|
)); \
|
2011-10-09 18:30:10 +00:00
|
|
|
}
|
|
|
|
|
|
2011-12-11 21:39:18 +00:00
|
|
|
BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT,
|
2011-10-09 18:30:10 +00:00
|
|
|
BOOST_UNORDERED_EMPLACE, _)
|
|
|
|
|
|
|
|
|
|
#undef BOOST_UNORDERED_EMPLACE
|
|
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
#endif
|
|
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
iterator insert(value_type const& x)
|
|
|
|
|
{
|
|
|
|
|
return this->emplace(x);
|
|
|
|
|
}
|
2011-09-04 19:37:45 +00:00
|
|
|
|
2011-10-09 18:30:10 +00:00
|
|
|
iterator insert(BOOST_UNORDERED_RV_REF(value_type) x)
|
|
|
|
|
{
|
|
|
|
|
return this->emplace(boost::move(x));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iterator insert(const_iterator hint, value_type const& x)
|
|
|
|
|
{
|
|
|
|
|
return this->emplace_hint(hint, x);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iterator insert(const_iterator hint,
|
|
|
|
|
BOOST_UNORDERED_RV_REF(value_type) x)
|
|
|
|
|
{
|
|
|
|
|
return this->emplace_hint(hint, boost::move(x));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class InputIt> void insert(InputIt, InputIt);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
Merge unordred changes.
Merged revisions 56441,56461,56468,56557-56562 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r56441 | danieljames | 2009-09-27 20:12:04 +0100 (Sun, 27 Sep 2009) | 1 line
Try supporting reference parameters in pairs. Probably not required.
........
r56461 | danieljames | 2009-09-29 00:06:03 +0100 (Tue, 29 Sep 2009) | 1 line
Remove the optimization for std::pair with a key reference. It'll be too much hassle to get a very unusual use case to work on all compilers.
........
r56468 | danieljames | 2009-09-29 08:46:44 +0100 (Tue, 29 Sep 2009) | 1 line
Just remove the test since the test itself doesn't work on most compilers.
........
r56557 | danieljames | 2009-10-03 17:40:26 +0100 (Sat, 03 Oct 2009) | 1 line
Fix the iterator category.
........
r56558 | danieljames | 2009-10-03 17:40:53 +0100 (Sat, 03 Oct 2009) | 2 lines
Update reference docs to latest version of draft standard and fill in
some missing details.
........
r56559 | danieljames | 2009-10-03 17:41:11 +0100 (Sat, 03 Oct 2009) | 1 line
Stricter insert exception tests.
........
r56560 | danieljames | 2009-10-03 17:41:32 +0100 (Sat, 03 Oct 2009) | 1 line
Insert using initializer lists.
........
r56561 | danieljames | 2009-10-03 17:42:00 +0100 (Sat, 03 Oct 2009) | 1 line
Update the unordered rationale.
........
r56562 | danieljames | 2009-10-03 17:42:20 +0100 (Sat, 03 Oct 2009) | 1 line
Make sure inserting from a range of types other than the value type is better tested.
........
[SVN r56700]
2009-10-10 13:52:53 +00:00
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
2011-08-21 19:19:12 +00:00
|
|
|
void insert(std::initializer_list<value_type>);
|
Merge unordred changes.
Merged revisions 56441,56461,56468,56557-56562 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r56441 | danieljames | 2009-09-27 20:12:04 +0100 (Sun, 27 Sep 2009) | 1 line
Try supporting reference parameters in pairs. Probably not required.
........
r56461 | danieljames | 2009-09-29 00:06:03 +0100 (Tue, 29 Sep 2009) | 1 line
Remove the optimization for std::pair with a key reference. It'll be too much hassle to get a very unusual use case to work on all compilers.
........
r56468 | danieljames | 2009-09-29 08:46:44 +0100 (Tue, 29 Sep 2009) | 1 line
Just remove the test since the test itself doesn't work on most compilers.
........
r56557 | danieljames | 2009-10-03 17:40:26 +0100 (Sat, 03 Oct 2009) | 1 line
Fix the iterator category.
........
r56558 | danieljames | 2009-10-03 17:40:53 +0100 (Sat, 03 Oct 2009) | 2 lines
Update reference docs to latest version of draft standard and fill in
some missing details.
........
r56559 | danieljames | 2009-10-03 17:41:11 +0100 (Sat, 03 Oct 2009) | 1 line
Stricter insert exception tests.
........
r56560 | danieljames | 2009-10-03 17:41:32 +0100 (Sat, 03 Oct 2009) | 1 line
Insert using initializer lists.
........
r56561 | danieljames | 2009-10-03 17:42:00 +0100 (Sat, 03 Oct 2009) | 1 line
Update the unordered rationale.
........
r56562 | danieljames | 2009-10-03 17:42:20 +0100 (Sat, 03 Oct 2009) | 1 line
Make sure inserting from a range of types other than the value type is better tested.
........
[SVN r56700]
2009-10-10 13:52:53 +00:00
|
|
|
#endif
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
iterator erase(const_iterator);
|
|
|
|
|
size_type erase(const key_type&);
|
|
|
|
|
iterator erase(const_iterator, const_iterator);
|
2011-10-09 18:30:10 +00:00
|
|
|
void quick_erase(const_iterator it) { erase(it); }
|
|
|
|
|
void erase_return_void(const_iterator it) { erase(it); }
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
void clear();
|
|
|
|
|
void swap(unordered_multiset&);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
// observers
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
hasher hash_function() const;
|
|
|
|
|
key_equal key_eq() const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
// lookup
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
const_iterator find(const key_type&) const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2009-12-30 22:17:48 +00:00
|
|
|
template <class CompatibleKey, class CompatibleHash,
|
|
|
|
|
class CompatiblePredicate>
|
|
|
|
|
const_iterator find(
|
2011-08-21 19:19:12 +00:00
|
|
|
CompatibleKey const&,
|
|
|
|
|
CompatibleHash const&,
|
|
|
|
|
CompatiblePredicate const&) const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
size_type count(const key_type&) const;
|
2011-10-09 18:30:10 +00:00
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
std::pair<const_iterator, const_iterator>
|
2011-08-21 19:19:12 +00:00
|
|
|
equal_range(const key_type&) const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
// bucket interface
|
|
|
|
|
|
|
|
|
|
size_type bucket_count() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.bucket_count_;
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
size_type max_bucket_count() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.max_bucket_count();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
size_type bucket_size(size_type) const;
|
2008-09-18 11:30:59 +00:00
|
|
|
|
|
|
|
|
size_type bucket(const key_type& k) const
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
return table_.hash_function()(k) % table_.bucket_count_;
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local_iterator begin(size_type n)
|
|
|
|
|
{
|
2011-10-09 18:30:10 +00:00
|
|
|
return table_.size_ ? local_iterator(
|
|
|
|
|
table_.get_start(n), n, table_.bucket_count_) :
|
|
|
|
|
local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_local_iterator begin(size_type n) const
|
|
|
|
|
{
|
2011-10-09 18:30:10 +00:00
|
|
|
return table_.size_ ? const_local_iterator(
|
|
|
|
|
table_.get_start(n), n, table_.bucket_count_) :
|
|
|
|
|
const_local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
local_iterator end(size_type)
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
const_local_iterator end(size_type) const
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return const_local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const_local_iterator cbegin(size_type n) const
|
|
|
|
|
{
|
2011-10-09 18:30:10 +00:00
|
|
|
return table_.size_ ? const_local_iterator(
|
|
|
|
|
table_.get_start(n), n, table_.bucket_count_) :
|
|
|
|
|
const_local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
const_local_iterator cend(size_type) const
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return const_local_iterator();
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// hash policy
|
|
|
|
|
|
|
|
|
|
float max_load_factor() const
|
|
|
|
|
{
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return table_.mlf_;
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
float load_factor() const;
|
|
|
|
|
void max_load_factor(float);
|
|
|
|
|
void rehash(size_type);
|
2008-09-18 11:30:59 +00:00
|
|
|
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
2011-08-21 19:19:12 +00:00
|
|
|
friend bool operator==<T,H,P,A>(
|
|
|
|
|
unordered_multiset const&, unordered_multiset const&);
|
|
|
|
|
friend bool operator!=<T,H,P,A>(
|
|
|
|
|
unordered_multiset const&, unordered_multiset const&);
|
2008-09-18 11:30:59 +00:00
|
|
|
#endif
|
|
|
|
|
}; // class template unordered_multiset
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_set<T,H,P,A>::unordered_set(
|
|
|
|
|
size_type n, const hasher &hf, const key_equal &eql,
|
|
|
|
|
const allocator_type &a)
|
|
|
|
|
: table_(n, hf, eql, a)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_set<T,H,P,A>::unordered_set(allocator_type const& a)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(boost::unordered::detail::default_bucket_count,
|
2011-08-21 19:19:12 +00:00
|
|
|
hasher(), key_equal(), a)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_set<T,H,P,A>::unordered_set(
|
|
|
|
|
unordered_set const& other, allocator_type const& a)
|
|
|
|
|
: table_(other.table_, a)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
template <class InputIt>
|
|
|
|
|
unordered_set<T,H,P,A>::unordered_set(InputIt f, InputIt l)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(boost::unordered::detail::initial_size(f, l),
|
2011-08-21 19:19:12 +00:00
|
|
|
hasher(), key_equal(), allocator_type())
|
|
|
|
|
{
|
|
|
|
|
table_.insert_range(f, l);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
template <class InputIt>
|
|
|
|
|
unordered_set<T,H,P,A>::unordered_set(
|
|
|
|
|
InputIt f, InputIt l,
|
|
|
|
|
size_type n,
|
|
|
|
|
const hasher &hf,
|
|
|
|
|
const key_equal &eql)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(boost::unordered::detail::initial_size(f, l, n),
|
2011-08-21 19:19:12 +00:00
|
|
|
hf, eql, allocator_type())
|
|
|
|
|
{
|
|
|
|
|
table_.insert_range(f, l);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
template <class InputIt>
|
|
|
|
|
unordered_set<T,H,P,A>::unordered_set(
|
|
|
|
|
InputIt f, InputIt l,
|
|
|
|
|
size_type n,
|
|
|
|
|
const hasher &hf,
|
|
|
|
|
const key_equal &eql,
|
|
|
|
|
const allocator_type &a)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
|
2011-08-21 19:19:12 +00:00
|
|
|
{
|
|
|
|
|
table_.insert_range(f, l);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_set<T,H,P,A>::~unordered_set() {}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-10-09 18:30:10 +00:00
|
|
|
unordered_set<T,H,P,A>::unordered_set(
|
|
|
|
|
unordered_set const& other)
|
2011-08-21 19:19:12 +00:00
|
|
|
: table_(other.table_)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_set<T,H,P,A>::unordered_set(
|
|
|
|
|
unordered_set&& other, allocator_type const& a)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(other.table_, a, boost::unordered::detail::move_tag())
|
2011-08-21 19:19:12 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_set<T,H,P,A>::unordered_set(
|
|
|
|
|
std::initializer_list<value_type> list, size_type n,
|
|
|
|
|
const hasher &hf, const key_equal &eql, const allocator_type &a)
|
|
|
|
|
: table_(
|
2011-10-09 18:30:10 +00:00
|
|
|
boost::unordered::detail::initial_size(
|
2011-08-21 19:19:12 +00:00
|
|
|
list.begin(), list.end(), n),
|
|
|
|
|
hf, eql, a)
|
|
|
|
|
{
|
|
|
|
|
table_.insert_range(list.begin(), list.end());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_set<T,H,P,A>& unordered_set<T,H,P,A>::operator=(
|
|
|
|
|
std::initializer_list<value_type> list)
|
|
|
|
|
{
|
|
|
|
|
table_.clear();
|
|
|
|
|
table_.insert_range(list.begin(), list.end());
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// size and capacity
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
std::size_t unordered_set<T,H,P,A>::max_size() const
|
|
|
|
|
{
|
|
|
|
|
return table_.max_size();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// modifiers
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
template <class InputIt>
|
|
|
|
|
void unordered_set<T,H,P,A>::insert(InputIt first, InputIt last)
|
|
|
|
|
{
|
|
|
|
|
table_.insert_range(first, last);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-10-09 18:30:10 +00:00
|
|
|
void unordered_set<T,H,P,A>::insert(
|
|
|
|
|
std::initializer_list<value_type> list)
|
2011-08-21 19:19:12 +00:00
|
|
|
{
|
|
|
|
|
table_.insert_range(list.begin(), list.end());
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_set<T,H,P,A>::iterator
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set<T,H,P,A>::erase(const_iterator position)
|
|
|
|
|
{
|
|
|
|
|
return iterator(table_.erase(position.node_));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_set<T,H,P,A>::size_type
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set<T,H,P,A>::erase(const key_type& k)
|
|
|
|
|
{
|
|
|
|
|
return table_.erase_key(k);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_set<T,H,P,A>::iterator
|
2011-10-09 18:30:10 +00:00
|
|
|
unordered_set<T,H,P,A>::erase(
|
|
|
|
|
const_iterator first, const_iterator last)
|
2011-08-21 19:19:12 +00:00
|
|
|
{
|
|
|
|
|
return iterator(table_.erase_range(first.node_, last.node_));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
void unordered_set<T,H,P,A>::clear()
|
|
|
|
|
{
|
|
|
|
|
table_.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
void unordered_set<T,H,P,A>::swap(unordered_set& other)
|
|
|
|
|
{
|
|
|
|
|
table_.swap(other.table_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// observers
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_set<T,H,P,A>::hasher
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set<T,H,P,A>::hash_function() const
|
|
|
|
|
{
|
|
|
|
|
return table_.hash_function();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_set<T,H,P,A>::key_equal
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set<T,H,P,A>::key_eq() const
|
|
|
|
|
{
|
|
|
|
|
return table_.key_eq();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// lookup
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_set<T,H,P,A>::const_iterator
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set<T,H,P,A>::find(const key_type& k) const
|
|
|
|
|
{
|
|
|
|
|
return const_iterator(table_.find_node(k));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
template <class CompatibleKey, class CompatibleHash,
|
|
|
|
|
class CompatiblePredicate>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_set<T,H,P,A>::const_iterator
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set<T,H,P,A>::find(
|
|
|
|
|
CompatibleKey const& k,
|
|
|
|
|
CompatibleHash const& hash,
|
|
|
|
|
CompatiblePredicate const& eq) const
|
|
|
|
|
{
|
|
|
|
|
return const_iterator(table_.generic_find_node(k, hash, eq));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_set<T,H,P,A>::size_type
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set<T,H,P,A>::count(const key_type& k) const
|
|
|
|
|
{
|
|
|
|
|
return table_.count(k);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
std::pair<
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_set<T,H,P,A>::const_iterator,
|
|
|
|
|
typename unordered_set<T,H,P,A>::const_iterator>
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set<T,H,P,A>::equal_range(const key_type& k) const
|
|
|
|
|
{
|
2011-09-04 19:37:45 +00:00
|
|
|
return table_.equal_range(k);
|
2011-08-21 19:19:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_set<T,H,P,A>::size_type
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_set<T,H,P,A>::bucket_size(size_type n) const
|
|
|
|
|
{
|
|
|
|
|
return table_.bucket_size(n);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// hash policy
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
float unordered_set<T,H,P,A>::load_factor() const
|
|
|
|
|
{
|
|
|
|
|
return table_.load_factor();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
void unordered_set<T,H,P,A>::max_load_factor(float m)
|
|
|
|
|
{
|
|
|
|
|
table_.max_load_factor(m);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
void unordered_set<T,H,P,A>::rehash(size_type n)
|
|
|
|
|
{
|
|
|
|
|
table_.rehash(n);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
inline bool operator==(
|
|
|
|
|
unordered_set<T,H,P,A> const& m1,
|
|
|
|
|
unordered_set<T,H,P,A> const& m2)
|
|
|
|
|
{
|
|
|
|
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
|
|
|
|
struct dummy { unordered_set<T,H,P,A> x; };
|
|
|
|
|
#endif
|
|
|
|
|
return m1.table_.equals(m2.table_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
inline bool operator!=(
|
|
|
|
|
unordered_set<T,H,P,A> const& m1,
|
|
|
|
|
unordered_set<T,H,P,A> const& m2)
|
|
|
|
|
{
|
|
|
|
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
|
|
|
|
struct dummy { unordered_set<T,H,P,A> x; };
|
|
|
|
|
#endif
|
|
|
|
|
return !m1.table_.equals(m2.table_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
inline void swap(
|
|
|
|
|
unordered_set<T,H,P,A> &m1,
|
|
|
|
|
unordered_set<T,H,P,A> &m2)
|
|
|
|
|
{
|
|
|
|
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
|
|
|
|
struct dummy { unordered_set<T,H,P,A> x; };
|
|
|
|
|
#endif
|
|
|
|
|
m1.swap(m2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_multiset<T,H,P,A>::unordered_multiset(
|
|
|
|
|
size_type n, const hasher &hf, const key_equal &eql,
|
|
|
|
|
const allocator_type &a)
|
|
|
|
|
: table_(n, hf, eql, a)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_multiset<T,H,P,A>::unordered_multiset(allocator_type const& a)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(boost::unordered::detail::default_bucket_count,
|
2011-08-21 19:19:12 +00:00
|
|
|
hasher(), key_equal(), a)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_multiset<T,H,P,A>::unordered_multiset(
|
|
|
|
|
unordered_multiset const& other, allocator_type const& a)
|
|
|
|
|
: table_(other.table_, a)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
template <class InputIt>
|
|
|
|
|
unordered_multiset<T,H,P,A>::unordered_multiset(InputIt f, InputIt l)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(boost::unordered::detail::initial_size(f, l),
|
2011-08-21 19:19:12 +00:00
|
|
|
hasher(), key_equal(), allocator_type())
|
|
|
|
|
{
|
|
|
|
|
table_.insert_range(f, l);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
template <class InputIt>
|
|
|
|
|
unordered_multiset<T,H,P,A>::unordered_multiset(
|
|
|
|
|
InputIt f, InputIt l,
|
|
|
|
|
size_type n,
|
|
|
|
|
const hasher &hf,
|
|
|
|
|
const key_equal &eql)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(boost::unordered::detail::initial_size(f, l, n),
|
2011-08-21 19:19:12 +00:00
|
|
|
hf, eql, allocator_type())
|
|
|
|
|
{
|
|
|
|
|
table_.insert_range(f, l);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
template <class InputIt>
|
|
|
|
|
unordered_multiset<T,H,P,A>::unordered_multiset(
|
|
|
|
|
InputIt f, InputIt l,
|
|
|
|
|
size_type n,
|
|
|
|
|
const hasher &hf,
|
|
|
|
|
const key_equal &eql,
|
|
|
|
|
const allocator_type &a)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
|
2011-08-21 19:19:12 +00:00
|
|
|
{
|
|
|
|
|
table_.insert_range(f, l);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_multiset<T,H,P,A>::~unordered_multiset() {}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_multiset<T,H,P,A>::unordered_multiset(
|
|
|
|
|
unordered_multiset const& other)
|
|
|
|
|
: table_(other.table_)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_multiset<T,H,P,A>::unordered_multiset(
|
|
|
|
|
unordered_multiset&& other, allocator_type const& a)
|
2011-10-09 18:30:10 +00:00
|
|
|
: table_(other.table_, a, boost::unordered::detail::move_tag())
|
2011-08-21 19:19:12 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
2011-10-09 18:30:10 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_multiset<T,H,P,A>::unordered_multiset(
|
|
|
|
|
std::initializer_list<value_type> list, size_type n,
|
|
|
|
|
const hasher &hf, const key_equal &eql, const allocator_type &a)
|
|
|
|
|
: table_(
|
2011-10-09 18:30:10 +00:00
|
|
|
boost::unordered::detail::initial_size(
|
2011-08-21 19:19:12 +00:00
|
|
|
list.begin(), list.end(), n),
|
|
|
|
|
hf, eql, a)
|
|
|
|
|
{
|
|
|
|
|
table_.insert_range(list.begin(), list.end());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
unordered_multiset<T,H,P,A>& unordered_multiset<T,H,P,A>::operator=(
|
|
|
|
|
std::initializer_list<value_type> list)
|
|
|
|
|
{
|
|
|
|
|
table_.clear();
|
|
|
|
|
table_.insert_range(list.begin(), list.end());
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
2011-10-09 18:30:10 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// size and capacity
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
std::size_t unordered_multiset<T,H,P,A>::max_size() const
|
|
|
|
|
{
|
|
|
|
|
return table_.max_size();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// modifiers
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
template <class InputIt>
|
|
|
|
|
void unordered_multiset<T,H,P,A>::insert(InputIt first, InputIt last)
|
|
|
|
|
{
|
|
|
|
|
table_.insert_range(first, last);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-10-09 18:30:10 +00:00
|
|
|
void unordered_multiset<T,H,P,A>::insert(
|
|
|
|
|
std::initializer_list<value_type> list)
|
2011-08-21 19:19:12 +00:00
|
|
|
{
|
|
|
|
|
table_.insert_range(list.begin(), list.end());
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_multiset<T,H,P,A>::iterator
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset<T,H,P,A>::erase(const_iterator position)
|
|
|
|
|
{
|
|
|
|
|
return iterator(table_.erase(position.node_));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_multiset<T,H,P,A>::size_type
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset<T,H,P,A>::erase(const key_type& k)
|
|
|
|
|
{
|
|
|
|
|
return table_.erase_key(k);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_multiset<T,H,P,A>::iterator
|
2011-10-09 18:30:10 +00:00
|
|
|
unordered_multiset<T,H,P,A>::erase(
|
|
|
|
|
const_iterator first, const_iterator last)
|
2011-08-21 19:19:12 +00:00
|
|
|
{
|
|
|
|
|
return iterator(table_.erase_range(first.node_, last.node_));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
void unordered_multiset<T,H,P,A>::clear()
|
|
|
|
|
{
|
|
|
|
|
table_.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
void unordered_multiset<T,H,P,A>::swap(unordered_multiset& other)
|
|
|
|
|
{
|
|
|
|
|
table_.swap(other.table_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// observers
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_multiset<T,H,P,A>::hasher
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset<T,H,P,A>::hash_function() const
|
|
|
|
|
{
|
|
|
|
|
return table_.hash_function();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_multiset<T,H,P,A>::key_equal
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset<T,H,P,A>::key_eq() const
|
|
|
|
|
{
|
|
|
|
|
return table_.key_eq();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// lookup
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_multiset<T,H,P,A>::const_iterator
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset<T,H,P,A>::find(const key_type& k) const
|
|
|
|
|
{
|
|
|
|
|
return const_iterator(table_.find_node(k));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
template <class CompatibleKey, class CompatibleHash,
|
|
|
|
|
class CompatiblePredicate>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_multiset<T,H,P,A>::const_iterator
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset<T,H,P,A>::find(
|
|
|
|
|
CompatibleKey const& k,
|
|
|
|
|
CompatibleHash const& hash,
|
|
|
|
|
CompatiblePredicate const& eq) const
|
|
|
|
|
{
|
|
|
|
|
return const_iterator(table_.generic_find_node(k, hash, eq));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_multiset<T,H,P,A>::size_type
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset<T,H,P,A>::count(const key_type& k) const
|
|
|
|
|
{
|
|
|
|
|
return table_.count(k);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
std::pair<
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_multiset<T,H,P,A>::const_iterator,
|
|
|
|
|
typename unordered_multiset<T,H,P,A>::const_iterator>
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset<T,H,P,A>::equal_range(const key_type& k) const
|
|
|
|
|
{
|
2011-09-04 19:37:45 +00:00
|
|
|
return table_.equal_range(k);
|
2011-08-21 19:19:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-09-04 19:37:45 +00:00
|
|
|
typename unordered_multiset<T,H,P,A>::size_type
|
2011-08-21 19:19:12 +00:00
|
|
|
unordered_multiset<T,H,P,A>::bucket_size(size_type n) const
|
|
|
|
|
{
|
|
|
|
|
return table_.bucket_size(n);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// hash policy
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
float unordered_multiset<T,H,P,A>::load_factor() const
|
|
|
|
|
{
|
|
|
|
|
return table_.load_factor();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
void unordered_multiset<T,H,P,A>::max_load_factor(float m)
|
|
|
|
|
{
|
|
|
|
|
table_.max_load_factor(m);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
|
|
|
|
void unordered_multiset<T,H,P,A>::rehash(size_type n)
|
|
|
|
|
{
|
|
|
|
|
table_.rehash(n);
|
|
|
|
|
}
|
|
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
template <class T, class H, class P, class A>
|
2011-08-21 19:19:12 +00:00
|
|
|
inline bool operator==(
|
|
|
|
|
unordered_multiset<T,H,P,A> const& m1,
|
|
|
|
|
unordered_multiset<T,H,P,A> const& m2)
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
2009-12-07 19:26:26 +00:00
|
|
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
|
|
|
|
struct dummy { unordered_multiset<T,H,P,A> x; };
|
|
|
|
|
#endif
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return m1.table_.equals(m2.table_);
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-08-21 19:19:12 +00:00
|
|
|
inline bool operator!=(
|
|
|
|
|
unordered_multiset<T,H,P,A> const& m1,
|
|
|
|
|
unordered_multiset<T,H,P,A> const& m2)
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
2009-12-07 19:26:26 +00:00
|
|
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
|
|
|
|
struct dummy { unordered_multiset<T,H,P,A> x; };
|
|
|
|
|
#endif
|
New version of Boost.Unordered
Merged revisions 55470,55877-55878,55901-55902,55921-55922,55990-55992,56009-56010,56329,56346-56349,56362-56363,56374 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r55470 | danieljames | 2009-08-08 19:50:00 +0100 (Sat, 08 Aug 2009) | 1 line
Remove empty svn:mergeinfo properties. This should reduce the amount of differences between trunk and release.
........
r55877 | danieljames | 2009-08-30 17:33:42 +0100 (Sun, 30 Aug 2009) | 1 line
Remove allocator_constructor since it's never used.
........
r55878 | danieljames | 2009-08-30 17:42:28 +0100 (Sun, 30 Aug 2009) | 6 lines
Initial checkin of new version of Boost.Unordered.
- More template use, less preprocessor use.
- Removed some of the Visual C++ 6 workarounds.
- Reduced memory use of the main object.
- Split into smaller headers.
........
r55901 | danieljames | 2009-08-31 11:39:25 +0100 (Mon, 31 Aug 2009) | 1 line
Detab.
........
r55902 | danieljames | 2009-08-31 11:39:40 +0100 (Mon, 31 Aug 2009) | 1 line
Remove unnecessary BOOST_DEDUCED_TYPENAMEs
........
r55921 | danieljames | 2009-08-31 16:33:28 +0100 (Mon, 31 Aug 2009) | 1 line
Remove a few unused parameters.
........
r55922 | danieljames | 2009-08-31 16:33:49 +0100 (Mon, 31 Aug 2009) | 1 line
Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
........
r55990 | danieljames | 2009-09-03 08:36:21 +0100 (Thu, 03 Sep 2009) | 1 line
Combine hash_structure and hash_table_manager.
........
r55991 | danieljames | 2009-09-03 08:37:14 +0100 (Thu, 03 Sep 2009) | 1 line
Remove some old Visual C++ workarounds.
........
r55992 | danieljames | 2009-09-03 08:37:30 +0100 (Thu, 03 Sep 2009) | 1 line
Add a small test to see if the tested compilers support out of line template methods.
........
r56009 | danieljames | 2009-09-04 08:02:28 +0100 (Fri, 04 Sep 2009) | 1 line
Fix link to n2691.
........
r56010 | danieljames | 2009-09-04 08:03:04 +0100 (Fri, 04 Sep 2009) | 1 line
Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
........
r56329 | danieljames | 2009-09-20 22:55:15 +0100 (Sun, 20 Sep 2009) | 2 lines
Since all the compilers support out of line template members use them
and lots of other things.
........
r56346 | danieljames | 2009-09-21 22:17:19 +0100 (Mon, 21 Sep 2009) | 1 line
Slightly more consistent variable names. In detail 'n' is now always a node pointer.
........
r56347 | danieljames | 2009-09-21 22:17:40 +0100 (Mon, 21 Sep 2009) | 1 line
Fix bug where container was reducing the number of buckets.
........
r56348 | danieljames | 2009-09-21 22:18:01 +0100 (Mon, 21 Sep 2009) | 1 line
Fix a bug that was causing unnecessary rehahes.
........
r56349 | danieljames | 2009-09-21 22:18:21 +0100 (Mon, 21 Sep 2009) | 1 line
Use std::max.
........
r56362 | danieljames | 2009-09-22 23:39:00 +0100 (Tue, 22 Sep 2009) | 1 line
Another std::max.
........
r56363 | danieljames | 2009-09-22 23:39:17 +0100 (Tue, 22 Sep 2009) | 1 line
Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
........
r56374 | danieljames | 2009-09-24 21:42:19 +0100 (Thu, 24 Sep 2009) | 1 line
Remove temporary test.
........
[SVN r56375]
2009-09-24 21:12:46 +00:00
|
|
|
return !m1.table_.equals(m2.table_);
|
2008-09-18 11:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T, class H, class P, class A>
|
2011-08-21 19:19:12 +00:00
|
|
|
inline void swap(
|
|
|
|
|
unordered_multiset<T,H,P,A> &m1,
|
|
|
|
|
unordered_multiset<T,H,P,A> &m2)
|
2008-09-18 11:30:59 +00:00
|
|
|
{
|
2009-12-07 19:26:26 +00:00
|
|
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
|
|
|
|
struct dummy { unordered_multiset<T,H,P,A> x; };
|
|
|
|
|
#endif
|
2008-09-18 11:30:59 +00:00
|
|
|
m1.swap(m2);
|
|
|
|
|
}
|
2011-08-21 19:19:12 +00:00
|
|
|
} // namespace unordered
|
2008-09-18 11:30:59 +00:00
|
|
|
} // namespace boost
|
|
|
|
|
|
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.
........
[SVN r49855]
2008-11-20 22:53:20 +00:00
|
|
|
#if defined(BOOST_MSVC)
|
|
|
|
|
#pragma warning(pop)
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-09-18 11:30:59 +00:00
|
|
|
#endif // BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED
|