Commit Graph
179 Commits
Author SHA1 Message Date
Daniel James b1912055a9 Unordered: Fix some errors in the equality tests.
[SVN r71363]
2011-04-17 21:27:38 +00:00
Daniel James e8714d79b2 Unordered: Implement C++0x equality.
[SVN r71354]
2011-04-17 16:23:25 +00:00
Daniel James 547e141166 Unordered: Overhaul the implementation.
Store nodes in a single linked list, with hash values so that their
buckets can be found when needed. Iterators now only have to store a
pointer to the node and don't have to iterate over empty buckets to
reach the next node. This allows the container to meet the iterator
requirements - fixing the speed issues with `equal_range` and `erase`.

Also, define iterators in their own namespace, so that they don't
accidentally pull in detail functions via ADL.

I've simplified the code slightly by removing some of the special
cases for empty containers. Renamed a few things as well and other
minor changes that were made as I went along.

[SVN r71327]
2011-04-16 18:47:33 +00:00
Daniel James d9c49a6cde Don't require explicit conversion in pairs in unordered's insert tests.
In the draft standard the std::pair constructor from another pair is
only considered when overloading if both members are implicitly
constructible to their corresponding members. This breaks one of the
unordered tests which required an explicit conversion, so change it to
only require an implicit conversion.

[SVN r70028]
2011-03-16 21:34:08 +00:00
Daniel James 8ade57b9e3 Remove workaround for ancient gcc verisons.
[SVN r70027]
2011-03-16 21:33:41 +00:00
Daniel James a4750fbdba Make unnecessary_copy_tests a bit more lenient.
I'm not sure if those extra moves are avoidable, but I'll allow them for
now. They shouldn't hurt much.

[SVN r68446]
2011-01-25 20:15:27 +00:00
Daniel James 4d57147c3d Fix tabs and files without copyright.
[SVN r67612]
2011-01-03 12:43:34 +00:00
Daniel James 3d7abd9cbe Avoid -Wconversion warnings in unordered & hash.
[SVN r67170]
2010-12-11 14:43:00 +00:00
Daniel James df726c038f Remove some 'always_show_run_output' flags.
[SVN r66566]
2010-11-14 11:42:58 +00:00
Daniel James 14e0e1afc2 Less use of the ampersand operator in unordered.
[SVN r66557]
2010-11-13 12:31:54 +00:00
Daniel James eb04f68351 Call forward declared functions from templates in unordered tests.
Borland is having some issues with the existing tests, since they call
inline functions before they're defined. It might be right to, although
all the other compilers are fine with it. But the test isn't really what
the forward headers are intended for. Try to make the tests better
represent the intent, and possibly work on Borland.

[SVN r66428]
2010-11-07 14:43:50 +00:00
Daniel James 1b85f812af Missing copy_iterator methods.
[SVN r66137]
2010-10-21 20:34:39 +00:00
Daniel James daad24388c Fix iterator insert bug in unordered_set/unordered_map.
[SVN r66136]
2010-10-21 20:23:37 +00:00
Daniel James 3a13ddb4a3 Don't use _GLIBCXX_DEBUG on darwin.
It isn't supported by Apple's gcc 4.2.

[SVN r63449]
2010-06-30 12:04:41 +00:00
Daniel James ea33b5d134 Fix clang warnings in unordered tests.
[SVN r61505]
2010-04-23 07:26:43 +00:00
Daniel James ee034e23bb Add quick_erase to the unordered containers. Refs #3966.
[SVN r60754]
2010-03-22 00:42:07 +00:00
Daniel James 1d02663275 Try to avoid a warning.
[SVN r59956]
2010-02-26 20:50:21 +00:00
Daniel James e594f1eda7 Remove deprecated macros for hash and unordered's tests.
[SVN r59708]
2010-02-16 22:33:10 +00:00
Daniel James 71096f4d26 Formatting changes, mostly to fit within 80 characters.
Also, some C casts converted to static_cast.

[SVN r58692]
2010-01-04 22:49:39 +00:00
Daniel James b99382b551 Add templated find overload for compatible keys.
[SVN r58405]
2009-12-15 22:53:33 +00:00
Daniel James 4e6292b439 Implement an alternative erase function that doesn't return an iterator.
Ref #3693

[SVN r58403]
2009-12-15 22:52:52 +00:00
Daniel James 618a51df13 Turn off warnings as errors on gcc/darwin because the integer library currently causes some warnings.
[SVN r58394]
2009-12-15 13:16:32 +00:00
Daniel James 18a5010436 Remove use of iterator_adaptor in unordered tests.
[SVN r58144]
2009-12-04 19:44:34 +00:00
Daniel James c8b893cb77 Workaround codegear ICE.
It seems that the problem is calling sizeof on a dependent type when the
containers have only been used by reference. So by putting in these
dummy structures with the containers as members, it helps the compiler
instantiate the class to the level where sizeof works. I hope.

[SVN r58130]
2009-12-04 00:51:50 +00:00
Daniel James 7f59e8e058 Better testing of incomplete types.
[SVN r57975]
2009-11-27 19:43:06 +00:00
Daniel James 7023460394 Suppress a warning that's in the windows mobile system headers.
[SVN r57963]
2009-11-26 23:15:30 +00:00
Daniel James 0dcf1b5cd2 Fix the version check when suppressing warnings.
[SVN r57962]
2009-11-26 23:14:53 +00:00
Daniel James 7b2c5189b3 Suppress some warnings on visual c++ 7.1.
[SVN r57921]
2009-11-25 09:14:16 +00:00
Daniel James d3fe62a646 Try to avoid an odd warning from Visual C++
[SVN r57919]
2009-11-25 09:09:25 +00:00
Daniel James 3882a61065 Inspect fixes.
[SVN r57838]
2009-11-21 19:40:28 +00:00
Daniel James df72c4886f Support incomplete template parameters to unordered containers.
[SVN r57798]
2009-11-20 08:03:26 +00:00
Daniel James 55957bbab5 Some more warning fixes for Visual C++ 7.1
[SVN r57719]
2009-11-16 23:56:37 +00:00
Daniel James 5747836754 Change unordered move tests to be more lenient on compilers without NRVO. Will probably need to reintroduce some of the failure markup later.
[SVN r57550]
2009-11-10 18:17:53 +00:00
Daniel James ba5c383877 Stricter warnings for unordered and hash.
There are still warnings in hash_complex_test.

[SVN r57537]
2009-11-10 08:15:55 +00:00
Daniel James 060acb3f25 Slightly rearrange the unordered container headers so that prev_prime is defined before it's used.
[SVN r57152]
2009-10-25 10:55:08 +00:00
Daniel James 8727de1a1b Remove insert empty initializer lists, as there's a bug in gcc.
[SVN r57151]
2009-10-25 10:54:53 +00:00
Daniel James 8cde8d1252 Fix the intel strict flag.
[SVN r57150]
2009-10-25 10:54:28 +00:00
Daniel James 6bac25221a Fix unordered for intel strict.
[SVN r57139]
2009-10-24 17:53:03 +00:00
Daniel James 5bedbde746 Update the intel compile flags.
[SVN r57126]
2009-10-24 11:56:30 +00:00
Daniel James 2fdd33381c Fix allocator for construct from initializer list.
[SVN r57006]
2009-10-19 19:32:09 +00:00
Troy D. Straszheim 51fdfa7ac7 rm cmake from trunk. I'm not entirely sure this is necessary to satisfy the inspect script, but I'm not taking any chances, and it is easy to put back
[SVN r56942]
2009-10-17 02:07:38 +00:00
Daniel James 3dff89c240 Correct macro checks for initializer lists.
[SVN r56844]
2009-10-14 20:30:48 +00:00
Daniel James 4e07c94502 Copy the unordered and hash CMake files from release.
[SVN r56704]
2009-10-10 15:09:02 +00:00
Daniel James 373791d0b2 Detab.
[SVN r56571]
2009-10-04 10:37:56 +00:00
Daniel James fe3d612fe0 Clean up some unordered TODOs.
[SVN r56570]
2009-10-04 10:37:36 +00:00
Daniel James ae0c97a77a Make sure inserting from a range of types other than the value type is better tested.
[SVN r56562]
2009-10-03 16:42:20 +00:00
Daniel James 1e24f85fbc Insert using initializer lists.
[SVN r56560]
2009-10-03 16:41:32 +00:00
Daniel James 4601f5c51f Stricter insert exception tests.
[SVN r56559]
2009-10-03 16:41:11 +00:00
Daniel James d0a3efab6a Just remove the test since the test itself doesn't work on most compilers.
[SVN r56468]
2009-09-29 07:46:44 +00:00
Daniel James 2b8680d2c4 Remove the optimization for std::pair with a key reference. It'll be too much hassle to get a very unusual use case to work on all compilers.
[SVN r56461]
2009-09-28 23:06:03 +00:00