Commit Graph
95 Commits
Author SHA1 Message Date
Daniel James e92f7d86c1 Remove array_constructor.
I was using SFINAE for everything because some old compilers had issues.
But that's hopefully in the distant past now.
2016-08-14 20:55:40 +01:00
Daniel James ad353c8e3d Move some of the includes up into allocate.hpp 2016-08-14 20:55:40 +01:00
Daniel James 09717ffca4 Remove a few unnecessary internal includes. 2016-08-14 20:55:40 +01:00
Daniel James 8017d9e684 Change how node construction works.
Split node_constructor into two classes, one for constructing a node
without a value, and then another for holding it once the value is
constructed.

Do the work of constructing values in convenience functions in
allocate.hpp (construct_value_generic, construct_value, construct_pair).
2016-08-14 20:55:40 +01:00
Daniel James 609ae6cb4e Expand out fill_buckets. 2016-08-14 20:55:40 +01:00
Daniel James b4a3c6f460 Fix exception safety in assignment for multimap/multiset.
The assignment code seemed like a bit of a premature optimization, I
replaced it with a slightly slower but much simpler implementation.
2016-05-30 15:02:04 +01:00
Daniel James 3f42a56bae Remove old deprecated warning. 2016-05-26 09:25:10 +01:00
Zoey Greer 3a507b4e39 Bounds-check after arithmetic is complete
double_to_size can return std::numeric_limits<size_t>max(), so we cannot add 1 to the return value of double_to_size. That addition should be done while still working with a double, as can be seen being done on line 850 of this file.
This was uncovered by Coverity, and addresses Coverity issues CID13443 and CID12664
2014-12-08 16:38:38 -05:00
Daniel James 8ccde2e5a1 Move the allocators after copying the hash functions.
Just in case the hash functions throw.
2014-11-09 23:44:16 +00:00
Daniel James 31211a607f Remove assertion that used moved allocator. Fixes #10777. 2014-11-09 23:35:35 +00:00
Daniel James b4795f414d Remove unneeded ConstNodePointer template parameters. 2014-11-08 22:22:11 +00:00
Zoey Greer 8c5aa5086d Initialize data_ in value_base default constructor
This means data_ should get initialized in the default constructor for boost::unordered::detail::unique_node (and any other inheritors), as this constructor will be called there.

This uninitialized data member was reported by Coverity (CID 49445), which unfortunately does not seem to have any convenient way to publicly, globally address issues.
2014-10-22 21:27:27 +01:00
Daniel James b1232d8061 Revert some changes so that I can merge to master.
Revert "Rename iterator typedef to n_iterator." and "Combine some of the
headers."

This reverts commits: 2f6b81d8c1 and
e1b39bbbfb.
2014-10-22 21:24:36 +01:00
Daniel James 2f6b81d8c1 Rename iterator typedef to n_iterator. 2014-08-19 16:41:10 +01:00
Daniel James e1b39bbbfb Combine some of the headers. 2014-08-19 16:41:10 +01:00
Daniel James 2f5d98a0cd Don't use allocator to construct/destroy anything other than elements.
As specified in 23.2.1.3.
2014-07-12 19:12:46 +01:00
Daniel James 94071cc6e8 Clean up warnings. Fixes trac #9377. 2014-01-26 22:57:24 +00:00
Daniel James ddab816ed7 Use BOOST_HAS_PRAGMA_ONCE.
Remembering to first include config, so that it'll actually be defined.

[SVN r86726]
2013-11-16 20:13:24 +00:00
Daniel James 3508ceaa58 Avoid exposing functions via ADL.
I'd put the iterators in their own namespace so that they wouldn't pick
up functions in detail via ADL, but I forgot that their template
parameters would cause that to happen anyway. The simplest way to fix
that for now is just to stuff the problematic functions into a
sub-namespace, so that they're no longer exposed.

[SVN r85280]
2013-08-10 13:09:08 +00:00
Daniel James 52b42b4e48 Fix unused variable warning. Refs #8851.
Bit annoying that `boost::ignore_unused_variable_warning` is in
`<boost/concept_check.hpp>`.

[SVN r85244]
2013-08-08 20:27:40 +00:00
Daniel James d603e75d03 Use nothrow move construction for function objects, when available.
[SVN r84277]
2013-05-13 23:13:04 +00:00
Daniel James a422b40041 Use nothrow move assignment for function objects, when available.
Originally I was going to use two different versions of `hash_functions`, but
the recent discussion on binary compatibility persuaded me not to.

[SVN r84276]
2013-05-13 23:12:46 +00:00
Daniel James ef4d33ce89 Unordered: Remove the deprecated equality implementation.
[SVN r81385]
2012-11-17 10:30:19 +00:00
Daniel James 73c0d85ae6 Unorderd: Stop deriving from hash policy.
[SVN r81209]
2012-11-05 18:33:29 +00:00
Daniel James d495cbd7e6 Unordered: Clean up the pointer silliness.
[SVN r81208]
2012-11-05 18:33:15 +00:00
Daniel James ccc3d1c83d Unordered: Simpler erase implementation.
[SVN r81207]
2012-11-05 18:32:59 +00:00
Daniel James 38d8d052d1 Unordered: Simplify pointer use.
[SVN r81206]
2012-11-05 18:32:45 +00:00
Daniel James 8f8ea09ce8 Unordered: Fix bug when erasing a range, refs #7471.
[SVN r80894]
2012-10-07 08:19:01 +00:00
Daniel James 94ef1ac391 Unordered: Support empty containers in node_holder.
[SVN r80562]
2012-09-17 18:59:29 +00:00
Daniel James 53f278312f Unordered: Get rid of get_start.
[SVN r80561]
2012-09-17 18:59:03 +00:00
Daniel James 549b93e629 Unordered: delete_buckets works when buckets_ is null.
[SVN r80560]
2012-09-17 18:58:28 +00:00
Daniel James c2e7221bf9 Unordered: Set max_load_ to 0 when there are no buckets.
[SVN r80559]
2012-09-17 18:57:58 +00:00
Daniel James 37d58e84e3 Unordered: Fix creating extra node when resizing.
[SVN r80518]
2012-09-13 19:50:31 +00:00
Daniel James ed369d6374 Unordered: Move MSVC warning suppression to correct location.
[SVN r80412]
2012-09-05 19:02:29 +00:00
Daniel James 32ab636fe8 Unordered: delete/destroy/clear cleanup.
[SVN r80390]
2012-09-03 20:06:00 +00:00
Daniel James 8e5ffbbe6c Unordered: Clean up swap.
[SVN r80389]
2012-09-03 20:05:39 +00:00
Daniel James e7f495c094 Unordered: Cleaning up a bit.
[SVN r80388]
2012-09-03 20:05:15 +00:00
Daniel James 1e07edc1ad Unordered: No need for value_allocator.
[SVN r80387]
2012-09-03 20:04:55 +00:00
Daniel James 2f09079d3f Unordered: Remove the now unnecessary uses of ->.
[SVN r80386]
2012-09-03 20:04:35 +00:00
Daniel James a1bdd82bd5 Unordered: Get rid of buckets.
[SVN r80385]
2012-09-03 20:04:15 +00:00
Daniel James 45b6340a98 Unordered: Avoid allocating nodes in table constructor.
[SVN r80384]
2012-09-03 20:03:55 +00:00
Daniel James 22e6daac6c Unordered: Use node_holder for move.
[SVN r80383]
2012-09-03 20:03:35 +00:00
Daniel James 31f3a10d33 Unordered: Tweak node_construct functions.
[SVN r80381]
2012-09-03 20:02:53 +00:00
Daniel James d9f49f2b44 Unordered: Faster assign implementation
[SVN r80380]
2012-09-03 20:02:31 +00:00
Daniel James 73c269398a Unordered: Generic copy/move implementation.
[SVN r80379]
2012-09-03 20:02:10 +00:00
Daniel James 7a4930f1a1 Unordered: Avoid unnecessary swapping in rehash and move.
[SVN r80378]
2012-09-03 20:01:50 +00:00
Daniel James f8968ab022 Unordered: Better swap assertion.
[SVN r80224]
2012-08-25 21:54:18 +00:00
Daniel James 32dc45b7bd Unordered: Implement reserve. Refs #6857.
[SVN r78365]
2012-05-07 10:58:32 +00:00
Daniel James 275b03e76b Unordered: Avoid -Wshadow warnings. Refs #6190.
[SVN r78364]
2012-05-07 10:57:35 +00:00
Daniel James 626bb48013 Unordered: Use iterators in more of the implementation methods.
[SVN r77834]
2012-04-08 15:30:14 +00:00