Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
|
|
|
|
// Copyright 2008 Daniel James.
|
|
|
|
// 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)
|
|
|
|
|
|
|
|
#include <boost/unordered_set.hpp>
|
|
|
|
#include <boost/unordered_map.hpp>
|
|
|
|
#include <boost/preprocessor/seq.hpp>
|
|
|
|
#include <list>
|
|
|
|
#include "../helpers/test.hpp"
|
|
|
|
|
|
|
|
namespace equality_tests
|
|
|
|
{
|
|
|
|
struct mod_compare
|
|
|
|
{
|
|
|
|
bool operator()(int x, int y) const
|
|
|
|
{
|
|
|
|
return x % 1000 == y % 1000;
|
|
|
|
}
|
|
|
|
|
|
|
|
int operator()(int x) const
|
|
|
|
{
|
|
|
|
return x % 250;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#define UNORDERED_EQUALITY_SET_TEST(seq1, op, seq2) \
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
do { \
|
|
|
|
boost::unordered_set<int, mod_compare, mod_compare> set1, set2; \
|
|
|
|
BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set1, seq1) \
|
|
|
|
BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set2, seq2) \
|
|
|
|
BOOST_CHECK(set1 op set2); \
|
|
|
|
} while(false)
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
|
|
|
|
#define UNORDERED_EQUALITY_MULTISET_TEST(seq1, op, seq2) \
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
do { \
|
|
|
|
boost::unordered_multiset<int, mod_compare, mod_compare> set1, set2; \
|
|
|
|
BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set1, seq1) \
|
|
|
|
BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set2, seq2) \
|
|
|
|
BOOST_CHECK(set1 op set2); \
|
|
|
|
} while(false)
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
|
|
|
|
#define UNORDERED_EQUALITY_MAP_TEST(seq1, op, seq2) \
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
do { \
|
|
|
|
boost::unordered_map<int, int, mod_compare, mod_compare> map1, map2; \
|
|
|
|
BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map1, seq1) \
|
|
|
|
BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map2, seq2) \
|
|
|
|
BOOST_CHECK(map1 op map2); \
|
|
|
|
} while(false)
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
|
|
|
|
#define UNORDERED_EQUALITY_MULTIMAP_TEST(seq1, op, seq2) \
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
do { \
|
|
|
|
boost::unordered_multimap<int, int, mod_compare, mod_compare> map1, map2; \
|
|
|
|
BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map1, seq1) \
|
|
|
|
BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map2, seq2) \
|
|
|
|
BOOST_CHECK(map1 op map2); \
|
|
|
|
} while(false)
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
|
|
|
|
#define UNORDERED_SET_INSERT(r, set, item) set.insert(item);
|
|
|
|
#define UNORDERED_MAP_INSERT(r, map, item) \
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
map.insert(std::pair<int const, int> BOOST_PP_SEQ_TO_TUPLE(item));
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
UNORDERED_AUTO_TEST(equality_size_tests)
|
|
|
|
{
|
|
|
|
boost::unordered_set<int> x1, x2;
|
|
|
|
BOOST_CHECK(x1 == x2);
|
|
|
|
BOOST_CHECK(!(x1 != x2));
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
x1.insert(1);
|
|
|
|
BOOST_CHECK(x1 != x2);
|
|
|
|
BOOST_CHECK(!(x1 == x2));
|
|
|
|
BOOST_CHECK(x2 != x1);
|
|
|
|
BOOST_CHECK(!(x2 == x1));
|
|
|
|
|
|
|
|
x2.insert(1);
|
|
|
|
BOOST_CHECK(x1 == x2);
|
|
|
|
BOOST_CHECK(!(x1 != x2));
|
|
|
|
|
|
|
|
x2.insert(2);
|
|
|
|
BOOST_CHECK(x1 != x2);
|
|
|
|
BOOST_CHECK(!(x1 == x2));
|
|
|
|
BOOST_CHECK(x2 != x1);
|
|
|
|
BOOST_CHECK(!(x2 == x1));
|
|
|
|
}
|
|
|
|
|
|
|
|
UNORDERED_AUTO_TEST(equality_key_value_tests)
|
|
|
|
{
|
|
|
|
UNORDERED_EQUALITY_MULTISET_TEST((1), !=, (2));
|
|
|
|
UNORDERED_EQUALITY_SET_TEST((2), ==, (2));
|
|
|
|
UNORDERED_EQUALITY_MAP_TEST(((1)(1))((2)(1)), !=, ((1)(1))((3)(1)));
|
|
|
|
}
|
|
|
|
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
UNORDERED_AUTO_TEST(equality_collision_test)
|
|
|
|
{
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
UNORDERED_EQUALITY_MULTISET_TEST(
|
|
|
|
(1), !=, (501));
|
|
|
|
UNORDERED_EQUALITY_MULTISET_TEST(
|
|
|
|
(1)(251), !=, (1)(501));
|
|
|
|
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
|
|
|
((251)(1))((1)(1)), !=, ((501)(1))((1)(1)));
|
|
|
|
UNORDERED_EQUALITY_MULTISET_TEST(
|
|
|
|
(1)(501), ==, (1)(501));
|
|
|
|
UNORDERED_EQUALITY_SET_TEST(
|
|
|
|
(1)(501), ==, (501)(1));
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
}
|
|
|
|
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
UNORDERED_AUTO_TEST(equality_group_size_test)
|
|
|
|
{
|
|
|
|
UNORDERED_EQUALITY_MULTISET_TEST(
|
|
|
|
(10)(20)(20), !=, (10)(10)(20));
|
|
|
|
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
|
|
|
((10)(1))((20)(1))((20)(1)), !=,
|
|
|
|
((10)(1))((20)(1))((10)(1)));
|
|
|
|
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
|
|
|
((20)(1))((10)(1))((10)(1)), ==,
|
|
|
|
((10)(1))((20)(1))((10)(1)));
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
UNORDERED_AUTO_TEST(equality_map_value_test)
|
|
|
|
{
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
UNORDERED_EQUALITY_MAP_TEST(
|
|
|
|
((1)(1)), !=, ((1)(2)));
|
|
|
|
UNORDERED_EQUALITY_MAP_TEST(
|
|
|
|
((1)(1)), ==, ((1)(1)));
|
|
|
|
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
|
|
|
((1)(1)), !=, ((1)(2)));
|
|
|
|
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
|
|
|
((1)(1))((1)(1)), !=, ((1)(1))((1)(2)));
|
|
|
|
UNORDERED_EQUALITY_MULTIMAP_TEST(
|
|
|
|
((1)(2))((1)(1)), !=, ((1)(1))((1)(2)));
|
|
|
|
}
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
|
|
|
|
UNORDERED_AUTO_TEST(equality_predicate_test)
|
|
|
|
{
|
Merge from trunk. Fix some inspect errors, try to avoid instantiating the
equality operators when not required, and some bookkeeping.
................
r42539 | danieljames | 2008-01-06 17:48:11 +0000 (Sun, 06 Jan 2008) | 2 lines
Add the unordered library to the maintainers list.
................
r46579 | danieljames | 2008-06-21 16:32:11 +0100 (Sat, 21 Jun 2008) | 10 lines
Define unordered containers' friend functions outside of the class.
On some compilers, friend functions are being instantiated when the main class
is explicitly instantiated. This is slightly problematic because the equality
functions (which are an extension) put extra requirements on the types used. So
I'm going to try defining the functions outside of the class, in the hope that
they won't get instantiated. If someone wants non-member functions to be
instantiated, I think it's reasonable to expect them to explicitly instantiate
them, especially as compilers don't seem to be consistent about this.
................
r46587 | danieljames | 2008-06-21 20:58:39 +0100 (Sat, 21 Jun 2008) | 8 lines
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
................
r46588 | danieljames | 2008-06-21 21:11:26 +0100 (Sat, 21 Jun 2008) | 1 line
Markup an expected failure for unordered.
................
r46594 | danieljames | 2008-06-21 23:02:15 +0100 (Sat, 21 Jun 2008) | 19 lines
Merge inspect fixes for the unordered library.
Merged revisions 46470-46592 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46589 | danieljames | 2008-06-21 21:37:42 +0100 (Sat, 21 Jun 2008) | 2 lines
Fix some inspect errors (tabs and missing copyright/license).
................
r46591 | danieljames | 2008-06-21 21:47:51 +0100 (Sat, 21 Jun 2008) | 1 line
Move memory.hpp into the helpers subdirectory.
................
r46592 | danieljames | 2008-06-21 22:08:53 +0100 (Sat, 21 Jun 2008) | 1 line
Prevent inspect errors for unnamed namespaces in some of the test header files.
................
................
r46607 | danieljames | 2008-06-22 14:54:45 +0100 (Sun, 22 Jun 2008) | 9 lines
Extract the hash and equality functions from hash_table_data_*.
As these are extensions and add extra requirements to the container elements,
they shouldn't be part of hash_table_data_* so that they won't get instantiated
if an unordered container is explicitly instantiated.
Merged revisions 46594-46604 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
................
r46608 | danieljames | 2008-06-22 16:00:02 +0100 (Sun, 22 Jun 2008) | 5 lines
Remove the svnmerge integration information for the unordered branch.
Now that the unordered library is moving towards release, the main development
version is in trunk. New features will be developed on a new branch.
................
[SVN r46629]
2008-06-23 17:44:53 +00:00
|
|
|
UNORDERED_EQUALITY_SET_TEST(
|
|
|
|
(1), ==, (1001));
|
|
|
|
UNORDERED_EQUALITY_MAP_TEST(
|
|
|
|
((1)(2))((1001)(1)), ==, ((1001)(2))((1)(1)));
|
|
|
|
}
|
Merge in support for equality operators for the unordered containers and
hopefully better cross-platform support.
Merged revisions 44778-44835,44837-44918 via svnmerge from
https://svn.boost.org/svn/boost/branches/unordered/trunk
........
r44778 | danieljames | 2008-04-26 17:15:44 +0100 (Sat, 26 Apr 2008) | 2 lines
Remove a trailing comma.
........
r44779 | danieljames | 2008-04-26 17:23:51 +0100 (Sat, 26 Apr 2008) | 1 line
Merge in support for equality operators.
........
r44780 | danieljames | 2008-04-26 17:28:44 +0100 (Sat, 26 Apr 2008) | 1 line
Use my own list container to avoid working around STL container bugs.
........
r44833 | danieljames | 2008-04-28 08:03:43 +0100 (Mon, 28 Apr 2008) | 1 line
Better equality tests.
........
r44834 | danieljames | 2008-04-28 08:04:03 +0100 (Mon, 28 Apr 2008) | 1 line
Remove a superfluous check.
........
r44835 | danieljames | 2008-04-28 08:04:21 +0100 (Mon, 28 Apr 2008) | 1 line
Add equality reference documentation.
........
r44916 | danieljames | 2008-04-30 08:16:52 +0100 (Wed, 30 Apr 2008) | 1 line
New version of list.hpp
........
r44917 | danieljames | 2008-04-30 08:18:31 +0100 (Wed, 30 Apr 2008) | 1 line
Support compilers without ADL in the compile tests.
........
r44918 | danieljames | 2008-04-30 08:25:20 +0100 (Wed, 30 Apr 2008) | 7 lines
Change the typedef of buffered functions as it was confusing MSVC 6.5
get_allocator wasn't compiling when the allocator workaround is used because it
couldn't cast from the wrapped allocator to an allocator of another type. So
use value_alloc_ when it's available (it's only unavailable on compilers with
C++0x support, which don't require the workaround).
........
[SVN r44919]
2008-04-30 07:57:04 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
RUN_TESTS()
|