Commit Graph

357 Commits

Author SHA1 Message Date
Daniel James f8a6ea40a1 Add noexcept annotations to iterators.
I couldn't find any sepecification in the standard, but I'd assume that since
`begin` and `end` are both `noexcept`, the iterator copy constructors must be.

To justify adding `noexcept` to these members, see 17.6.3.5 (part of the
allocator requirements) of n3485, which says about allocator's pointer types,
"No constructor, comparison operator, copy operation, move operation, or swap
operation on these types shall exit via an exception."

Not relevant in this case but allocator pointers also need to model
NullablePointer. From 17.6.3.3, "No operation which is part of the
NullablePointer requirements shall exit via an exception."

[SVN r84374]
2013-05-19 15:00:40 +00:00
Daniel James 1a067034c1 Add conditional noexcept for move constructors.
Also added `noexcept` for destructors because of a gcc bug, see:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56191

Found via:

http://stackoverflow.com/questions/15721544/destructors-and-noexcept

[SVN r84373]
2013-05-19 14:30:12 +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 44f61e5878 Add BOOST_NOEXCEPT to unordered container methods.
I haven't done the iterators yet.

[SVN r84253]
2013-05-12 14:34:45 +00:00
Daniel James 6b21eeccab Unordered: Fix move assignment with unequal allocators.
[SVN r82614]
2013-01-25 21:22:03 +00:00
Marshall Clow 85d2657ac1 Remove usage of deprecated macros
[SVN r81449]
2012-11-21 01:21:54 +00:00
Daniel James 8fb85cbb8d Unordered: Fix overload edge case for piecewise construction.
[SVN r81393]
2012-11-17 12:03:55 +00:00
Daniel James da455124d2 Unordered: Try to make the piecewise_construct emulation a little more readable.
[SVN r81392]
2012-11-17 12:03:32 +00:00
Daniel James ef4d33ce89 Unordered: Remove the deprecated equality implementation.
[SVN r81385]
2012-11-17 10:30:19 +00:00
Daniel James 7eefe62efe Unordered: Remove deprecated variadic pair constructors.
This was emulating them as specified in older standard drafts.

[SVN r81384]
2012-11-17 10:28:35 +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 d1a6e948e3 Unordered: bcp friendly macros.
[SVN r81029]
2012-10-21 00:17:40 +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 ec6219fe13 Unordered: Fix incorrect assertion.
[SVN r80508]
2012-09-12 21:09:39 +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 1d03bbe213 Unordered: Re-initialise reused nodes.
[SVN r80410]
2012-09-05 19:01:17 +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 9ea735c975 Unordered: Move iterators to top of buckets.hpp
[SVN r80382]
2012-09-03 20:03:15 +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 8f86c2464e Unordered: Rename *_impl to *_value_impl.
To make it clear that they should only be used to construct and destroy
the value, and not nodes or buckets.

[SVN r80223]
2012-08-25 21:53:53 +00:00
Daniel James cd57bf5000 Unordered: And use allocator traits to destroy values.
[SVN r80222]
2012-08-25 21:53:25 +00:00
Daniel James a7125259d8 Unordered: When full construct is available, use it for value.
[SVN r80221]
2012-08-25 21:52:57 +00:00
Daniel James 3a163b5449 Unordered: Move some things around.
- Move `allocator_traits` before `construct_impl` so the
  `construct_impl` can be changed to use `allocator_traits`.
- Moved some move utilities out of `allocate.hpp` because they're
  really nothing to do with allocation and construction.

[SVN r80220]
2012-08-25 21:52:28 +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 27f5496a65 Unordered: Fix some uses of rvalues refs/move.
[SVN r79792]
2012-07-29 07:17:57 +00:00
Daniel James 918b3da91d Unordered: Use a SFINAE parameter rather than return type for C++03 compilers.
Seems that g++ 3.4 has problems with overloads that are only distinguished by
SFINAE return types.

[SVN r79762]
2012-07-26 22:23:09 +00:00
Daniel James 61516be1db Unordered: Remove use of try..catch.
So that it'll work when exceptions are disabled.

[SVN r79679]
2012-07-22 20:14:20 +00:00
Marshall Clow 0fccd93e29 Switch from deprecated macros to new shiny ones; no functionality change
[SVN r79396]
2012-07-09 22:08:01 +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 b8d96be8f7 Unordered: Macro to simplifiy variadic/emplace_args creation.
[SVN r79351]
2012-07-08 11:53:16 +00:00