forked from boostorg/unordered
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user