Commit Graph

1248 Commits

Author SHA1 Message Date
Daniel James
68f5afc9be Include <new> to get std::bad_alloc.
[SVN r42881]
2008-01-20 17:37:21 +00:00
Daniel James
01df4d9dc2 Merge in some changes to the unordered tests.
[SVN r42856]
2008-01-18 19:35:55 +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
be93c29493 Merge the latest unordered changes. These are concerned with getting the tests
working on more compilers. The biggest change is that the exception tests have
been changed to use a very simple exception testing mechanism on top of
lightweight_test. This was because Boost.Test exception testing isn't working
on several platforms. I'm trying to set this up so that I can use Boost.Test on
compilers which it completely supports, and lightweight test on others.
Boost.Test tests more than my simple exception testing code ever will so it's
worth using where I can.


[SVN r42698]
2008-01-12 14:43:40 +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
488bce194c Merge: Another missing 'using namespace std'
[SVN r42619]
2008-01-08 18:15:01 +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
dfac5aab41 Merge in spell check.
[SVN r42591]
2008-01-07 21:47:24 +00:00
Daniel James
848b253877 Fix an off by one error.
[SVN r42588]
2008-01-07 21:07:43 +00:00
Daniel James
7d128006e1 Fix a bug which was causing the memory area stuff to fail.
I should probably try to be less clever and use memory area's lower
bounds as the key, and do the extra work required to get that working.


[SVN r42587]
2008-01-07 21:05:42 +00:00
Daniel James
86e01c9c4c Avoid some uses of an invalid pointer.
[SVN r42580]
2008-01-07 20:06:15 +00:00
Daniel James
6cec477db3 Reneame the set and map compile tests so they'll be adjacent in the test results.
[SVN r42578]
2008-01-07 19:51:02 +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
474b70528b Rename the exception tests so that they don't clash with the normal tests.
[SVN r42572]
2008-01-07 19:40:32 +00:00
Daniel James
7fd651ff75 Add library identification.
[SVN r42538]
2008-01-06 17:45:18 +00:00
Daniel James
6979b056d8 Add forwarding html files for Boost.Unordered.
[SVN r42535]
2008-01-06 17:23:16 +00:00
Daniel James
3c94adb933 Rename the test-suites to match other libraries' style.
[SVN r42534]
2008-01-06 17:16:51 +00:00
Daniel James
5e3393790d Add the contents of compile_tests.cpp to set_compile.cpp and map_compile.cpp
[SVN r42533]
2008-01-06 17:13:15 +00:00
Daniel James
cc1248f2ab Give the unordered exception test suite its own name.
[SVN r42532]
2008-01-06 16:59:49 +00:00
Daniel James
5d83bad7a3 Combine the 'container' and 'unordered' tests.
[SVN r42531]
2008-01-06 16:59:18 +00:00
Daniel James
44c402137f Add Boost.Unordered and add to the documentation. Not fully integrated yet.
[SVN r42528]
2008-01-06 16:47:16 +00:00
Daniel James
8078c93907 Some small tweaks to the hash function documentation.
[SVN r42519]
2008-01-06 12:38:22 +00:00
Daniel James
9a7fbcf0ed Add a little bit of text about hash and equality functions to the intro, and add links to Boost.Hash.
[SVN r42518]
2008-01-06 12:31:13 +00:00
Daniel James
c31be49d83 Make it clear that pointers and references to elements are never invalidated.
[SVN r42517]
2008-01-06 11:38:54 +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
3f2f75faf6 Move the unordered library into 'branches' now that it has been accepted.
[SVN r42181]
2007-12-19 22:37:34 +00:00
Daniel James
793a308389 Remove unrequired include.
[SVN r42172]
2007-12-19 17:51:41 +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
18d3eb6926 Don't include any hash source in tarballs (although I'm including the documentation).
[SVN r42104]
2007-12-16 13:36:50 +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