Commit Graph
987 Commits
Author SHA1 Message Date
Daniel James c2d2be021a Don't test inserting from initializer list in old clang
There's a problem with it causing an ambiguous overload. I don't think
there's anything we can do to fix that, so just don't test it.

There's another bug where a std::pair doesn't get correctly constructed
from an rvalue when using Clang 3.1 in C++11 mode. But I can't see any
way to easily fix that, and it's a pretty old compiler now.
2017-04-08 06:17:43 +01:00
Daniel James c18f57f62b Add missing copyright/license to a couple of files 2017-04-04 22:06:15 +01:00
Daniel James e657f75a17 Boost 1.64.0 changelog entry 2017-03-15 11:16:53 +00:00
Daniel James d060d3a0e5 Fix ironic typo 2017-03-15 11:15:27 +00:00
Daniel James 0af2c732ab Fix use of BOOST_STATIC_ASSERT for older preprocessors 2017-03-01 16:52:43 +00:00
Daniel James 68fe365f5b Try to avoid Visual C++ warning C4800 2017-03-01 16:50:05 +00:00
Daniel James 91bbd5fcb2 Make emplace_args1 constructor explicit 2017-03-01 16:46:18 +00:00
Daniel James b6e3f2303f Fix call to try_emplace_impl 2017-03-01 00:13:02 +00:00
Daniel James da370a6a1a Avoid Visual C++ warning C4127 2017-02-27 12:20:37 +00:00
Daniel James 4aa74e5feb Merge between set/multiset and map/multimap 2017-02-27 03:59:02 +00:00
Daniel James 13322fe858 Option to use same node type everywhere.
Will allow me to implement merge and extract fully.
2017-02-27 03:59:02 +00:00
Daniel James 0645700b33 Separate out some of the node manipulation code 2017-02-27 03:59:02 +00:00
Daniel James d89aadc56c Implement merge 2017-02-27 03:59:02 +00:00
Daniel James 21a24d6cd7 Support node_handle 2017-02-27 03:59:02 +00:00
Daniel James 9c4c3a754a Const methods in value_base. 2017-02-27 03:59:02 +00:00
Daniel James 5f5f8ef1e4 Implement try_emplace 2017-02-27 03:59:02 +00:00
Daniel James 958d206bb6 Implement insert_or_assign. 2017-02-27 03:59:02 +00:00
Daniel James 8fa93cc55b Update some comments for recent versions of standard 2017-02-23 20:14:27 +00:00
Daniel James 79cf0c4bfb pair_traits for getting pair types without instantiating.
I was having some problems in an abandoned prototype with incomplete
types, I'm not sure I will have this problem now, but I'm keeping this
anyway, as it seems useful.
2017-02-23 20:14:27 +00:00
Daniel James 81aefde94e Use const_key_type internally 2017-02-23 20:14:27 +00:00
Daniel James 96602df8a8 Remove const volatile when picking bucket policy
Could possibly do this in a more portable manner by using some sort of
function overload.
2017-02-23 20:14:27 +00:00
Daniel James c0b72d97b3 Stricter about rebinding the allocator 2017-02-23 20:14:27 +00:00
Daniel James ddee1b686a Move config and declaration to the start of implementataion.hpp 2017-02-23 20:14:26 +00:00
Daniel James 2231586033 Remove duplicate includes 2017-02-23 20:14:26 +00:00
Daniel James 13063abce5 Move friend function outside of class
The use of std::pair was causing issues with the sun compiler.
2017-02-23 20:10:40 +00:00
Daniel James bf5ef9824d Reformat with clang-format 2017-02-19 13:05:17 +00:00
Daniel James 01dcd36c41 Add _clang-format file 2017-02-19 13:05:17 +00:00
Daniel James b2f2fdc2f3 Prevent clang-format sorting some test includes 2017-02-19 13:05:17 +00:00
Daniel James f2af10c746 Protect preprocess sequence from clang format 2017-02-19 13:05:17 +00:00
Daniel James 3bf664ad31 Add a missing header 2017-02-19 13:05:17 +00:00
Daniel James 67ab88b064 Combine most of the detail headers into a single header 2017-02-19 13:05:17 +00:00
Daniel James 67f1f65174 Linearise the detail includes
The current organisation of the headers has been making less and less
sense over the years, so to simplify things, I'm just going to combine
them into a single header. This change will make it easier to do that.
2017-02-19 13:05:17 +00:00
Daniel James 57cc6d4bac Fix exception safety when constructing pairs 2017-01-01 18:35:50 +00:00
Daniel James e416cafd49 Count instances constructed/destructed in exception tests 2017-01-01 18:35:50 +00:00
Daniel James 0a1c9ad4c5 Use boost 1.63.0 in travis 2017-01-01 16:07:08 +00:00
Daniel James dd85b16166 Update the snapshot in travis
I've forgotten why I'm not using a stable release, but really should try
to avoid using snapshots for this reason. Or at least port the code for
downloading snapshots for the website.
2016-12-06 10:56:19 +00:00
Daniel James 03a597983e Change log for last few fixes 2016-12-05 22:48:00 +00:00
Daniel James 33f701dd09 Fix assigning hash/key equality functions for empty containers 2016-11-21 10:24:51 +00:00
Daniel James 3db4654b44 Remove unary/binary_function from examples/documentation
They are being removed from the standard in C++17, and were never really
required.
2016-11-06 10:19:17 +00:00
Daniel James a7546e298e Support 10 arguments in emplace_args
Which was the intent, but only supported up to 9 arguments. I doubt
this will make much of a difference.
2016-11-02 07:30:41 +00:00
Daniel James 98cce956f9 Try to fix a 64-bit powerpc g++ 7 warning
Warning is:

allocate.hpp:335:19: warning: conversion to ???unsigned int??? from
???long unsigned int??? may alter its value [-Wconversion]

I'm not sure, but I think it's because the sizeof is a long unsigned
int, and the template parameter is an unsigned int. The sizeof isn't
even used, it's just there to get a value for expression SFINAE.
2016-10-28 09:06:53 +01:00
Daniel James a34785fa0d Don't 'sink' uncopyable container
Calling sink was causing older versions of gcc to copy the container,
resulting in a compile error. So instead just disambiguate by putting
brackets around the expression.
2016-10-25 18:04:34 +01:00
Daniel James 14ccdbc7b6 Add guards against exceptions that shouldn't happen
I'm getting a couple of "terminate called after throwing an instance of
'test::lightweight::test_exception'" errors on the sun platform. Not
sure where they're happening, so I've made the code a tad more resilient
against exceptions that should not really be thrown.
2016-10-24 09:46:13 +01:00
Daniel James 5b5b46ea1c Disable Visual C++ __declspec(allocator) warning
Visual C++ is warning that memory can't be tracked for allocators whose
pointer types aren't actually pointers, which is a correct warning but
not relevant for our concerns, and is caused by the unit tests, not the
container implementation.
2016-10-23 13:51:58 +01:00
Daniel James e3f534a148 Allocator aware constructors 2016-10-23 13:33:25 +01:00
Daniel James 1bcd5b0003 Make no argument constructor implicit 2016-10-23 13:32:52 +01:00
Daniel James 0d1cfba823 Rename functions in allocate.hpp 2016-10-22 10:28:53 +01:00
Daniel James e986b70981 Stricter iterator types 2016-10-22 10:04:36 +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