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.
This commit is contained in:
Daniel James
2016-05-30 11:29:20 +01:00
parent 1d4845d6b8
commit b4a3c6f460
6 changed files with 91 additions and 60 deletions

View File

@@ -103,8 +103,16 @@ namespace test
struct random_values
: public test::list<BOOST_DEDUCED_TYPENAME X::value_type>
{
random_values(int count, test::random_generator const& generator =
random_values() {}
explicit random_values(int count, test::random_generator const& generator =
test::default_generator)
{
fill(count, generator);
}
void fill(int count, test::random_generator const& generator =
test::default_generator)
{
test::unordered_generator<X> gen(generator);
gen.fill(*this, count);