Commit Graph
1043 Commits
Author SHA1 Message Date
Daniel James a119caaa1b Stop travis build after first failure 2017-04-20 23:39:44 +01:00
Daniel James 96f8f85eef Use environment variable to set user-config.jam 2017-04-20 23:39:44 +01:00
Daniel James 2add451d63 Use boost 1.64.0 on travis 2017-04-20 23:11:28 +01:00
Daniel James 3effedb728 Merge branch 'feature/standards-checking-and-cleanup' into develop
Rearrange the definitions to be a closer match to the standard, this
should make it easier to check how standards compliant it is. Also, some
minor code clean-ups that I noticed while doing this.
2017-04-20 23:01:09 +01:00
Daniel James b067e65731 Clean table forward declarations 2017-04-20 22:59:00 +01:00
Daniel James f3b179d451 Remove pointless duplication of move constructor 2017-04-20 22:59:00 +01:00
Daniel James de5373413b Missing rvalue overload of at 2017-04-20 22:59:00 +01:00
Daniel James fedf533699 Move index functions into place 2017-04-20 22:59:00 +01:00
Daniel James 9cd673c71d Specify clear as noexcept 2017-04-20 22:59:00 +01:00
Daniel James 85a834cf62 Comment on changes needed for C++17 support 2017-04-20 22:59:00 +01:00
Daniel James 5167c970af Swap order of swap/clear to match standard 2017-04-20 22:59:00 +01:00
Daniel James bf7a65010c Add new erase(iterator) overloads
Not for unordered_set/unordered_multiset as they use the same type for
iterator and const_iterator.
2017-04-20 22:59:00 +01:00
Daniel James 461ac96a2c Reorder insert_or_assign to match standard 2017-04-20 22:59:00 +01:00
Daniel James 5eb10fd0b2 Move extract into place 2017-04-20 22:59:00 +01:00
Daniel James e2e9959389 Split up emplace and emplace_hint code
Busywork I guess, but I think it's more readable this way. The emplace
macros are still unreadable, but I think they're rarely used.

Btw. a bit weird that clang format has removed the indentation on the
'// emplace' comment, not sure why that is.
2017-04-20 22:59:00 +01:00
Daniel James d8969c71fc Move 'try_emplace' into same order as draft standard 2017-04-20 22:59:00 +01:00
Daniel James ab76814aa6 Move 'insert_or_assign' into same order as draft standard 2017-04-20 22:59:00 +01:00
Daniel James 1a18cd2196 Move capacity functions to match order in standard 2017-04-20 22:59:00 +01:00
Daniel James e4a00980f8 Commented out noexcept for move assignment 2017-04-20 22:59:00 +01:00
Daniel James af94e6a40e Reorder the constructors to match the draft standard
In order to make it easier to check against the standard.  This includes
collapsing some of the input iterator overloads into one constructor.
2017-04-20 22:59:00 +01:00
Daniel James ee73a53497 Disable failing tests on gcc 4.6/4.7 c++11 mode
Works fine on later versions of GCC, I suspect it's a bug in their
noexcept support.
2017-04-20 10:11:01 +01:00
Daniel James 6bdf1ba244 Fix a comment 2017-04-19 10:21:13 +01:00
Daniel James d47754acac Include unordered macro values in test output 2017-04-19 10:21:13 +01:00
Daniel James cee94e9fcb Fix unused parameter warning 2017-04-19 09:20:31 +01:00
Daniel James 3ae9930979 Merge branch 'feature/better-construction' into develop 2017-04-18 10:14:53 +01:00
Daniel James 2effcfa195 Intro to compliance section
Needs more info on C++17 compliance - particularly `noexecpt`.
2017-04-18 10:14:26 +01:00
Daniel James 8c9080f11f Document changes to allocator use 2017-04-18 10:14:26 +01:00
Daniel James ef05493c83 Test that construct/destroy aren't used when C++11 isn't available 2017-04-18 10:14:26 +01:00
Daniel James 7a0a598649 Don't track construction when using boost::tuple
Because it doesn't quiet work on C++11 compilers onwards.
2017-04-18 10:14:26 +01:00
Daniel James cafd236a18 Test more memory tracking 2017-04-18 10:14:26 +01:00
Daniel James e0054c7dd0 Remove alloc parameter from construct_value 2017-04-18 10:14:26 +01:00
Daniel James 3414e6628a Use allocator to construct/destroy nodes 2017-04-18 10:14:26 +01:00
Daniel James 08ce2c98e0 Rename call_construct to construct_value 2017-04-18 10:14:26 +01:00
Daniel James 6d79a322e2 Use macros to reduce call chain 2017-04-18 10:14:26 +01:00
Daniel James 9e70680044 Bypass construct_value/call_destroy_in a few places 2017-04-18 10:14:26 +01:00
Daniel James 7de8c91301 Remove calls to const_cast_pointer
It was needed because std::allocator_traits::construct doesn't work with
a const pointer (e.g. pointer to the first member of a std::pair). But
now we're only calling construct if BOOST_UNORDERED_CXX11_CONSTRUCTION
is true, so the allocator_traits::construct is no longer used here.
2017-04-18 10:14:26 +01:00
Daniel James c333a7f9fc Use piecewise construction where possible 2017-04-18 10:14:26 +01:00
Daniel James bc36a06a2d Comment about call_construct 2017-04-18 10:14:26 +01:00
Daniel James e62ac22f0b Replace BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT with BOOST_UNORDERED_CXX11_CONSTRUCTION
Require good construct support and piecewise construction. I don't know
if there are any platforms with good construct support, but no piecewise
construction, if there are then they'll no longer use
'allocator_traits::construct'/'allocator_traits::destruct'.
2017-04-18 10:14:26 +01:00
Daniel James 1092c972c9 Use allocator_traits to construct/destruct buckets 2017-04-18 10:14:26 +01:00
Daniel James 7e5520f974 Increase template depth for GCC
This appears to be an unavoidable problem with GCC's tuple
implementation. For example:

http://stackoverflow.com/q/23374953/2434

Appears to be okay in later versions of GCC though.
2017-04-18 10:14:26 +01:00
Daniel James 2b01bdbc25 More general deprecated check
`__has_cpp_attribute(deprecated)` returns true for C++11, but then warns
that it's a C++14 attribute, so only check in C++14 mode.
2017-04-16 16:34:22 +01:00
Daniel James 64a3be7d3e Use aligned_storage's address method to get pointer 2017-04-16 10:37:10 +01:00
Daniel James c0e03c3640 Add some more details to change log 2017-04-15 20:52:00 +01:00
Daniel James ed8c0f9ecd Add deprecated attributes to deprecated functions 2017-04-15 17:35:09 +01:00
Daniel James 2bfc59c461 Make node_handler constructor private + additional compile tests 2017-04-15 17:35:09 +01:00
Daniel James 727e36e6a6 Comment about clear_buckets/create_buckets awkwardness.
They both leave the container in an invalid state that needs to be
cleaned up immediately. This confused me slightly.
2017-04-15 17:35:09 +01:00
Daniel James 09bddd8df4 Clear buckets before deleting nodes in clear.
The order shouldn't really matter as nothing throws an exception, but it
seems cleaner to never have any dangling pointers.
2017-04-15 17:35:08 +01:00
Daniel James f089adc160 Change get_key to have node parameter 2017-04-15 17:35:08 +01:00
Daniel James 97b68ea05e Rename (grouped_)table_impl to table_unique/equiv
The old names don't make sense any more as either style can be used for
containers with equivalent keys, due to the use of node_algo.
2017-04-15 17:35:08 +01:00