Daniel James
e10fc0f93b
Fix typo
2018-02-25 14:03:11 +00:00
Daniel James
09be9bae04
Use boost::is_nothrow_swappable, now that it's available everywhere
2018-01-27 09:38:19 +00:00
Daniel James
c01a8c4629
Oops, it's boost::to_address, no boost::to_pointer
2018-01-26 20:25:09 +00:00
Daniel James
ddf302fcc2
Use boost::to_pointer
instead of pointer<..>::get
...
To get C++20 style recursive calls to `operator->`.
2018-01-26 18:59:16 +00:00
Daniel James
66533ace80
Add element_type
to nodes, so that pointer_traits will work
...
Might be better to change the template signature of iterators, but that would
be a disruptive change to make at the moment.
2018-01-26 17:43:06 +00:00
Daniel James
ea599a66b7
Disable 'conditional expression is constant' on older Visual C++
2018-01-23 15:40:58 +00:00
Daniel James
f3476de893
Some explicit casts to avoid warnings on old GCC
2018-01-10 11:35:42 +00:00
Daniel James
dea525b2b7
Suppress msvc waring "conditional expression is constant"
2018-01-10 11:35:22 +00:00
Daniel James
d55c9565ab
No template arguments in BOOST_MOVABLE_BUT_NOT_COPYABLE
...
Was causing errors on Visual C++ 7.1.
2018-01-10 09:58:08 +00:00
Daniel James
00a4185cf1
Reformat
2018-01-08 10:58:09 +00:00
Daniel James
ea28a3f98e
Fix conversion to bool warning
2018-01-08 10:57:28 +00:00
Daniel James
34e54b35e8
Manually handle assigning hash/equality functions
2018-01-06 12:53:37 +00:00
Daniel James
f12009fc61
operator= noexcept support
2018-01-05 17:54:44 +00:00
Daniel James
5854090dc7
Swap noexcept support
...
Not properly supported as we don't have is_nothrow_swappable yet.
2018-01-05 17:48:13 +00:00
Daniel James
7e28fdd45a
Make the current function_pair public
2018-01-05 17:10:13 +00:00
Daniel James
7615fabc80
Rewrite node handles using a lightweight limited optional
...
Will try to use std::optional when available. Also using
allocator_traits::is_always_equal support.
2018-01-03 23:15:55 +00:00
Daniel James
be0acc575f
Implement allocator_traits::is_always_equal
2018-01-03 20:55:40 +00:00
Daniel James
9d558b010d
Reformat
2017-12-28 11:44:57 +00:00
Daniela Engert
64441d2b64
Inheriting std::iterator is deprecated in c++17.
...
Therefore get rid of all of that and replace inheritance by lifting std::iterator's members into the derived class.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-12-28 12:01:41 +01:00
Daniel James
92ce66be64
Rename 'bucket' variable to avoid shadow warning
2017-12-22 16:54:05 +00:00
Daniel James
15befe998e
Rename table::get_bucket to get_bucket_pointer
...
All the other '*_bucket' methods return a bucket index.
2017-12-22 16:44:43 +00:00
Daniel James
b50e0d610f
Initial implementation of template deduction guides
2017-12-19 12:56:51 +00:00
Daniel James
f99dee1917
Use predef for detecting piecewise construction
...
And detect it for recent dinkumware.
2017-12-19 12:11:36 +00:00
Daniel James
311e126ac4
Remove dependency on iterator
2017-12-03 18:58:52 +00:00
Daniel James
c037169e1a
Update paths for headers moved from detail
2017-12-03 14:24:47 +00:00
Daniel James
978944fab2
Use same code for move constructing all containers
...
Copies the data layout from the source, so it doesn't need to hash anything.
2017-10-05 10:56:02 +01:00
Daniel James
705e69aefd
Always call set_first_in_group
...
Probably don't need to, as we're using 0 for the first element in a group, but
it's quick so might as well.
2017-10-05 10:54:23 +01:00
Daniel James
e58081f6dc
Drop some TODOs that are okay
2017-10-05 10:54:22 +01:00
Daniel James
4ac8a45a34
The max_load issue was fixed in the standard ages ago
2017-10-05 10:54:22 +01:00
Daniel James
6b5b968b97
Format with clang-format 4.0
2017-10-05 10:54:22 +01:00
Daniel James
f72b0353d4
Shuffle code around for readability
...
The new indentation made some of the code difficult to read, especially
where macros were concerned, so move things around and add more explicit
namespace declarations.
2017-06-11 20:55:59 +01:00
Daniel James
0676b4f4ca
Change clang format indentation + .editorconfig file
2017-06-11 20:55:59 +01:00
Daniel James
5190a5d7f8
Stop dereferencing pointers to uninitialized memory
...
It's undefined behaviour. Still happens for piecewise construction
emultation for std::pair, I don't think there's anyway to avoid it.
I had considered using offsetof to get a pointer to a member, but that's
also undefined behaviour when a pair member doesn't have standard
layout. Piecewise construction emulation has other problems anyway.
So, this mostly fixes PR #5 .
I also stopped using addressof in self-asssignment checks as operator&
is fine.
2017-06-04 08:47:02 +01:00
Daniel James
7775aa83df
Decrease the limit for SunOS workaround
...
We have tests for 12.5 (5,20,0), and 12.5_next (5,21,0), I think both
are good enough to not require workarounds.
2017-05-25 08:53:34 +01:00
Daniel James
fc1604f2c8
Don't use allocator_traits::construct on GCC 4.6
...
Piecewise construction doesn't work uncopyable types.
2017-05-19 17:24:44 +01:00
Daniel James
5b97fbc292
Make insert from node_handle move only on old GCC
2017-05-19 09:42:56 +01:00
Daniel James
4f5a2dabe9
Try to fix std::tuple on old Sun compilers
...
In order to use the workaround for both `boost::tuple` and `std::tuple`
the function would need to detect which was being used, in order to
decide whether to use `boost::tuples::length` or `std::tuple_size`.
Probably not difficult, but I don't have any way to test an
implementation.
So instead Just assume that if `std::tuple` is available it will work
without any workaround. Presumably once the compiler was able to support
`std::tuple` it will also support the necessary overloads.
I've left the version check as 5.21 so that failures will still show up
in the tests, but I'm sure it can be 5.20 and probably earlier. Will
change before release.
2017-05-19 09:03:08 +01:00
Daniel James
e0227618bb
Move a few things around to match the order in the standard
2017-05-17 16:47:57 +01:00
Daniel James
ee9a5a2c77
Add a configuration macro for Sun C++ workarounds
2017-05-16 19:01:50 +01:00
Daniel James
6fffc738f7
Require std::tuple for full C++11 construction
2017-05-16 18:15:56 +01:00
Daniel James
12ee29579d
Don't use full construction on Sun C++ w. libstdc++
...
There's an exception safety issue. Which is a pity as other than that it
seems fine. I'd assumed that support would be pretty good on all C++11
compilers, so I made it an 'all or nothing' feature, partly because
there are issues with pre-C++11 allocators, but this suggests partial
support might be desirable. Not sure I'll be able to (or want to) put
the time in though.
2017-05-12 21:58:52 +01:00
Daniel James
b6c6bfbe7f
Statically handle 'is_unique' in assignments
2017-05-06 04:58:57 +01:00
Daniel James
6e074d7165
Get rid of delete_nodes
2017-05-06 04:58:57 +01:00
Daniel James
6ef17a0f0e
Remember to disable exceptions before checking final value
2017-05-05 00:46:07 +01:00
Daniel James
47a8c3fc67
Fix exception handling in rehash_impl
...
And improve tests so they will catch the error, and other similar errors.
2017-05-04 19:30:18 +01:00
Daniel James
d49d0e90a8
Delete nodes directly instead of through previous node
2017-05-04 00:14:08 +01:00
Daniel James
77bd45b1fa
Make second parameter of delete_nodes a node_pointer
2017-05-04 00:14:05 +01:00
Daniel James
622dff50df
Fix some code that could be using next_node
2017-05-03 23:36:09 +01:00
Daniel James
41f6a051ef
Some more configuration comments
2017-05-03 04:21:53 +01:00
Daniel James
d05619095c
Workaround problems with forward_as_tuple in older versions of clang
2017-05-03 04:21:52 +01:00