2006-05-17 17:19:16 +00:00
|
|
|
|
Merge hash and unordered changes.
Remove deprecated headers, move hash_fwd.hpp into hash subdirectory. And
several minor internal changes.
Mostly minor internal details.
Merged revisions 51262-51263,51407-51409,51504-51505,51644-51646,51667 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r51262 | danieljames | 2009-02-15 19:32:04 +0000 (Sun, 15 Feb 2009) | 1 line
Use the new 'boost:' links for the hash, unordered and quickbook documentation.
........
r51263 | danieljames | 2009-02-15 19:32:19 +0000 (Sun, 15 Feb 2009) | 2 lines
Don't copy images for the standalone hash and unordered documentation, was only
really required before the libraries were integrated into boost.
........
r51407 | danieljames | 2009-02-22 23:49:51 +0000 (Sun, 22 Feb 2009) | 1 line
Fix the hash dirname.
........
r51408 | danieljames | 2009-02-22 23:50:04 +0000 (Sun, 22 Feb 2009) | 1 line
Make copy_buckets and move_buckets member functions - so that calling them is a bit simpler.
........
r51409 | danieljames | 2009-02-22 23:50:20 +0000 (Sun, 22 Feb 2009) | 1 line
Move some of the data structure classes out of hash table data.
........
r51504 | danieljames | 2009-03-01 14:15:09 +0000 (Sun, 01 Mar 2009) | 1 line
Add missing return for operator=.
........
r51505 | danieljames | 2009-03-01 14:15:39 +0000 (Sun, 01 Mar 2009) | 3 lines
Make the sort stable.
Doesn't really matter, but it might as well be.
........
r51644 | danieljames | 2009-03-08 09:44:51 +0000 (Sun, 08 Mar 2009) | 1 line
Detab.
........
r51645 | danieljames | 2009-03-08 09:45:11 +0000 (Sun, 08 Mar 2009) | 4 lines
Move hash_fwd into the hash subdirectory.
I should have done this in the last release. But now all of the hash
implementation is in the hash subdirectory.
........
r51646 | danieljames | 2009-03-08 09:45:30 +0000 (Sun, 08 Mar 2009) | 3 lines
Remove deprecated headers.
Fixes #2412.
........
r51667 | danieljames | 2009-03-09 20:56:23 +0000 (Mon, 09 Mar 2009) | 1 line
Update copyright dates in hash and unordered.
........
[SVN r51729]
2009-03-11 22:51:09 +00:00
|
|
|
// Copyright 2006-2009 Daniel James.
|
2006-07-01 22:31:26 +00:00
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
2006-05-17 17:19:16 +00:00
|
|
|
|
2009-11-28 11:40:08 +00:00
|
|
|
#include "../helpers/prefix.hpp"
|
2006-05-17 17:19:16 +00:00
|
|
|
#include <boost/unordered_set.hpp>
|
|
|
|
|
#include <boost/unordered_map.hpp>
|
2012-05-03 22:05:21 +00:00
|
|
|
#include "../helpers/postfix.hpp"
|
2008-03-24 17:03:15 +00:00
|
|
|
#include "../helpers/test.hpp"
|
2006-05-17 17:19:16 +00:00
|
|
|
#include "../objects/test.hpp"
|
2011-08-21 19:19:12 +00:00
|
|
|
#include "../objects/cxx11_allocator.hpp"
|
2006-05-17 17:19:16 +00:00
|
|
|
#include "../helpers/random_values.hpp"
|
|
|
|
|
#include "../helpers/tracker.hpp"
|
|
|
|
|
#include "../helpers/equivalent.hpp"
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
#if defined(BOOST_MSVC)
|
|
|
|
|
#pragma warning(disable:4127) // conditional expression is constant
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-03-24 17:03:15 +00:00
|
|
|
namespace assign_tests {
|
|
|
|
|
|
2007-12-06 11:42:28 +00:00
|
|
|
test::seed_t seed(96785);
|
|
|
|
|
|
2006-05-17 17:19:16 +00:00
|
|
|
template <class T>
|
2010-01-08 05:39:54 +00:00
|
|
|
void assign_tests1(T*,
|
|
|
|
|
test::random_generator generator = test::default_generator)
|
2006-05-17 17:19:16 +00:00
|
|
|
{
|
2008-01-10 22:30:46 +00:00
|
|
|
BOOST_DEDUCED_TYPENAME T::hasher hf;
|
|
|
|
|
BOOST_DEDUCED_TYPENAME T::key_equal eq;
|
2006-05-17 17:19:16 +00:00
|
|
|
|
|
|
|
|
std::cerr<<"assign_tests1.1\n";
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
test::check_instances check_;
|
|
|
|
|
|
2006-05-17 17:19:16 +00:00
|
|
|
T x;
|
|
|
|
|
x = x;
|
Merge latest changes for unordered. Improved compatability and a few tweaks.
Merged revisions 53127,53253,53256,53311,53314,53316-53318 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r53127 | danieljames | 2009-05-20 07:43:38 +0100 (Wed, 20 May 2009) | 1 line
Better configuration for boost.unordered.
........
r53253 | danieljames | 2009-05-25 20:14:07 +0100 (Mon, 25 May 2009) | 3 lines
Add explicit destructors to the unordered containers. Refs #2908.
Isn't really needed but it doesn't hurt.
........
r53256 | danieljames | 2009-05-25 20:45:23 +0100 (Mon, 25 May 2009) | 1 line
Unordered change log for explicit destructors.
........
r53311 | danieljames | 2009-05-27 18:42:01 +0100 (Wed, 27 May 2009) | 1 line
Missing changelog entry.
........
r53314 | danieljames | 2009-05-27 18:44:09 +0100 (Wed, 27 May 2009) | 1 line
Use lightweight_test for unordered.
........
r53316 | danieljames | 2009-05-27 19:19:32 +0100 (Wed, 27 May 2009) | 1 line
Some workarounds for old versions of Borland.
........
r53317 | danieljames | 2009-05-27 19:32:22 +0100 (Wed, 27 May 2009) | 1 line
Fix a change accidentally included in the last commit.
........
r53318 | danieljames | 2009-05-27 19:32:38 +0100 (Wed, 27 May 2009) | 1 line
Remove an unused function.
........
[SVN r53465]
2009-05-30 17:34:12 +00:00
|
|
|
BOOST_TEST(x.empty());
|
|
|
|
|
BOOST_TEST(test::equivalent(x.hash_function(), hf));
|
|
|
|
|
BOOST_TEST(test::equivalent(x.key_eq(), eq));
|
2006-05-17 17:19:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::cerr<<"assign_tests1.2\n";
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
test::check_instances check_;
|
|
|
|
|
|
2008-01-20 18:55:57 +00:00
|
|
|
test::random_values<T> v(1000, generator);
|
2006-05-17 17:19:16 +00:00
|
|
|
T x(v.begin(), v.end());
|
|
|
|
|
|
|
|
|
|
test::ordered<T> tracker = test::create_ordered(x);
|
2006-06-12 23:30:46 +00:00
|
|
|
tracker.insert_range(v.begin(), v.end());
|
2006-05-17 17:19:16 +00:00
|
|
|
|
|
|
|
|
x = x;
|
|
|
|
|
tracker.compare(x);
|
|
|
|
|
|
|
|
|
|
T y;
|
|
|
|
|
y.max_load_factor(x.max_load_factor() / 20);
|
2011-10-09 18:30:10 +00:00
|
|
|
float mlf = x.max_load_factor();
|
2006-05-17 17:19:16 +00:00
|
|
|
y = x;
|
2011-10-09 18:30:10 +00:00
|
|
|
tracker.compare(x);
|
2006-05-17 17:19:16 +00:00
|
|
|
tracker.compare(y);
|
2011-10-09 18:30:10 +00:00
|
|
|
BOOST_TEST(x.max_load_factor() == mlf);
|
|
|
|
|
BOOST_TEST(y.max_load_factor() == mlf);
|
2006-05-17 17:19:16 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <class T>
|
2010-01-08 05:39:54 +00:00
|
|
|
void assign_tests2(T*,
|
|
|
|
|
test::random_generator generator = test::default_generator)
|
2006-05-17 17:19:16 +00:00
|
|
|
{
|
2008-01-10 22:30:46 +00:00
|
|
|
BOOST_DEDUCED_TYPENAME T::hasher hf1(1);
|
|
|
|
|
BOOST_DEDUCED_TYPENAME T::hasher hf2(2);
|
|
|
|
|
BOOST_DEDUCED_TYPENAME T::key_equal eq1(1);
|
|
|
|
|
BOOST_DEDUCED_TYPENAME T::key_equal eq2(2);
|
|
|
|
|
BOOST_DEDUCED_TYPENAME T::allocator_type al1(1);
|
|
|
|
|
BOOST_DEDUCED_TYPENAME T::allocator_type al2(2);
|
2011-08-21 19:19:12 +00:00
|
|
|
|
|
|
|
|
typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
|
|
|
|
|
|
2006-05-17 17:19:16 +00:00
|
|
|
std::cerr<<"assign_tests2.1\n";
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
test::check_instances check_;
|
|
|
|
|
|
2008-01-20 18:55:57 +00:00
|
|
|
test::random_values<T> v(1000, generator);
|
2006-05-17 17:19:16 +00:00
|
|
|
T x1(v.begin(), v.end(), 0, hf1, eq1);
|
|
|
|
|
T x2(0, hf2, eq2);
|
|
|
|
|
x2 = x1;
|
Merge latest changes for unordered. Improved compatability and a few tweaks.
Merged revisions 53127,53253,53256,53311,53314,53316-53318 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r53127 | danieljames | 2009-05-20 07:43:38 +0100 (Wed, 20 May 2009) | 1 line
Better configuration for boost.unordered.
........
r53253 | danieljames | 2009-05-25 20:14:07 +0100 (Mon, 25 May 2009) | 3 lines
Add explicit destructors to the unordered containers. Refs #2908.
Isn't really needed but it doesn't hurt.
........
r53256 | danieljames | 2009-05-25 20:45:23 +0100 (Mon, 25 May 2009) | 1 line
Unordered change log for explicit destructors.
........
r53311 | danieljames | 2009-05-27 18:42:01 +0100 (Wed, 27 May 2009) | 1 line
Missing changelog entry.
........
r53314 | danieljames | 2009-05-27 18:44:09 +0100 (Wed, 27 May 2009) | 1 line
Use lightweight_test for unordered.
........
r53316 | danieljames | 2009-05-27 19:19:32 +0100 (Wed, 27 May 2009) | 1 line
Some workarounds for old versions of Borland.
........
r53317 | danieljames | 2009-05-27 19:32:22 +0100 (Wed, 27 May 2009) | 1 line
Fix a change accidentally included in the last commit.
........
r53318 | danieljames | 2009-05-27 19:32:38 +0100 (Wed, 27 May 2009) | 1 line
Remove an unused function.
........
[SVN r53465]
2009-05-30 17:34:12 +00:00
|
|
|
BOOST_TEST(test::equivalent(x2.hash_function(), hf1));
|
|
|
|
|
BOOST_TEST(test::equivalent(x2.key_eq(), eq1));
|
2006-06-12 23:30:46 +00:00
|
|
|
test::check_container(x2, v);
|
2006-05-17 17:19:16 +00:00
|
|
|
}
|
2006-05-21 17:14:11 +00:00
|
|
|
|
|
|
|
|
std::cerr<<"assign_tests2.2\n";
|
|
|
|
|
{
|
2011-08-21 19:19:12 +00:00
|
|
|
test::check_instances check_;
|
|
|
|
|
|
2008-01-20 18:55:57 +00:00
|
|
|
test::random_values<T> v1(100, generator), v2(100, generator);
|
2006-05-21 17:14:11 +00:00
|
|
|
T x1(v1.begin(), v1.end(), 0, hf1, eq1, al1);
|
|
|
|
|
T x2(v2.begin(), v2.end(), 0, hf2, eq2, al2);
|
|
|
|
|
x2 = x1;
|
Merge latest changes for unordered. Improved compatability and a few tweaks.
Merged revisions 53127,53253,53256,53311,53314,53316-53318 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r53127 | danieljames | 2009-05-20 07:43:38 +0100 (Wed, 20 May 2009) | 1 line
Better configuration for boost.unordered.
........
r53253 | danieljames | 2009-05-25 20:14:07 +0100 (Mon, 25 May 2009) | 3 lines
Add explicit destructors to the unordered containers. Refs #2908.
Isn't really needed but it doesn't hurt.
........
r53256 | danieljames | 2009-05-25 20:45:23 +0100 (Mon, 25 May 2009) | 1 line
Unordered change log for explicit destructors.
........
r53311 | danieljames | 2009-05-27 18:42:01 +0100 (Wed, 27 May 2009) | 1 line
Missing changelog entry.
........
r53314 | danieljames | 2009-05-27 18:44:09 +0100 (Wed, 27 May 2009) | 1 line
Use lightweight_test for unordered.
........
r53316 | danieljames | 2009-05-27 19:19:32 +0100 (Wed, 27 May 2009) | 1 line
Some workarounds for old versions of Borland.
........
r53317 | danieljames | 2009-05-27 19:32:22 +0100 (Wed, 27 May 2009) | 1 line
Fix a change accidentally included in the last commit.
........
r53318 | danieljames | 2009-05-27 19:32:38 +0100 (Wed, 27 May 2009) | 1 line
Remove an unused function.
........
[SVN r53465]
2009-05-30 17:34:12 +00:00
|
|
|
BOOST_TEST(test::equivalent(x2.hash_function(), hf1));
|
|
|
|
|
BOOST_TEST(test::equivalent(x2.key_eq(), eq1));
|
2011-08-21 19:19:12 +00:00
|
|
|
if (allocator_type::is_propagate_on_assign) {
|
|
|
|
|
BOOST_TEST(test::equivalent(x2.get_allocator(), al1));
|
|
|
|
|
BOOST_TEST(!test::equivalent(x2.get_allocator(), al2));
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
BOOST_TEST(test::equivalent(x2.get_allocator(), al2));
|
|
|
|
|
BOOST_TEST(!test::equivalent(x2.get_allocator(), al1));
|
|
|
|
|
}
|
2006-06-12 23:30:46 +00:00
|
|
|
test::check_container(x2, v1);
|
2006-05-21 17:14:11 +00:00
|
|
|
}
|
2006-05-17 17:19:16 +00:00
|
|
|
}
|
|
|
|
|
|
2010-01-08 05:39:54 +00:00
|
|
|
boost::unordered_set<test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::allocator<test::object> >* test_set;
|
|
|
|
|
boost::unordered_multiset<test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::allocator<test::object> >* test_multiset;
|
|
|
|
|
boost::unordered_map<test::object, test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::allocator<test::object> >* test_map;
|
|
|
|
|
boost::unordered_multimap<test::object, test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::allocator<test::object> >* test_multimap;
|
2008-03-24 17:03:15 +00:00
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
boost::unordered_set<test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::cxx11_allocator<test::object, test::propagate_assign> >*
|
|
|
|
|
test_set_prop_assign;
|
|
|
|
|
boost::unordered_multiset<test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::cxx11_allocator<test::object, test::propagate_assign> >*
|
|
|
|
|
test_multiset_prop_assign;
|
|
|
|
|
boost::unordered_map<test::object, test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::cxx11_allocator<test::object, test::propagate_assign> >*
|
|
|
|
|
test_map_prop_assign;
|
|
|
|
|
boost::unordered_multimap<test::object, test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::cxx11_allocator<test::object, test::propagate_assign> >*
|
|
|
|
|
test_multimap_prop_assign;
|
|
|
|
|
|
|
|
|
|
boost::unordered_set<test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::cxx11_allocator<test::object, test::no_propagate_assign> >*
|
|
|
|
|
test_set_no_prop_assign;
|
|
|
|
|
boost::unordered_multiset<test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::cxx11_allocator<test::object, test::no_propagate_assign> >*
|
|
|
|
|
test_multiset_no_prop_assign;
|
|
|
|
|
boost::unordered_map<test::object, test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::cxx11_allocator<test::object, test::no_propagate_assign> >*
|
|
|
|
|
test_map_no_prop_assign;
|
|
|
|
|
boost::unordered_multimap<test::object, test::object,
|
|
|
|
|
test::hash, test::equal_to,
|
|
|
|
|
test::cxx11_allocator<test::object, test::no_propagate_assign> >*
|
|
|
|
|
test_multimap_no_prop_assign;
|
|
|
|
|
|
2008-03-24 17:03:15 +00:00
|
|
|
using test::default_generator;
|
|
|
|
|
using test::generate_collisions;
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
template <typename T>
|
|
|
|
|
bool is_propagate(T*)
|
|
|
|
|
{
|
|
|
|
|
return T::allocator_type::is_propagate_on_assign;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UNORDERED_AUTO_TEST(check_traits)
|
|
|
|
|
{
|
|
|
|
|
BOOST_TEST(!is_propagate(test_set));
|
|
|
|
|
BOOST_TEST(is_propagate(test_set_prop_assign));
|
|
|
|
|
BOOST_TEST(!is_propagate(test_set_no_prop_assign));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UNORDERED_TEST(assign_tests1, (
|
|
|
|
|
(test_set)(test_multiset)(test_map)(test_multimap)
|
|
|
|
|
(test_set_prop_assign)(test_multiset_prop_assign)(test_map_prop_assign)(test_multimap_prop_assign)
|
|
|
|
|
(test_set_no_prop_assign)(test_multiset_no_prop_assign)(test_map_no_prop_assign)(test_multimap_no_prop_assign)
|
|
|
|
|
)
|
2008-03-24 17:03:15 +00:00
|
|
|
((default_generator)(generate_collisions))
|
|
|
|
|
)
|
|
|
|
|
|
2011-08-21 19:19:12 +00:00
|
|
|
UNORDERED_TEST(assign_tests2, (
|
|
|
|
|
(test_set)(test_multiset)(test_map)(test_multimap)
|
|
|
|
|
(test_set_prop_assign)(test_multiset_prop_assign)(test_map_prop_assign)(test_multimap_prop_assign)
|
|
|
|
|
(test_set_no_prop_assign)(test_multiset_no_prop_assign)(test_map_no_prop_assign)(test_multimap_no_prop_assign)
|
|
|
|
|
)
|
2008-03-24 17:03:15 +00:00
|
|
|
((default_generator)(generate_collisions))
|
|
|
|
|
)
|
|
|
|
|
|
2009-05-30 17:41:05 +00:00
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
Merge latest hash and unordered developments, and add support for initialiser
lists to config.
Merged revisions 49338,49924-49927,49955,50029,50118 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r49338 | danieljames | 2008-10-15 10:44:41 +0100 (Wed, 15 Oct 2008) | 2 lines
Revert [49229], it fixes the same problem as [48674].
........
r49924 | danieljames | 2008-11-24 22:55:14 +0000 (Mon, 24 Nov 2008) | 1 line
Extra tests for equality with different hash functions.
........
r49925 | danieljames | 2008-11-24 22:55:47 +0000 (Mon, 24 Nov 2008) | 1 line
Document operator==/operator!= as undefined if the equality predicates aren't equivalent.
........
r49926 | danieljames | 2008-11-24 22:56:04 +0000 (Mon, 24 Nov 2008) | 1 line
Use a larger prime number list.
........
r49927 | danieljames | 2008-11-24 23:15:55 +0000 (Mon, 24 Nov 2008) | 1 line
Use aligned storage for the value.
........
r49955 | danieljames | 2008-11-27 11:42:13 +0000 (Thu, 27 Nov 2008) | 1 line
Wild stab at getting destruction working on more compilers.
........
r50029 | danieljames | 2008-11-29 21:47:55 +0000 (Sat, 29 Nov 2008) | 1 line
Workaround another in-place destruction.
........
r50118 | danieljames | 2008-12-04 21:30:19 +0000 (Thu, 04 Dec 2008) | 1 line
Add support for initializer lists to config and the unordered containers.
........
[SVN r50451]
2009-01-03 23:18:33 +00:00
|
|
|
|
Misc. unordered changes. Fixes #3082, #3119.
Merged revisions 53505-53506,53525,53550,53552,53614 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r53505 | danieljames | 2009-05-31 16:50:56 +0100 (Sun, 31 May 2009) | 1 line
Disable incorrect Visual C++ 64-bit warnings. Ref #3082.
........
r53506 | danieljames | 2009-05-31 16:53:09 +0100 (Sun, 31 May 2009) | 1 line
Remove misplaced visual C++ warning pragma.
........
r53525 | danieljames | 2009-06-01 07:50:37 +0100 (Mon, 01 Jun 2009) | 1 line
Fix tests for when the library has support for initializer lists but the compiler doesn't.
........
r53550 | danieljames | 2009-06-01 20:17:49 +0100 (Mon, 01 Jun 2009) | 1 line
Get the type of the initializer_list right.
........
r53552 | danieljames | 2009-06-01 20:22:27 +0100 (Mon, 01 Jun 2009) | 1 line
Fix the unordered_map declaration in the tutorial. Fixes #3119.
........
r53614 | danieljames | 2009-06-03 23:48:49 +0100 (Wed, 03 Jun 2009) | 1 line
The move tests pass on 64 bit visual c++.
........
[SVN r53687]
2009-06-06 14:05:54 +00:00
|
|
|
UNORDERED_AUTO_TEST(assign_default_initializer_list) {
|
|
|
|
|
std::cerr<<"Initializer List Tests\n";
|
|
|
|
|
std::initializer_list<std::pair<int const, int> > init;
|
|
|
|
|
boost::unordered_map<int, int> x1;
|
|
|
|
|
x1[25] = 3;
|
|
|
|
|
x1[16] = 10;
|
|
|
|
|
BOOST_TEST(!x1.empty());
|
|
|
|
|
x1 = init;
|
|
|
|
|
BOOST_TEST(x1.empty());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-05-03 22:05:21 +00:00
|
|
|
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
|
Merge latest hash and unordered developments, and add support for initialiser
lists to config.
Merged revisions 49338,49924-49927,49955,50029,50118 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r49338 | danieljames | 2008-10-15 10:44:41 +0100 (Wed, 15 Oct 2008) | 2 lines
Revert [49229], it fixes the same problem as [48674].
........
r49924 | danieljames | 2008-11-24 22:55:14 +0000 (Mon, 24 Nov 2008) | 1 line
Extra tests for equality with different hash functions.
........
r49925 | danieljames | 2008-11-24 22:55:47 +0000 (Mon, 24 Nov 2008) | 1 line
Document operator==/operator!= as undefined if the equality predicates aren't equivalent.
........
r49926 | danieljames | 2008-11-24 22:56:04 +0000 (Mon, 24 Nov 2008) | 1 line
Use a larger prime number list.
........
r49927 | danieljames | 2008-11-24 23:15:55 +0000 (Mon, 24 Nov 2008) | 1 line
Use aligned storage for the value.
........
r49955 | danieljames | 2008-11-27 11:42:13 +0000 (Thu, 27 Nov 2008) | 1 line
Wild stab at getting destruction working on more compilers.
........
r50029 | danieljames | 2008-11-29 21:47:55 +0000 (Sat, 29 Nov 2008) | 1 line
Workaround another in-place destruction.
........
r50118 | danieljames | 2008-12-04 21:30:19 +0000 (Thu, 04 Dec 2008) | 1 line
Add support for initializer lists to config and the unordered containers.
........
[SVN r50451]
2009-01-03 23:18:33 +00:00
|
|
|
UNORDERED_AUTO_TEST(assign_initializer_list)
|
|
|
|
|
{
|
|
|
|
|
std::cerr<<"Initializer List Tests\n";
|
|
|
|
|
|
|
|
|
|
boost::unordered_set<int> x;
|
|
|
|
|
x.insert(10);
|
|
|
|
|
x.insert(20);
|
|
|
|
|
x = { 1, 2, -10 };
|
Merge latest changes for unordered. Improved compatability and a few tweaks.
Merged revisions 53127,53253,53256,53311,53314,53316-53318 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r53127 | danieljames | 2009-05-20 07:43:38 +0100 (Wed, 20 May 2009) | 1 line
Better configuration for boost.unordered.
........
r53253 | danieljames | 2009-05-25 20:14:07 +0100 (Mon, 25 May 2009) | 3 lines
Add explicit destructors to the unordered containers. Refs #2908.
Isn't really needed but it doesn't hurt.
........
r53256 | danieljames | 2009-05-25 20:45:23 +0100 (Mon, 25 May 2009) | 1 line
Unordered change log for explicit destructors.
........
r53311 | danieljames | 2009-05-27 18:42:01 +0100 (Wed, 27 May 2009) | 1 line
Missing changelog entry.
........
r53314 | danieljames | 2009-05-27 18:44:09 +0100 (Wed, 27 May 2009) | 1 line
Use lightweight_test for unordered.
........
r53316 | danieljames | 2009-05-27 19:19:32 +0100 (Wed, 27 May 2009) | 1 line
Some workarounds for old versions of Borland.
........
r53317 | danieljames | 2009-05-27 19:32:22 +0100 (Wed, 27 May 2009) | 1 line
Fix a change accidentally included in the last commit.
........
r53318 | danieljames | 2009-05-27 19:32:38 +0100 (Wed, 27 May 2009) | 1 line
Remove an unused function.
........
[SVN r53465]
2009-05-30 17:34:12 +00:00
|
|
|
BOOST_TEST(x.find(10) == x.end());
|
|
|
|
|
BOOST_TEST(x.find(-10) != x.end());
|
Merge latest hash and unordered developments, and add support for initialiser
lists to config.
Merged revisions 49338,49924-49927,49955,50029,50118 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r49338 | danieljames | 2008-10-15 10:44:41 +0100 (Wed, 15 Oct 2008) | 2 lines
Revert [49229], it fixes the same problem as [48674].
........
r49924 | danieljames | 2008-11-24 22:55:14 +0000 (Mon, 24 Nov 2008) | 1 line
Extra tests for equality with different hash functions.
........
r49925 | danieljames | 2008-11-24 22:55:47 +0000 (Mon, 24 Nov 2008) | 1 line
Document operator==/operator!= as undefined if the equality predicates aren't equivalent.
........
r49926 | danieljames | 2008-11-24 22:56:04 +0000 (Mon, 24 Nov 2008) | 1 line
Use a larger prime number list.
........
r49927 | danieljames | 2008-11-24 23:15:55 +0000 (Mon, 24 Nov 2008) | 1 line
Use aligned storage for the value.
........
r49955 | danieljames | 2008-11-27 11:42:13 +0000 (Thu, 27 Nov 2008) | 1 line
Wild stab at getting destruction working on more compilers.
........
r50029 | danieljames | 2008-11-29 21:47:55 +0000 (Sat, 29 Nov 2008) | 1 line
Workaround another in-place destruction.
........
r50118 | danieljames | 2008-12-04 21:30:19 +0000 (Thu, 04 Dec 2008) | 1 line
Add support for initializer lists to config and the unordered containers.
........
[SVN r50451]
2009-01-03 23:18:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
2006-05-17 17:19:16 +00:00
|
|
|
}
|
2008-03-24 17:03:15 +00:00
|
|
|
|
|
|
|
|
RUN_TESTS()
|