Commit Graph

596 Commits

Author SHA1 Message Date
Daniel James
ff66f79721 Unordered: Import functions into boost namespace.
[SVN r72905]
2011-07-04 21:52:17 +00:00
Daniel James
8b610a6d34 Unordered: Work around for compilers which don't support template friend members.
[SVN r72523]
2011-06-09 19:48:34 +00:00
Daniel James
20e923ba0d Unordered: Move the implementation into a namespace.
Although it typically won't prevent ADL, because of boost::hash.

[SVN r72391]
2011-06-04 16:17:07 +00:00
Daniel James
4777eaf367 Unordered: remove some dead, bad code.
[SVN r72390]
2011-06-04 16:15:27 +00:00
Daniel James
a40422fada Unordered: remove use of the 'or' keyword.
[SVN r71602]
2011-04-29 11:03:29 +00:00
Daniel James
b1912055a9 Unordered: Fix some errors in the equality tests.
[SVN r71363]
2011-04-17 21:27:38 +00:00
Daniel James
e8714d79b2 Unordered: Implement C++0x equality.
[SVN r71354]
2011-04-17 16:23:25 +00:00
Daniel James
f8e2a917f9 Unordered: 2 phase lookup fix for clang.
[SVN r71352]
2011-04-17 14:27:08 +00:00
Daniel James
140e8852e8 Unordered: fix some gcc issues.
[SVN r71346]
2011-04-17 00:31:35 +00:00
Daniel James
547e141166 Unordered: Overhaul the implementation.
Store nodes in a single linked list, with hash values so that their
buckets can be found when needed. Iterators now only have to store a
pointer to the node and don't have to iterate over empty buckets to
reach the next node. This allows the container to meet the iterator
requirements - fixing the speed issues with `equal_range` and `erase`.

Also, define iterators in their own namespace, so that they don't
accidentally pull in detail functions via ADL.

I've simplified the code slightly by removing some of the special
cases for empty containers. Renamed a few things as well and other
minor changes that were made as I went along.

[SVN r71327]
2011-04-16 18:47:33 +00:00
Daniel James
a33949a0a5 Add copy constructors and assignment operators when using rvalue references. Refs #5119.
[SVN r68445]
2011-01-25 20:13:43 +00:00
Daniel James
b9188caf7d Fix [66556] - Remove clang workaround.
I accidentaly removed the good code and left the workaround in. Also, a
correction to the comment: I think bug was only in a unreleased version
of clang.

[SVN r66567]
2010-11-14 11:43:49 +00:00
Daniel James
14e0e1afc2 Less use of the ampersand operator in unordered.
[SVN r66557]
2010-11-13 12:31:54 +00:00
Daniel James
2c1a8894cb Remove clang workaround.
Clang from llvm 2.8 doesn't need it. Clang form llvm 2.7 isn't
supported.

[SVN r66556]
2010-11-13 12:30:45 +00:00
Daniel James
a49c76c69c More comments describing the unordered internals.
And fix a couple of small mistakes in the existing comments.

[SVN r66555]
2010-11-13 12:30:06 +00:00
Daniel James
77bd36d038 Declare inline functions as inline.
[SVN r66193]
2010-10-25 21:59:52 +00:00
Daniel James
daad24388c Fix iterator insert bug in unordered_set/unordered_map.
[SVN r66136]
2010-10-21 20:23:37 +00:00
Daniel James
5edc45349f Revert changes for sun 5.9.
Nobody seems to be running the tests now.


[SVN r62117]
2010-05-21 07:06:33 +00:00
Daniel James
dfaa61b666 Another inline.
[SVN r61872]
2010-05-09 07:24:47 +00:00
Daniel James
076e195cac Define several methods inline.
Sun 5.9 was having some issues.

[SVN r61831]
2010-05-06 20:13:25 +00:00
Daniel James
71a8e56ae3 Move equivalent and unique hash tables into their own headers.
[SVN r61830]
2010-05-06 20:12:40 +00:00
Daniel James
ef79fea0b7 The clang workaround broke some compilers, so only use it for clang.
[SVN r61529]
2010-04-24 12:59:35 +00:00
Daniel James
5bab4d4360 Work around friend bug in clang.
[SVN r61504]
2010-04-23 07:25:53 +00:00
Daniel James
00cebc3dfb Use boost::throw_exception in unordered.
[SVN r60983]
2010-03-31 21:42:08 +00:00
Daniel James
ee034e23bb Add quick_erase to the unordered containers. Refs #3966.
[SVN r60754]
2010-03-22 00:42:07 +00:00
Daniel James
06f63fdc0d Stop using the deprecated BOOST_HAS_ macros in unordered and hash.
[SVN r59697]
2010-02-15 23:01:06 +00:00
Daniel James
7efcf9ccff Set length of primes inside template on Sun C++. Refs #3854
[SVN r59200]
2010-01-21 18:01:53 +00:00
Daniel James
71096f4d26 Formatting changes, mostly to fit within 80 characters.
Also, some C casts converted to static_cast.

[SVN r58692]
2010-01-04 22:49:39 +00:00
Daniel James
b99382b551 Add templated find overload for compatible keys.
[SVN r58405]
2009-12-15 22:53:33 +00:00
Daniel James
4e6292b439 Implement an alternative erase function that doesn't return an iterator.
Ref #3693

[SVN r58403]
2009-12-15 22:52:52 +00:00
Daniel James
2f0a94bcfd Add missing std:: qualifier to ptrdiff_t. Refs #3773.
[SVN r58402]
2009-12-15 22:42:04 +00:00
Daniel James
c8b893cb77 Workaround codegear ICE.
It seems that the problem is calling sizeof on a dependent type when the
containers have only been used by reference. So by putting in these
dummy structures with the containers as members, it helps the compiler
instantiate the class to the level where sizeof works. I hope.

[SVN r58130]
2009-12-04 00:51:50 +00:00
Daniel James
a1252fcc0e Use consistent names for template parameters.
I'm trying to fix the codegear ICEs, but it's hard to tell the cause.
Since the error happens operator== I suspect it's either to do
with defining friend functions with different template names or
something to do with friend functions in general. This is the first stab
in the dark at fixing this.

[SVN r58062]
2009-11-30 18:25:26 +00:00
Daniel James
3e638049ec Try to support incomplete types for Sun - at the expense of zero argument emplace.
[SVN r58002]
2009-11-28 11:46:05 +00:00
Daniel James
1f17294cd3 Use remove_const again.
[SVN r57840]
2009-11-21 20:37:50 +00:00
Daniel James
df72c4886f Support incomplete template parameters to unordered containers.
[SVN r57798]
2009-11-20 08:03:26 +00:00
Daniel James
26c72f9860 Use 'E' for key extractor, freeing 'K' for key.
[SVN r57797]
2009-11-20 08:02:48 +00:00
Daniel James
55957bbab5 Some more warning fixes for Visual C++ 7.1
[SVN r57719]
2009-11-16 23:56:37 +00:00
Daniel James
ab843eb587 Fix a warning on Visual C++ 7.1. Although, I don't think I'm going to be warning free on the compiler.
[SVN r57617]
2009-11-12 21:36:27 +00:00
Daniel James
4438b8e017 Fix a warning that only shows up in release builds.
[SVN r57556]
2009-11-10 20:07:50 +00:00
Daniel James
b4f08db391 Remove 'grouped' from hash_table as it isn't used and is a bit confusing.
[SVN r57153]
2009-10-25 10:55:27 +00:00
Daniel James
060acb3f25 Slightly rearrange the unordered container headers so that prev_prime is defined before it's used.
[SVN r57152]
2009-10-25 10:55:08 +00:00
Daniel James
6bac25221a Fix unordered for intel strict.
[SVN r57139]
2009-10-24 17:53:03 +00:00
Daniel James
2fdd33381c Fix allocator for construct from initializer list.
[SVN r57006]
2009-10-19 19:32:09 +00:00
Daniel James
8d4b503e56 Use normal emplace implementation for emplace_hint and insert with hint.
There's a bug in the emplace_hint implementation for unordered
containers with equivalent keys. Since my tests missed it, I'm just
going to use the normal emplace implementation until I write better
tests.

[SVN r57005]
2009-10-19 19:24:33 +00:00
Daniel James
854dc0b353 Various inspect fixes.
[SVN r56603]
2009-10-05 21:29:39 +00:00
Daniel James
373791d0b2 Detab.
[SVN r56571]
2009-10-04 10:37:56 +00:00
Daniel James
fe3d612fe0 Clean up some unordered TODOs.
[SVN r56570]
2009-10-04 10:37:36 +00:00
Daniel James
ae0c97a77a Make sure inserting from a range of types other than the value type is better tested.
[SVN r56562]
2009-10-03 16:42:20 +00:00
Daniel James
1e24f85fbc Insert using initializer lists.
[SVN r56560]
2009-10-03 16:41:32 +00:00
Daniel James
2b8680d2c4 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.
[SVN r56461]
2009-09-28 23:06:03 +00:00
Daniel James
31cd8f4e16 Try supporting reference parameters in pairs. Probably not required.
[SVN r56441]
2009-09-27 19:12:04 +00:00
Daniel James
437a35feaa Remove the emplace_hint implementation for unique containers as it isn't really used and seems to be causing sun 5.7 problems.
[SVN r56363]
2009-09-22 22:39:17 +00:00
Daniel James
f76af2d0c8 Another std::max.
[SVN r56362]
2009-09-22 22:39:00 +00:00
Daniel James
efbf13685e Use std::max.
[SVN r56349]
2009-09-21 21:18:21 +00:00
Daniel James
08d533cb88 Fix a bug that was causing unnecessary rehahes.
[SVN r56348]
2009-09-21 21:18:01 +00:00
Daniel James
ff6e457651 Fix bug where container was reducing the number of buckets.
[SVN r56347]
2009-09-21 21:17:40 +00:00
Daniel James
965c2ae89c Slightly more consistent variable names. In detail 'n' is now always a node pointer.
[SVN r56346]
2009-09-21 21:17:19 +00:00
Daniel James
78b078f41d Since all the compilers support out of line template members use them
and lots of other things.

[SVN r56329]
2009-09-20 21:55:15 +00:00
Daniel James
491fa330f6 Move size_ and cached_begin_bucket_ into table, rename hash_table_manager hash_buckets.
[SVN r56010]
2009-09-04 07:03:04 +00:00
Daniel James
6a8506d959 Remove some old Visual C++ workarounds.
[SVN r55991]
2009-09-03 07:37:14 +00:00
Daniel James
7fe53ef5a3 Combine hash_structure and hash_table_manager.
[SVN r55990]
2009-09-03 07:36:21 +00:00
Daniel James
1743ed118d Remove 'static' from next_node and node_count. Will hopefully make vacpp happy.
[SVN r55922]
2009-08-31 15:33:49 +00:00
Daniel James
848b73f99f Remove a few unused parameters.
[SVN r55921]
2009-08-31 15:33:28 +00:00
Daniel James
ccc88ecf0a Remove unnecessary BOOST_DEDUCED_TYPENAMEs
[SVN r55902]
2009-08-31 10:39:40 +00:00
Daniel James
c40cb50fe5 Detab.
[SVN r55901]
2009-08-31 10:39:25 +00:00
Daniel James
386d9f28d7 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.

[SVN r55878]
2009-08-30 16:42:28 +00:00
Daniel James
4350660626 Remove allocator_constructor since it's never used.
[SVN r55877]
2009-08-30 16:33:42 +00:00
Daniel James
cf363355df Try to work around an odd Visual C++ 8 bug.
[SVN r55138]
2009-07-23 22:17:20 +00:00
Daniel James
ca018bfba6 Remove the emulation of single argument C++0x std::pair constructor.
[SVN r55132]
2009-07-23 17:53:59 +00:00
Daniel James
3c48fa3818 Adjust the unordered defaults so that emplace takes more parameters and less buckets are created by default.
[SVN r55100]
2009-07-22 22:38:08 +00:00
Daniel James
cec1891586 Disable incorrect Visual C++ 64-bit warnings. Ref #3082.
[SVN r53505]
2009-05-31 15:50:56 +00:00
Daniel James
b83a73ab40 Remove an unused function.
[SVN r53318]
2009-05-27 18:32:38 +00:00
Daniel James
caa0b7cdf6 Fix a change accidentally included in the last commit.
[SVN r53317]
2009-05-27 18:32:22 +00:00
Daniel James
46caec7d77 Some workarounds for old versions of Borland.
[SVN r53316]
2009-05-27 18:19:32 +00:00
Daniel James
cfc134b871 Add explicit destructors to the unordered containers. Refs #2908.
Isn't really needed but it doesn't hurt.

[SVN r53253]
2009-05-25 19:14:07 +00:00
Daniel James
20c9360528 Better configuration for boost.unordered.
[SVN r53127]
2009-05-20 06:43:38 +00:00
Daniel James
09b239ed28 Merge emplace support for sandbox - but without move support.
[SVN r52885]
2009-05-10 21:25:09 +00:00
Daniel James
294d58d2fe 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.
------------------------------------------------------------------------

[SVN r52884]
2009-05-10 21:24:41 +00:00
Daniel James
3e70155100 Use a preprocessor sequence for the primes.
This feels like overkill but it seems to be the most reliable way to ensure
that the length is correct. I obviously can't be trusted to get it right, and
the template hack seems to prevent Boost.Range from working.

[SVN r52711]
2009-05-01 20:50:32 +00:00
Daniel James
ce379f7bb5 Fix the prime number list length in unordered.
[SVN r52674]
2009-04-30 05:10:57 +00:00
Daniel James
f8e1ec8d2b Revert changes to unordered, as the test fails on most compilers.
[SVN r52673]
2009-04-30 05:08:40 +00:00
Daniel James
4c3c18467c Fix the length of the prime number list. Refs #2975
[SVN r52658]
2009-04-29 10:05:17 +00:00
Daniel James
ac2409627a Use emplace instead of insert in the backend as it's more appropriate.
[SVN r52394]
2009-04-14 17:23:51 +00:00
Daniel James
a07e4c5810 Implement full extract_key for compilers without SFINAE and variadic
templates.

[SVN r52393]
2009-04-14 17:23:37 +00:00
Daniel James
4ac0a12a83 Avoid an unnecessary copy in 'operator[]'
[SVN r52224]
2009-04-06 22:51:36 +00:00
Daniel James
6ccc68b15c Give up and use another macro to destruct values.
[SVN r51995]
2009-03-26 21:09:51 +00:00
Daniel James
188bcafdec Try to destruct values in a way that all compilers might like.
[SVN r51983]
2009-03-26 07:00:46 +00:00
Daniel James
3a8739cd60 Revert [51409]
It isn't working on Borland.

[SVN r51982]
2009-03-26 07:00:21 +00:00
Daniel James
638accbec4 Update copyright dates in hash and unordered.
[SVN r51667]
2009-03-09 20:56:23 +00:00
Daniel James
d442f20bf8 Move some of the data structure classes out of hash table data.
[SVN r51409]
2009-02-22 23:50:20 +00:00
Daniel James
d36fc98c15 Make copy_buckets and move_buckets member functions - so that calling them is a bit simpler.
[SVN r51408]
2009-02-22 23:50:04 +00:00
Daniel James
77021c5bbb Remove a tab.
[SVN r50452]
2009-01-03 23:26:00 +00:00
Daniel James
fe3873b28f Add support for initializer lists to config and the unordered containers.
[SVN r50118]
2008-12-04 21:30:19 +00:00
Daniel James
c1e9a6ac59 Workaround another in-place destruction.
[SVN r50029]
2008-11-29 21:47:55 +00:00
Daniel James
c2425106ea Wild stab at getting destruction working on more compilers.
[SVN r49955]
2008-11-27 11:42:13 +00:00
Daniel James
c8e7874534 Use aligned storage for the value.
[SVN r49927]
2008-11-24 23:15:55 +00:00
Daniel James
601daa0e5d Use a larger prime number list. Fixes #1710
[SVN r49926]
2008-11-24 22:56:04 +00:00
Daniel James
f0bb74a530 Use the new swap library.
[SVN r49770]
2008-11-15 13:07:29 +00:00
Daniel James
b75f06d935 Use pragmas to suppress a Visual C++ warning.
[SVN r49756]
2008-11-14 16:11:16 +00:00
Daniel James
e2d1d75955 Explicitly specify the template parameters in the unordered container friend, in order to avoid some warnings.
[SVN r49735]
2008-11-14 12:51:00 +00:00
John Maddock
d98f72c4e1 Change includes of <cmath> to <boost/config/no_tr1/config.hpp>.
Previously if Boost.TR1 was in the include path then including <cmath> pulls in all the new TR1 math functions, which in turn also requires linking to an external library.  With auto-linking support this requires that library to have been built and be present in the library search path, even if the actual library under use is header only.

Fixes #2392.


[SVN r49254]
2008-10-10 16:10:00 +00:00
Daniel James
f5d52cc9b2 Move the unordered headers into the unordered directory.
[SVN r48803]
2008-09-16 21:49:41 +00:00
Daniel James
62427c8287 Forward headers for the unordered containers.
[SVN r48802]
2008-09-16 21:45:53 +00:00
Daniel James
d6f513be52 Rename 'emplace' with hint to 'emplace_hint'.
[SVN r48081]
2008-08-11 07:52:37 +00:00
Daniel James
4305d10264 On second thoughts, I'll just completely remove hash_value for ordered
containers. It's low quality and not very generic (it uses boost::hash for
mapped values). Should be a painless change.


[SVN r47465]
2008-07-15 22:03:15 +00:00
Daniel James
d5b38b01fc Better hash function for unordered containers. Still a bit rubbish.
[SVN r47463]
2008-07-15 21:26:54 +00:00
Daniel James
d66936a640 Require explicit conversion from allocators.
(Not what it says in the draft standard, but I think that might be a defect).


[SVN r47085]
2008-07-04 22:57:20 +00:00
Daniel James
3640e1e96c Workaround for some template syntax not supported in old versions of Visual C++ 6.5
[SVN r47040]
2008-07-03 14:34:56 +00:00
Daniel James
ec1e809fc3 Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.

Merged revisions 46594-46604 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk


[SVN r46607]
2008-06-22 13:54:45 +00:00
Daniel James
9bd3f498a7 Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.


[SVN r46579]
2008-06-21 15:32:11 +00:00
Daniel James
659a014976 Fix in an error in the unordered containers' emulated move constructors. These
aren't actually used, so I could probalby just remove 'move_from' for now (it's
used in the full move library).


[SVN r46410]
2008-06-15 17:03:37 +00:00
Daniel James
6b65b7a916 Merge test improvements, pdf documentation improvements, some implementation
tweaks.

Merged revisions 45747-46030 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

................
  r45747 | danieljames | 2008-05-25 18:03:30 +0100 (Sun, 25 May 2008) | 1 line
  
  Remove /branches/unordered/dev from svnmerge tracking.
................
  r45874 | danieljames | 2008-05-28 18:54:53 +0100 (Wed, 28 May 2008) | 1 line
  
  Merge from trunk.
................
  r45881 | danieljames | 2008-05-29 00:10:37 +0100 (Thu, 29 May 2008) | 2 lines
  
  Make it possible to use a custom generator in more places.
................
  r45882 | danieljames | 2008-05-29 00:10:56 +0100 (Thu, 29 May 2008) | 2 lines
  
  Remove several unused parameters.
................
  r45883 | danieljames | 2008-05-29 00:11:06 +0100 (Thu, 29 May 2008) | 2 lines
  
  No need to run move_construct_tests1 from move_construct_tests2, already calling it directly.
................
  r45884 | danieljames | 2008-05-29 00:11:15 +0100 (Thu, 29 May 2008) | 2 lines
  
  Remove unused 'construct' as in trunk.
................
  r45885 | danieljames | 2008-05-29 00:11:25 +0100 (Thu, 29 May 2008) | 2 lines
  
  More consistent implementations of insert_impl.
................
  r45886 | danieljames | 2008-05-29 00:11:34 +0100 (Thu, 29 May 2008) | 2 lines
  
  No need to use the single argument version of methods when the variadic version is available. Frees up the non-variadic version for overloading to emulate variadic methods.
................
  r45887 | danieljames | 2008-05-29 00:11:44 +0100 (Thu, 29 May 2008) | 2 lines
  
  Add another test, mainly to avoid an unused parameter warning.
................
  r45888 | danieljames | 2008-05-29 00:11:54 +0100 (Thu, 29 May 2008) | 2 lines
  
  Adjust the pixels per inch of the buckets diagram so it'll fit on the page.
................
  r45889 | danieljames | 2008-05-29 00:15:49 +0100 (Thu, 29 May 2008) | 1 line
  
  Improve pdf output, thanks to John Maddock.
................
  r45890 | danieljames | 2008-05-29 00:17:45 +0100 (Thu, 29 May 2008) | 1 line
  
  Add an svg version of the bucket diagram.
................
  r45891 | danieljames | 2008-05-29 00:18:11 +0100 (Thu, 29 May 2008) | 1 line
  
  Remove the original dia buckets diagram, I'm not using it anymore.
................
  r46025 | danieljames | 2008-06-01 18:39:51 +0100 (Sun, 01 Jun 2008) | 1 line
  
  Initialise merging from doc.
................
  r46030 | danieljames | 2008-06-01 18:54:36 +0100 (Sun, 01 Jun 2008) | 29 lines
  
  Merge in documentation improvements from the doc branch.
  
  Merged revisions 45892-46020 via svnmerge from 
  https://svn.boost.org/svn/boost/branches/doc
  
  ........
    r45892 | danieljames | 2008-05-29 00:30:07 +0100 (Thu, 29 May 2008) | 1 line
    
    Merge latest changes from unordered.
  ........
    r46017 | danieljames | 2008-06-01 18:18:15 +0100 (Sun, 01 Jun 2008) | 2 lines
    
    Use both PNG and SVG versions of the buckets diagram.
  ........
    r46018 | danieljames | 2008-06-01 18:18:27 +0100 (Sun, 01 Jun 2008) | 2 lines
    
    Improved function summary tables in unordered documenations.
  ........
    r46019 | danieljames | 2008-06-01 18:18:39 +0100 (Sun, 01 Jun 2008) | 3 lines
    
    I'd hacked the bibliography to avoid showing the title twice, but this was
    causing problems when generating PDFs, so show the title twice.
  ........
    r46020 | danieljames | 2008-06-01 18:18:52 +0100 (Sun, 01 Jun 2008) | 3 lines
    
    Don't use the compact boostbook refernce style in the standalone documentation
    as it is too wide for printing out.
  ........
................


[SVN r46031]
2008-06-01 18:00:53 +00:00
Daniel James
c85c8dbeef Some compilers don't like the use of sizeof with a static template member
array, so I'm hardcoding the prime number list length. Pity.


[SVN r45620]
2008-05-21 20:43:40 +00:00
Daniel James
0be8004724 Merge in a few small changes to unordered.
Merged revisions 45277-45280 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r45277 | danieljames | 2008-05-11 14:09:05 +0100 (Sun, 11 May 2008) | 2 lines
  
  Put the prime number list into a template so that they (hopefully) only get included once.
........
  r45278 | danieljames | 2008-05-11 14:12:27 +0100 (Sun, 11 May 2008) | 2 lines
  
  Add a quick explanation for an odd looking constructor.
........
  r45279 | danieljames | 2008-05-11 14:12:37 +0100 (Sun, 11 May 2008) | 2 lines
  
  No need to include the exception objects in helpers/strong.hpp. Now helpers on depend on the forwarding header from the objects.
........
  r45280 | danieljames | 2008-05-11 14:14:31 +0100 (Sun, 11 May 2008) | 1 line
  
  Instead of comparing potentially dangling pointers in move_tests check if any objects have been constructed.
........


[SVN r45574]
2008-05-20 15:24:20 +00:00
Daniel James
18e46ae624 Fix for older versions of the Borland C++ compiler which create the default
'operator=' even when an 'operator=' which takes its argument by value has been
defined. This causes assignments to be ambiguous. To work around this, I'm
removing the definitions on those compilers - breaking move assignment, but
allowing other assignments to work.

I'm using 0x0593 because that's the earliest compiler that I've seen do the
right thing, but it might also work on earlier 5.9.x versions.

Refs #1923.



[SVN r45573]
2008-05-20 15:13:57 +00:00
Daniel James
00737cbc26 Borland doesn't seem to be able to cope with 'has_move_assign'.
[SVN r45409]
2008-05-15 21:10:51 +00:00
Daniel James
980d3f87c5 Remove some code that doesn't even make it past preprocessing, I should have removed it when I wrote separate allocation code for C++0x compilers.
[SVN r45263]
2008-05-10 13:55:59 +00:00
Daniel James
0bf6fcba47 The unordered containers are failing to compile on Borland. This is a short in
the dark at fixing that.


[SVN r45262]
2008-05-10 13:53:35 +00:00
Daniel James
814653754f Old versions on the intel compiler (and I assume other EDG based compilers) don't seem to be able to deal with the SFINAE code used in 'has_move'.
[SVN r45061]
2008-05-03 12:07:15 +00:00
Daniel James
b5db48b6a4 Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.

Merged revisions 44778-44835,44837-44918 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
  
  Remove a trailing comma.
........
  r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
  
  Merge in support for equality operators.
........
  r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
  
  Use my own list container to avoid working around STL container bugs.
........
  r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
  
  Better equality tests.
........
  r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
  
  Remove a superfluous check.
........
  r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
  
  Add equality reference documentation.
........
  r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
  
  New version of list.hpp
........
  r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
  
  Support compilers without ADL in the compile tests.
........
  r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
  
  Change the typedef of buffered functions as it was confusing MSVC 6.5
  
  get_allocator wasn't compiling when the allocator workaround is used because it
  couldn't cast from the wrapped allocator to an allocator of another type. So
  use value_alloc_ when it's available (it's only unavailable on compilers with
  C++0x support, which don't require the workaround).
........


[SVN r44919]
2008-04-30 07:57:04 +00:00
Daniel James
94932ae026 Merge support for emplace for compilers with rvalue references and variadic templates arguments, and better use of C++0x allocators.
Merged revisions 44058-44075,44078-44084,44086-44108,44110-44365,44367,44369-44414,44416-44419,44421-44457,44467-44469,44471-44511,44513-44535,44537-44737 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

................
  r44467 | danieljames | 2008-04-16 18:35:56 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Add C++-0x support to the test allocators.
................
  r44468 | danieljames | 2008-04-16 18:36:06 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Add a C++-0x node_constructor.
................
  r44469 | danieljames | 2008-04-16 18:36:16 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  C++-0x constructor for node.
................
  r44516 | danieljames | 2008-04-17 21:41:48 +0100 (Thu, 17 Apr 2008) | 16 lines
  
  Merge in my work so far on implementing emplace for compilers with variadic
  template & rvalue references.
  
  Merged revisions 44059-44062 via svnmerge from 
  https://svn.boost.org/svn/boost/branches/unordered/dev
  
  ........
    r44059 | danieljames | 2008-04-05 17:41:25 +0100 (Sat, 05 Apr 2008) | 1 line
    
    First stab at implementing emplace - only for compilers with variadic template & rvalue references.
  ........
    r44062 | danieljames | 2008-04-05 19:12:09 +0100 (Sat, 05 Apr 2008) | 1 line
    
    Better variable template arguments, need to add proper support to BoostBook.
  ........
................
  r44616 | danieljames | 2008-04-20 13:30:19 +0100 (Sun, 20 Apr 2008) | 1 line
  
  Merge with trunk, fixes tabs.
................
  r44618 | danieljames | 2008-04-20 13:42:38 +0100 (Sun, 20 Apr 2008) | 2 lines
  
  Some extra compile tests.
................
  r44619 | danieljames | 2008-04-20 13:42:50 +0100 (Sun, 20 Apr 2008) | 2 lines
  
  Fix an error message.
................
  r44703 | danieljames | 2008-04-21 20:19:50 +0100 (Mon, 21 Apr 2008) | 15 lines
  
  Merge latest changes from trunk.
  
  Merged revisions 44616-44702 via svnmerge from 
  https://svn.boost.org/svn/boost/trunk
  
  ........
    r44650 | danieljames | 2008-04-20 22:08:57 +0100 (Sun, 20 Apr 2008) | 1 line
    
    Update an include.
  ........
    r44697 | danieljames | 2008-04-21 16:55:40 +0100 (Mon, 21 Apr 2008) | 1 line
    
    Factor out the code for choosing the bucket count, and which bucket that hash values map to make it easier to experiment with alternative policies.
  ........
................
  r44733 | danieljames | 2008-04-23 07:55:43 +0100 (Wed, 23 Apr 2008) | 2 lines
  
  Remove 'reserve_extra'.
................
  r44734 | danieljames | 2008-04-23 07:55:55 +0100 (Wed, 23 Apr 2008) | 2 lines
  
  More unnecessary copy tests - showing some weakness in the emplace implementation.
................
  r44735 | danieljames | 2008-04-23 07:56:06 +0100 (Wed, 23 Apr 2008) | 2 lines
  
  More tests.
................
  r44736 | danieljames | 2008-04-23 07:56:19 +0100 (Wed, 23 Apr 2008) | 2 lines
  
  Comment out a test which requires a C++0x std::pair.
................
  r44737 | danieljames | 2008-04-23 07:56:35 +0100 (Wed, 23 Apr 2008) | 2 lines
  
  Avoid creating unnecessary copies in unordered_set::emplace and unordered_map::emplace.
................


[SVN r44738]
2008-04-23 07:09:58 +00:00
Daniel James
c56213442d Factor out the code for choosing the bucket count, and which bucket that hash values map to make it easier to experiment with alternative policies.
[SVN r44697]
2008-04-21 15:55:40 +00:00
Daniel James
69943aebf4 Remove some tabs.
[SVN r44615]
2008-04-20 12:11:22 +00:00
Daniel James
1c8ff48a21 Merge in fix for the swap tests, and rename allocator.
Merged revisions 44512-44515,44517-44536 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

................
  r44512 | danieljames | 2008-04-17 20:03:00 +0100 (Thu, 17 Apr 2008) | 11 lines
  
  Rename allocator.hpp.
................
  r44536 | danieljames | 2008-04-18 11:27:50 +0100 (Fri, 18 Apr 2008) | 1 line
  
  Check that hash_table_impl::swap isn't swapping with itself - which is causing the buffered functions to be set with the same value twice, resulting in an assertion.
................


[SVN r44614]
2008-04-20 12:10:56 +00:00
Daniel James
9689f844f4 Fix an error on compilers without SFINAE.
Merged revisions 44470 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r44470 | danieljames | 2008-04-16 18:36:26 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Missing semi-colon.
........


[SVN r44490]
2008-04-17 07:49:45 +00:00
Daniel James
15666285fa Refactor the hash table implementation a little bit. Some of the changes are to
make implementing emplace easier.

Merged revisions 44458-44460,44463-44465 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r44458 | danieljames | 2008-04-16 18:31:35 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Pull out the buffered functions.
........
  r44459 | danieljames | 2008-04-16 18:31:45 +0100 (Wed, 16 Apr 2008) | 4 lines
  
  Inline construct_node and create_node into copy_group - these used to be used
  in the implementation of insert but aren't now because of insert's exception
  requirements, so keeping them around was just confusing.
........
  r44460 | danieljames | 2008-04-16 18:31:54 +0100 (Wed, 16 Apr 2008) | 4 lines
  
  Change link_node so that it takes a node_constructor containing a constructed
  node instead of a node - this makes the code a little cleaner and also
  simplifies exception safety.
........
  r44463 | danieljames | 2008-04-16 18:35:11 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Explicitly name the different insert overloads.
........
  r44464 | danieljames | 2008-04-16 18:35:22 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Explicitly name the different erase overloads.
........
  r44465 | danieljames | 2008-04-16 18:35:33 +0100 (Wed, 16 Apr 2008) | 2 lines
  
  Call the erase methods in hash_table_data directly.
........


[SVN r44489]
2008-04-17 07:45:20 +00:00
Daniel James
cf529e496a Movable unordered containers, full support only for compilers with rvalue references.
Merged revisions 44076-44414 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r44076 | danieljames | 2008-04-06 20:41:19 +0100 (Sun, 06 Apr 2008) | 1 line
  
  Move semantics for compilers with rvalue references.
........
  r44077 | danieljames | 2008-04-06 20:48:59 +0100 (Sun, 06 Apr 2008) | 1 line
  
  Do move assignment 'properly'.
........
  r44085 | danieljames | 2008-04-06 22:46:04 +0100 (Sun, 06 Apr 2008) | 1 line
  
  Use normal references for the move members, reset the source buckets_ pointer to stop the buckets getting deleted, and remove a superflous pointer check.
........
  r44109 | danieljames | 2008-04-07 23:49:36 +0100 (Mon, 07 Apr 2008) | 1 line
  
  Add missing tests.
........
  r44366 | danieljames | 2008-04-13 12:59:46 +0100 (Sun, 13 Apr 2008) | 1 line
  
  Avoid using rvalue references in the implementation files.
........
  r44368 | danieljames | 2008-04-13 15:13:33 +0100 (Sun, 13 Apr 2008) | 6 lines
  
  Use a cut down version of the work in progress move library to implement move
  semantics on more compilers. Unfortunately the move constructor with allocator
  isn't really practical at the moment, since in the case where the container
  can't be moved, and the allocators aren't equal it will copy the container
  twice.
........


[SVN r44486]
2008-04-17 07:34:15 +00:00
Daniel James
5989e9227c Add the new allocator constructors, use composition instead of inheritance for the implementation and some small fixes.
Merged revisions 43922,43962,43966,43971,43981,43995-43996,44042,44046-44048,44057 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r43922 | danieljames | 2008-03-29 14:55:59 +0000 (Sat, 29 Mar 2008) | 1 line
  
  Fix some typos in the reference documentation.
........
  r43962 | danieljames | 2008-03-31 18:29:59 +0100 (Mon, 31 Mar 2008) | 1 line
  
  Add a name variable to the release script, so that I can have different release names in different branches.
........
  r43966 | danieljames | 2008-03-31 18:43:16 +0100 (Mon, 31 Mar 2008) | 1 line
  
  Fix the image directory for standalone docs.
........
  r43971 | danieljames | 2008-03-31 19:17:25 +0100 (Mon, 31 Mar 2008) | 1 line
  
  Fix the unordered stylesheet.
........
  r43981 | danieljames | 2008-04-01 13:31:26 +0100 (Tue, 01 Apr 2008) | 2 lines
  
  Cast the pointer in the Visual C++ 6.5 _Charalloc method.
........
  r43995 | danieljames | 2008-04-02 12:50:27 +0100 (Wed, 02 Apr 2008) | 1 line
  
  Try using the interprocess containers for testing. Compilation is a bit slower but hopefully I'll run into less cross-platform problems.
........
  r43996 | danieljames | 2008-04-02 13:25:49 +0100 (Wed, 02 Apr 2008) | 1 line
  
  Revert my experiment with the interprocess containers. It didn't work out.
........
  r44042 | danieljames | 2008-04-04 20:38:09 +0100 (Fri, 04 Apr 2008) | 1 line
  
  Make hash table data a member of hash table, instead of a base.
........
  r44046 | danieljames | 2008-04-05 12:38:05 +0100 (Sat, 05 Apr 2008) | 1 line
  
  Remove rvalue_ref from Jamfile.v2 - I didn't mean to check it in.
........
  r44047 | danieljames | 2008-04-05 12:39:38 +0100 (Sat, 05 Apr 2008) | 1 line
  
  New constructors with allocators.
........
  r44048 | danieljames | 2008-04-05 12:58:11 +0100 (Sat, 05 Apr 2008) | 1 line
  
  Document the new constructors.
........
  r44057 | danieljames | 2008-04-05 17:08:23 +0100 (Sat, 05 Apr 2008) | 1 line
  
  Fix some bugs in the exception testing code.
........


[SVN r44417]
2008-04-14 15:10:26 +00:00
Daniel James
6aa582a90e Merged revisions 43838-43894 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r43840 | danieljames | 2008-03-24 17:25:07 +0000 (Mon, 24 Mar 2008) | 1 line
  
  Fix a g++ warning.
........
  r43844 | danieljames | 2008-03-24 17:56:28 +0000 (Mon, 24 Mar 2008) | 1 line
  
  It's a new-ish year.
........
  r43885 | danieljames | 2008-03-27 20:36:10 +0000 (Thu, 27 Mar 2008) | 1 line
  
  The release script doesn't need to copy images and css - because that's now done in the jamfiles. Also tweak the shell script a tad bit.
........
  r43890 | danieljames | 2008-03-27 23:01:40 +0000 (Thu, 27 Mar 2008) | 1 line
  
  Starting to add a docbook bibliography.
........
  r43894 | danieljames | 2008-03-27 23:24:18 +0000 (Thu, 27 Mar 2008) | 1 line
  
  Redeclare 'data' in iterator_base to help compilers which have trouble with accessing the nested typedef.
........


[SVN r43895]
2008-03-27 23:38:01 +00:00
Daniel James
b72206e5a0 Merged revisions 42882-42941 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk

................
  r42887 | danieljames | 2008-01-20 21:32:04 +0000 (Sun, 20 Jan 2008) | 10 lines
  
  Merged revisions 42590-42664,42667-42697,42699-42723,42725-42855,42857-42881 via svnmerge from 
  https://svn.boost.org/svn/boost/trunk
  
  ........
    r42881 | danieljames | 2008-01-20 17:37:21 +0000 (Sun, 20 Jan 2008) | 1 line
    
    Include <new> to get std::bad_alloc.
  ........
................
  r42892 | danieljames | 2008-01-21 13:03:16 +0000 (Mon, 21 Jan 2008) | 1 line
  
  On some compilers the Rogue Wave/Apache stdcxx library doesn't have the normal std::distance, but instead has a variant that takes the result as the third parameter so it doesn't have to work out the type from the iterator.
................
  r42893 | danieljames | 2008-01-21 13:07:58 +0000 (Mon, 21 Jan 2008) | 1 line
  
  Fix a typo in the last commit.
................
  r42895 | danieljames | 2008-01-21 13:33:29 +0000 (Mon, 21 Jan 2008) | 1 line
  
  Remove tabs from the last checkin.
................
  r42896 | danieljames | 2008-01-21 15:51:40 +0000 (Mon, 21 Jan 2008) | 1 line
  
  Use Boost config to tell when we have a std::distance function. Also, no need for a macro.
................
  r42908 | danieljames | 2008-01-21 21:37:04 +0000 (Mon, 21 Jan 2008) | 1 line
  
  Use boost::long_long_type and boost::ulong_long_type.
................
  r42921 | danieljames | 2008-01-23 11:43:35 +0000 (Wed, 23 Jan 2008) | 1 line
  
  Remove some tabs.
................
  r42922 | danieljames | 2008-01-23 11:46:28 +0000 (Wed, 23 Jan 2008) | 2 lines
  
  Add missing include. Refs #1596
................
  r42923 | danieljames | 2008-01-23 11:52:47 +0000 (Wed, 23 Jan 2008) | 2 lines
  
  Always use void const* for the second parameter of allocate. Refs #1596.
................
  r42936 | danieljames | 2008-01-23 22:22:16 +0000 (Wed, 23 Jan 2008) | 1 line
  
  Use Boost style library name in the documentation.
................
  r42937 | danieljames | 2008-01-23 22:22:32 +0000 (Wed, 23 Jan 2008) | 1 line
  
  More tabs.
................
  r42941 | danieljames | 2008-01-23 23:35:01 +0000 (Wed, 23 Jan 2008) | 1 line
  
  Fix all the allocators.
................


[SVN r42943]
2008-01-23 23:39:59 +00:00
Daniel James
00c2c3bc4c Merge in latest changes to Boost.Unordered. Some compiler workarounds and
starting to clean up the tests a little.


[SVN r42724]
2008-01-13 16:19:26 +00:00
Daniel James
9d7411840e Merge latest unordered developments:
Make simple_test test a little more.
Use doubles for calculating max load factor.
Some workarounds, mostly for Borland and running the tests.


[SVN r42666]
2008-01-10 22:30:46 +00:00
Daniel James
e847046f95 Merge in latest unordered developments (revisions 42607-42611).
[SVN r42612]
2008-01-08 13:59:01 +00:00
Daniel James
6a87191d7b Add missing 'use namespace std'. Which I should have done when I was told about
them before. Sorry.


[SVN r42575]
2008-01-07 19:44:13 +00:00
Daniel James
fa085c1ee5 Remove some development code.
[SVN r42573]
2008-01-07 19:41:05 +00:00
Daniel James
7fd651ff75 Add library identification.
[SVN r42538]
2008-01-06 17:45:18 +00:00
Daniel James
a5fd3debd6 Follow boost naming conventions.
[SVN r42407]
2008-01-01 21:30:31 +00:00
Daniel James
3c316154a4 I missed an explicit conversion when accessing a bucket.
[SVN r42406]
2008-01-01 21:28:25 +00:00
Daniel James
e91f6d467b Merged revisions 41808-41821,41823-41927,41934-41942,41944-41950,41952-41993,41998-42091,42094-42095,42104-42105,42107,42109,42111-42152,42154,42160-42171,42173-42180,42183-42196,42198-42402 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/dev

........
  r41993 | danieljames | 2007-12-13 00:23:27 +0000 (Thu, 13 Dec 2007) | 3 lines
  
  Add the hash documentation to the unordered library so that it'll be easier to
  link between the libraries.
........
  r42104 | danieljames | 2007-12-16 13:36:50 +0000 (Sun, 16 Dec 2007) | 1 line
  
  Don't include any hash source in tarballs (although I'm including the documentation).
........
  r42198 | danieljames | 2007-12-20 10:49:10 +0000 (Thu, 20 Dec 2007) | 1 line
  
  Restore the extra warnings in the unit tests.
........
  r42199 | danieljames | 2007-12-20 11:25:38 +0000 (Thu, 20 Dec 2007) | 1 line
  
  Make a cast explicit in order to avoid a warning.
........
  r42203 | danieljames | 2007-12-20 15:54:31 +0000 (Thu, 20 Dec 2007) | 1 line
  
  Use 'BOOST_UNORDERED' prefix for macros.
........
  r42209 | danieljames | 2007-12-20 19:41:17 +0000 (Thu, 20 Dec 2007) | 1 line
  
  Initialise this branch (hopefully..)
........
  r42210 | danieljames | 2007-12-20 19:51:21 +0000 (Thu, 20 Dec 2007) | 1 line
  
  Merge in changes.
........
  r42215 | danieljames | 2007-12-20 21:15:42 +0000 (Thu, 20 Dec 2007) | 1 line
  
  Don't add size_type to pointers, cast to difference_type.
........
  r42216 | danieljames | 2007-12-20 21:17:38 +0000 (Thu, 20 Dec 2007) | 1 line
  
  I messed up the last commit, this fixes it.
........
  r42218 | danieljames | 2007-12-20 21:22:20 +0000 (Thu, 20 Dec 2007) | 1 line
  
  Get rid of last_in_group.
........
  r42219 | danieljames | 2007-12-20 21:27:46 +0000 (Thu, 20 Dec 2007) | 1 line
  
  Use node_count to implement group_count.
........
  r42231 | danieljames | 2007-12-21 12:04:52 +0000 (Fri, 21 Dec 2007) | 1 line
  
  Some minor changes for Visual C++.
........
  r42233 | danieljames | 2007-12-21 19:41:27 +0000 (Fri, 21 Dec 2007) | 1 line
  
  Inline some more methods.
........
  r42335 | danieljames | 2007-12-29 13:14:45 +0000 (Sat, 29 Dec 2007) | 3 lines
  
  Some of the changes to the introduction mention in the review. Hopefully this
  will make it a little clearer.
........
  r42336 | danieljames | 2007-12-29 13:16:55 +0000 (Sat, 29 Dec 2007) | 3 lines
  
  Try to make the buckets explanation a little easier to read. Most of the
  changes were based on Jamie Allsop (same for the last commit).
........
  r42339 | danieljames | 2007-12-29 16:00:32 +0000 (Sat, 29 Dec 2007) | 1 line
  
  Specify the namespace for 'std::out_of_range' in the reference documentation.
........
  r42345 | danieljames | 2007-12-29 20:41:10 +0000 (Sat, 29 Dec 2007) | 8 lines
  
  Rewrite much of the 'controlling the number of buckets' section.
  
  I'm trying to make it clearer. It's a bit tricky as the standard doesn't guarantee much.
  Instead of diving straight into the details I have tried to give the reader a rough
  idea of what 'rehash' does and what the load factor is. This is hopefully enough to
  understand the more detailled discussion of how you can control the number of buckets.
  Then finally I discuss iterator invalidation.
........
  r42346 | danieljames | 2007-12-29 20:52:22 +0000 (Sat, 29 Dec 2007) | 1 line
  
  Move the table summarizing methods for controlling bucket size next to the discussion of these methods. The paragraphs about insert and invalidating iterator moves on to something else.
........
  r42348 | danieljames | 2007-12-29 20:55:30 +0000 (Sat, 29 Dec 2007) | 1 line
  
  Fix the badly marked up bullet points.
........
  r42349 | danieljames | 2007-12-29 20:57:53 +0000 (Sat, 29 Dec 2007) | 2 lines
  
  We now have cbegin and cend for local iterators.
........



[SVN r42403]
2008-01-01 20:21:04 +00:00
Daniel James
184a38fee1 Use BOOST_DEDUCED_TYPENAME in unordered_set.hpp and unordered_map.hpp
[SVN r42207]
2007-12-20 19:16:30 +00:00
Daniel James
88bc2e4ab3 Make some of the changes suggested by Steve Watanabe.
Explicitly use unordered_detail namespace to avoid ADL.
Only clear buckets starting with cached_begin_bucket_ in clear.
Use BOOST_DEDUCED_TYPENAME more consistently.


[SVN r42206]
2007-12-20 19:12:55 +00:00
Daniel James
53242796a3 Merge: When allocators aren't equal use a slow swap.
[SVN r42191]
2007-12-19 23:33:30 +00:00
Daniel James
ae23b79065 Merge in some minor changes.
Merged revisions 42157-42182 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/dev

........
  r42157 | danieljames | 2007-12-18 23:26:06 +0000 (Tue, 18 Dec 2007) | 1 line
  
  Tweak the function specifiers a tad bit.
........
  r42158 | danieljames | 2007-12-18 23:30:52 +0000 (Tue, 18 Dec 2007) | 1 line
  
  No need to create a node_constructor for every iteration.
........
  r42159 | danieljames | 2007-12-18 23:50:29 +0000 (Tue, 18 Dec 2007) | 1 line
  
  Pull another node_constructor out of a loop.
........
  r42172 | danieljames | 2007-12-19 17:51:41 +0000 (Wed, 19 Dec 2007) | 1 line
  
  Remove unrequired include.
........
  r42181 | danieljames | 2007-12-19 22:37:34 +0000 (Wed, 19 Dec 2007) | 2 lines
  
  Move the unordered library into 'branches' now that it has been accepted.
........
  r42182 | danieljames | 2007-12-19 22:39:54 +0000 (Wed, 19 Dec 2007) | 4 lines
  
  Actually, there are some things in the unordered code that aren't ready for
  trunk, so I'll rename the branch and create another one to be added to trunk
  later.
........



[SVN r42190]
2007-12-19 23:28:19 +00:00
Daniel James
fdd7d6bbfb Remove 'local_iterator_base'.
Merged revisions 42153-42156 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/dev

........
  r42153 | danieljames | 2007-12-18 22:51:31 +0000 (Tue, 18 Dec 2007) | 2 lines
  
  Remove 'local_iterator_base'. It isn't really needed.
........
  r42155 | danieljames | 2007-12-18 22:58:12 +0000 (Tue, 18 Dec 2007) | 1 line
  
  Add a helper function for creating null pointers.
........
  r42156 | danieljames | 2007-12-18 23:14:49 +0000 (Tue, 18 Dec 2007) | 3 lines
  
  Check that I'm using link_ptr & bucket_ptr correctly (they should be distinct
  types with an explicit conversion from bucket_ptr to link_ptr).
........



[SVN r42189]
2007-12-19 23:23:42 +00:00
Daniel James
a68da27339 Merge: Support for cbegin(n), cend(n).
[SVN r42188]
2007-12-19 23:13:20 +00:00
Daniel James
3b4acc6342 Merged revisions 41822-41992,41994-42101 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/dev

........
  r41822 | danieljames | 2007-12-07 12:51:54 +0000 (Fri, 07 Dec 2007) | 5 lines
  
  Change the macros to meet boost guidelines.
  
  I should really have done this before the review. At least it'll give them
  something to say.
........
  r41928 | danieljames | 2007-12-09 19:23:27 +0000 (Sun, 09 Dec 2007) | 1 line
  
  Add some parameters to standalone documentation build.
........
  r41929 | danieljames | 2007-12-09 19:24:07 +0000 (Sun, 09 Dec 2007) | 1 line
  
  An extra rehash test for inserting a range.
........
  r41930 | danieljames | 2007-12-09 19:24:52 +0000 (Sun, 09 Dec 2007) | 1 line
  
  get_for_erase can be static because all the required information is in the iterator.
........
  r41931 | danieljames | 2007-12-09 19:31:00 +0000 (Sun, 09 Dec 2007) | 1 line
  
  ADL doesn't seem to be working properly on Visual C++ 7.1 when calling swap, so workaround this in the compile tests.
........
  r41932 | danieljames | 2007-12-09 19:44:46 +0000 (Sun, 09 Dec 2007) | 1 line
  
  Try to make the erase exception requirements a little clearer.
........
  r41933 | danieljames | 2007-12-09 19:52:50 +0000 (Sun, 09 Dec 2007) | 1 line
  
  Hopefully clearer comparison of accessors for comparison/hash function objects.
........
  r41943 | danieljames | 2007-12-10 00:03:53 +0000 (Mon, 10 Dec 2007) | 1 line
  
  Fix a typo.
........
  r41951 | danieljames | 2007-12-10 11:08:02 +0000 (Mon, 10 Dec 2007) | 1 line
  
  Use the locale in the case insensitive comparison, I really should add a test for this.
........
  r41994 | danieljames | 2007-12-13 00:26:05 +0000 (Thu, 13 Dec 2007) | 3 lines
  
  Hervé Brönnimann's improved explanation of the formula for avoiding
  invalidating iterators.
........
  r41995 | danieljames | 2007-12-13 00:30:46 +0000 (Thu, 13 Dec 2007) | 4 lines
  
  Explicity use the classic locale in the case insensitive example. I could make
  the locale a member, but that would make the example longer. Also, this would be
  a good place to put a note about the need for constant function objects.
........
  r41996 | danieljames | 2007-12-13 00:31:55 +0000 (Thu, 13 Dec 2007) | 1 line
  
  Pull the point examples out into test files - fixing a few bugs in the process.
........
  r41997 | danieljames | 2007-12-13 00:41:30 +0000 (Thu, 13 Dec 2007) | 3 lines
  
  A few reference links for boost::hash, it might be better to link to the
  first page of the Boost.Hash documentation though.
........
  r42092 | danieljames | 2007-12-16 10:07:27 +0000 (Sun, 16 Dec 2007) | 2 lines
  
  Fix some typos, and use American spelling.
........
  r42093 | danieljames | 2007-12-16 10:11:00 +0000 (Sun, 16 Dec 2007) | 1 line
  
  Small documentation tweak.
........
  r42096 | danieljames | 2007-12-16 10:17:03 +0000 (Sun, 16 Dec 2007) | 1 line
  
  Fix some reference documentation errors.
........
  r42097 | danieljames | 2007-12-16 10:28:08 +0000 (Sun, 16 Dec 2007) | 1 line
  
  Document the explicit constructors.
........
  r42098 | danieljames | 2007-12-16 10:47:13 +0000 (Sun, 16 Dec 2007) | 1 line
  
  Try to make the active issues and proposals a little clearer - including more obvious links to the relevant papers.
........
  r42099 | danieljames | 2007-12-16 10:52:30 +0000 (Sun, 16 Dec 2007) | 1 line
  
  Fix some complexity errors in the comparison table.
........
  r42100 | danieljames | 2007-12-16 10:59:45 +0000 (Sun, 16 Dec 2007) | 1 line
  
  Use Mapped instead of T in the documentation.
........
  r42101 | danieljames | 2007-12-16 11:06:16 +0000 (Sun, 16 Dec 2007) | 1 line
  
  Remove hard-coded length of prime numbers.
........



[SVN r42187]
2007-12-19 23:09:09 +00:00
Daniel James
56f91ea407 Use pre-review copy of unordered for trunk.
[SVN r42183]
2007-12-19 22:42:12 +00:00
Daniel James
a356c67c38 Pull another node_constructor out of a loop.
[SVN r42159]
2007-12-18 23:50:29 +00:00
Daniel James
072a80a3f2 No need to create a node_constructor for every iteration.
[SVN r42158]
2007-12-18 23:30:52 +00:00
Daniel James
9cdf95ec53 Tweak the function specifiers a tad bit.
[SVN r42157]
2007-12-18 23:26:06 +00:00
Daniel James
f1d3797c32 Check that I'm using link_ptr & bucket_ptr correctly (they should be distinct
types with an explicit conversion from bucket_ptr to link_ptr).


[SVN r42156]
2007-12-18 23:14:49 +00:00
Daniel James
f43a74a93f Add a helper function for creating null pointers.
[SVN r42155]
2007-12-18 22:58:12 +00:00
Daniel James
73dea3ed4d Remove 'local_iterator_base'. It isn't really needed.
[SVN r42153]
2007-12-18 22:51:31 +00:00
Daniel James
c30bb968f4 Avoid a strict two-phase instatiation error.
[SVN r42110]
2007-12-16 19:09:39 +00:00
Daniel James
3002a898a0 If the containers have equality comparisons, they'll also need 'hash_value'. Untested and undocumented, as before.
[SVN r42108]
2007-12-16 18:20:25 +00:00
Daniel James
c918da0249 operator== work in progress, undocumented and untested.
[SVN r42106]
2007-12-16 17:48:25 +00:00
Daniel James
1bb2dc4883 Support for cbegin(n), cend(n).
[SVN r42103]
2007-12-16 13:32:04 +00:00
Daniel James
0ce212b5aa When allocators aren't equal, use a slow swap.
[SVN r42102]
2007-12-16 13:17:44 +00:00
Daniel James
b542050fa0 Remove hard-coded length of prime numbers.
[SVN r42101]
2007-12-16 11:06:16 +00:00
Daniel James
0650002b4f get_for_erase can be static because all the required information is in the iterator.
[SVN r41930]
2007-12-09 19:24:52 +00:00
Daniel James
a68ae4fafc Change the macros to meet boost guidelines.
I should really have done this before the review. At least it'll give them
something to say.


[SVN r41822]
2007-12-07 12:51:54 +00:00
Daniel James
2d8a64d88f Clean up the hash table implementation comments a little.
[SVN r41783]
2007-12-06 11:43:14 +00:00
Daniel James
f0c62d3f0f Test, implement and document 'at'.
[SVN r41125]
2007-11-16 00:31:12 +00:00
Daniel James
1b200a6194 Update the unordered containers' documentation and notes for the most recent papers from the C++ working group - will probably have to do this again in a few weeks.
[SVN r39951]
2007-10-11 23:51:29 +00:00
Daniel James
50c629dcb0 Change insert/erase as specified in n2369, the implementation and tests.
I accidently only checked in the documentation from these changes in the
last check in. This contains the rest of it.


[SVN r39950]
2007-10-11 23:49:31 +00:00
Daniel James
58c7bb031c Remove a couple of unused parameter names.
[SVN r39019]
2007-08-27 20:58:21 +00:00
Daniel James
3ebd8bc9f2 Remove an old macro definition that's no longer relevant.
[SVN r38607]
2007-08-12 09:06:26 +00:00
Daniel James
fe9e2728f6 Add missing 'this->' for a couple of template dependant function calls.
[SVN r4256]
2007-05-26 00:00:08 +00:00
Daniel James
ef2f5116dd It is currently proposed that insert, erase and rehash should be stable. Change insert(hint, value) so that it inserts at the end of a group of
equivalent keys (all the other functions were already stable).


[SVN r4146]
2007-05-20 17:37:27 +00:00
Daniel James
df1e1598a5 Import latest changes to the unordered containers. Includes:
Copyright update.
Switch back to the version where the sentinel points to itself.
Remove alternative versions of swap.
Workaround a borland bug or two.
More consistent use of class/swap/template.
Avoid a few warnings.
Add a no-throw swap to the allocator for exception testing.


[SVN r3793]
2007-03-18 20:00:59 +00:00
Daniel James
8d31c94d9a Fixed for intel strict mode.
[SVN r3736]
2007-02-25 21:09:38 +00:00
Daniel James
add94f8385 Remove some superfluous semi-colons from the unordered container
implementation.


[SVN r3619]
2007-01-10 00:04:00 +00:00
Daniel James
9e51e23cea Remove some of the old doxygen stuff from the unordered container header files
as I'm not using doxygen.


[SVN r3618]
2007-01-10 00:03:26 +00:00
Daniel James
70797d159a New version of the hash table implementation. Hopefully a little clearer with
less messing around with allocators and pointers.


[SVN r3491]
2006-12-03 23:11:18 +00:00
Daniel James
905a2dd28a Simplify the hash table implementation somewhat and avoid an unnecessary copy
for maps.


[SVN r3339]
2006-10-31 22:11:25 +00:00
Daniel James
034b97fd23 Refactor and rearrange the unordered containers implementation to try and make
it a little more readable. And deal with all the TODOs.


[SVN r3114]
2006-08-06 20:36:29 +00:00
Daniel James
cb578defef Update copyright.
[SVN r3043]
2006-07-01 22:34:48 +00:00
Daniel James
f9907e4a55 Get unordered working on Visual C++ 6.5
[SVN r2992]
2006-06-18 13:24:38 +00:00
Daniel James
ff91c72eec Improved support for Visual C++.
[SVN r2985]
2006-06-12 23:30:46 +00:00
Daniel James
653a58f39b Improve insert.
[SVN r2979]
2006-06-11 19:34:30 +00:00
Daniel James
822b0c7ffd Remove use of compressed_pair for unordered containers.
Put a lower bound on the maximum load factor.


[SVN r2958]
2006-05-21 17:10:03 +00:00
Daniel James
9bd73e4ba7 New version of the unordered associative containers, with a more efficient data
structure for unordered_multimap/unordered_multiset that uses an extra
pointer per node but makes most operations more efficient when equivalent
nodes are present.

Now uses macros instead of template metaprogramming to implement the
differences between containers with equivalent and unique keys.

Removed the erase_iterator stuff which complicated matters more than it helped.
Now just using pointers with some helper functions.


[SVN r2950]
2006-05-07 13:24:17 +00:00
Daniel James
d3b8b2f38d Fix a bug in allocator_constructor.
[SVN r2949]
2006-05-07 10:06:47 +00:00
Daniel James
13f2fbaf00 Update unordered container links to the new draft standard.
[SVN r2948]
2006-04-30 15:00:11 +00:00
Daniel James
0fcb2d8041 Add cbegin() and cend() from the new draft standard to the unordered containers.
The standard doesn't add them for local iterators, but I'm guessing that's an
oversight. So for now, I've hidden them behind a preprocessor condition. Which
I'll probably remove before review.


[SVN r2944]
2006-04-30 14:11:47 +00:00
Daniel James
ed6df529e4 Remove non-ascii copyright characters and the old filenames from the start of
the unordered container headers.


[SVN r2924]
2006-04-17 11:11:49 +00:00
Daniel James
1cbb7f6e57 Re-introduce the non const overloads of begin and end for unordered_set and
unordered_multiset. I thought the proposed resolution for issue 528 allowed
them to be removed, but re-reading it, it only allows signatures that are
'otherwise indistinguishable', and they are not.


[SVN r2923]
2006-04-17 11:06:08 +00:00
Daniel James
e8faab1268 Update the unordered containers' iterator overloads for the more recent versions of TR1.
[SVN r2921]
2006-04-17 08:45:32 +00:00
Daniel James
f43b6bb5d8 On compilers without ADL, qualify the call to swap.
[SVN r2895]
2006-03-20 20:00:55 +00:00
Daniel James
ee93aad35a New version of the unordered containers. Includes workarounds for older
compilers. Also follows the exception requirements closer.


[SVN r2875]
2006-02-26 18:33:49 +00:00
Daniel James
4c3417468b Fix a constructor for Visual C++ 6.
[SVN r2738]
2005-11-09 21:15:19 +00:00
Daniel James
431c5b76e5 Better results for max_size/max_bucket_count and some fixes for intel in strict
mode.


[SVN r2730]
2005-11-05 16:57:31 +00:00
Daniel James
78e843f3cb Update the links in the unordered headers.
[SVN r2676]
2005-08-04 22:45:46 +00:00
Daniel James
f3b00bc938 Import my latest version of the unordered associative containers.
Several changes:

- Makes insert meet its exception specification (but needs some refactoring).
- Some Borland work arounds, but not all there yet, maybe never will be.
- Some extra doxygen comments, but not nearly enough.
- Possibly other things that I'm too lazy to look up.


[SVN r2642]
2005-06-20 21:55:28 +00:00
Daniel James
f6a60033e3 Check in unordered associative containers. I haven't looked at these for ages
but they pass my unit tests so they should be okay.


[SVN r2585]
2005-04-24 14:23:24 +00:00