Daniel James
0d1cfba823
Rename functions in allocate.hpp
2016-10-22 10:28:53 +01:00
Daniel James
9b7b485c33
Use node_pointer in equality.
2016-10-22 10:04:36 +01:00
Daniel James
c680fa7418
Remove find_matching_node.
...
FWIW the standard says that equality is undefined behaviour if the Hash
and Pred function objects behave differently. But I think we should
support different hash functions, e.g. so that randomized hash functions
will work.
2016-10-22 10:04:36 +01:00
Daniel James
9772c01161
Replace several uses of iterators with node pointers.
...
Which is to some extent going in circles, as this is how the containers
were originally implemented. But I think this is cleaner. It also fixes
a minor problem where the internal and external iterator types are
different for some containers, as the external iterators are all const.
2016-10-22 10:04:36 +01:00
Daniel James
dad0d48c9c
Support containers with const value type
...
Currently just storing the value without a const. Can do better with
C++11 constructors, so maybe should do that, and cast away const on
compilers without support.
Another problem is that std::allocator<const int> doesn't compile for
libstdc++ (and potentially other standard libraries), so
boost::unordered_set<const int> can't compile. I'm not sure if I should
work around that, as it means changing the type of the container
(i.e. to boost::unordered_set<const int,... , std::allocator<int>>).
2016-10-17 08:06:19 +01:00
Daniel James
71d19820ac
Fix signed conversion warnings.
2016-10-05 09:45:53 +01:00
Daniel James
cae72eec2f
Insert/emplace with hint.
2016-08-17 12:08:15 +01:00
Daniel James
e58370b4ff
Move emplace before emplace_impl in equivalent.hpp
2016-08-17 12:08:15 +01:00
Daniel James
09717ffca4
Remove a few unnecessary internal includes.
2016-08-14 20:55:40 +01:00
Daniel James
ce4b840299
Map/set details types in individual headers.
2016-08-14 20:55:40 +01:00
Daniel James
6029d1cfd0
Trim down node_tmp code.
2016-08-14 20:55:40 +01:00
Daniel James
3fe46a1769
Cleaner emplace_impl in equivalent.
2016-08-14 20:55:40 +01:00
Daniel James
5490bcfe95
Remove node_tmp overload of add_node.
2016-08-14 20:55:40 +01:00
Daniel James
88612a8be4
Less faffing around with node_constructor.
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
7b8e3d01de
Use argument SFINAE instead of return SFINAE
2016-06-03 00:00:51 +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
144a0c1791
Remove BOOST_NO_STD_DISTANCE workaround.
2016-05-26 09:24:25 +01:00
Daniel James
86d4d21250
Make value_base a member of pointer nodes.
2014-07-11 08:40:07 +01:00
Daniel James
99fdce0b4d
Fix policy typedefs.
2014-02-24 16:54:12 +00:00
Daniel James
57819d1dd9
Always use prime policy for integers. Fixes trac #9282 .
2014-02-23 10:16:14 +00: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
Stephen Kelly
3aa91346ea
Remove obsolete MSVC check from pragma guard
...
git grep -h -B1 "^#\s*pragma once" | grep -v pragma | sort | uniq
is now clean.
[SVN r85952]
2013-09-26 13:02:51 +00:00
Marshall Clow
85d2657ac1
Remove usage of deprecated macros
...
[SVN r81449]
2012-11-21 01:21:54 +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
53f278312f
Unordered: Get rid of get_start.
...
[SVN r80561]
2012-09-17 18:59:03 +00:00
Daniel James
ec6219fe13
Unordered: Fix incorrect assertion.
...
[SVN r80508]
2012-09-12 21:09: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
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
31f3a10d33
Unordered: Tweak node_construct functions.
...
[SVN r80381]
2012-09-03 20:02:53 +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
ff31c73970
Unordered: Go back to the old method for constructing nodes.
...
Reverts much of [78349]. Keeps the variadic construct.
[SVN r80219]
2012-08-25 21:51:24 +00:00
Daniel James
6932a2d571
Unordered: Fix using a C++03 allocator with C++11 compiler.
...
Because the nodes had an implicit constructor, the `has_construct` traits was
detecting that the nodes could be constructed by construction then copy, which
really wasn't wanted. Also add a check that nodes aren't been copy constructed
to make sure this doesn't happen again. Refs #7100 .
[SVN r79358]
2012-07-08 11:55:57 +00:00
Daniel James
39bafd7b10
Unordered: Reapply changes reverted in r78788.
...
[SVN r79163]
2012-06-28 20:58:56 +00:00
Daniel James
7158700502
Unordered: Revert unmerged changes in trunk.
...
So that I can fix issues in the beta.
[SVN r78788]
2012-06-01 11:03:22 +00:00
Daniel James
1eac47a275
Unordered: Use Boost.Move in a few more places.
...
Should be better for compilers with variadic parameters, but no rvalue
references. If such a thing ever exists.
[SVN r78536]
2012-05-21 22:15:33 +00:00
Daniel James
275b03e76b
Unordered: Avoid -Wshadow warnings. Refs #6190 .
...
[SVN r78364]
2012-05-07 10:57:35 +00:00
Daniel James
995ef1efdb
Unordered: Use std::allocator_trait's variadic construct.
...
[SVN r78349]
2012-05-06 12:29:24 +00:00
Daniel James
626bb48013
Unordered: Use iterators in more of the implementation methods.
...
[SVN r77834]
2012-04-08 15:30:14 +00:00
Daniel James
e64f82ed03
Unordered: Fix equality for multimap/multiset.
...
[SVN r77833]
2012-04-08 15:29:49 +00:00