summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers
Commit message (Collapse)AuthorAgeFilesLines
...
* Added static_assert to std::get<N>(std::array) calls to catch "out of ↵Marshall Clow2012-12-181-0/+25
| | | | | | bounds" calls llvm-svn: 170435
* constexpr applied to <array>.Howard Hinnant2012-07-201-0/+14
| | | | llvm-svn: 160564
* Add test for self-referencing emplace test.Howard Hinnant2012-07-091-0/+34
| | | | llvm-svn: 159921
* This commit establishes a new bucket_count policy in the unordered ↵Howard Hinnant2012-07-064-4/+4
| | | | | | containers: The policy now allows a power-of-2 number of buckets to be requested (and that request honored) by the client. And if the number of buckets is set to a power of 2, then the constraint of the hash to the number of buckets uses & instead of %. If the client does not specify a number of buckets, then the policy remains unchanged: a prime number of buckets is selected. The growth policy is that the number of buckets is roughly doubled when needed. While growing, either the prime, or the power-of-2 strategy will be preserved. There is a small run time cost for putting in this switch. For very cheap hash functions, e.g. identity for int, the cost can be as high as 18%. However with more typical use cases, e.g. strings, the cost is in the noise level. I've measured cases with very cheap hash functions (int) that using a power-of-2 number of buckets can make look up about twice as fast. However I've also noted that a power-of-2 number of buckets is more susceptible to accidental catastrophic collisions. Though I've also noted that accidental catastrophic collisions are also possible when using a prime number of buckets (but seems far less likely). In short, this patch adds an extra tuning knob for those clients trying to get the last bit of performance squeezed out of their hash containers. Casual users of the hash containers will not notice the introduction of this tuning knob. Those clients who swear by power-of-2 hash containers can now opt-in to that strategy. Clients who prefer a prime number of buckets can continue as they have. llvm-svn: 159836
* The rules for emplace in map, multimap, unordered_map and unordered_multimap ↵Howard Hinnant2012-05-259-12/+33
| | | | | | changed a while back and I'm just now updating to these new rules. In a nutshell, you've got to know you're emplacing to a pair and use one of pair's constructors. I made one extension: If you want to emplace the key and default construct the mapped_type, you can just emplace(key), as opposed to emplace(piecewise_construct, forward_as_tuple(key), forward_as_tuple()). llvm-svn: 157503
* unord test fixes by Edward MeewisHoward Hinnant2011-12-0273-93/+166
| | | | llvm-svn: 145707
* Another installment on debug mode. This addresses list. However this ↵Howard Hinnant2011-09-271-0/+3
| | | | | | should be considered a temporary state. The API of the debug database and how vector and list use it, is unsatisfactory at the moment. It is both inefficient and overly verbose. I wanted to get this functionality checked in though. In the next day or so I'll refactor what is there in an attempt to streamline things. llvm-svn: 140660
* The vector test suite now passes for no-debug, debug-lite and debug-regularHoward Hinnant2011-09-161-0/+3
| | | | llvm-svn: 139930
* Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574Howard Hinnant2011-08-1273-146/+146
| | | | llvm-svn: 137522
* noexcept for <stack>. This completes noexcept for Chapter 23 [containers].Howard Hinnant2011-06-045-0/+148
| | | | llvm-svn: 132652
* noexcept for <queue>.Howard Hinnant2011-06-0410-0/+300
| | | | llvm-svn: 132650
* noexcept for <unordered_set>.Howard Hinnant2011-06-0410-0/+690
| | | | llvm-svn: 132647
* noexcept for <unordered_map>.Howard Hinnant2011-06-0410-0/+690
| | | | llvm-svn: 132646
* noexcept for <set>. Plus a few fixes to noexcept for <map>.Howard Hinnant2011-06-0421-12/+548
| | | | llvm-svn: 132640
* noexcept for <map>.Howard Hinnant2011-06-0410-0/+536
| | | | llvm-svn: 132639
* noexcept for <vector>. This also includes installing move_if_noexcept() ↵Howard Hinnant2011-06-0310-0/+523
| | | | | | into vector. llvm-svn: 132577
* noexcept for <list>.Howard Hinnant2011-06-035-0/+264
| | | | llvm-svn: 132562
* noexcept for <forward_list>.Howard Hinnant2011-06-036-0/+268
| | | | llvm-svn: 132553
* After sleeping on it I've decided that all special members that can be ↵Howard Hinnant2011-06-032-0/+98
| | | | | | noexcept, should be declared so. The client has the traits to detect and branch on this information, and it is often an important optimization. Give deque() a noexcept. Add test for deque default constructor and deque destructor. llvm-svn: 132549
* Add noexcept tests for deque.Howard Hinnant2011-06-033-0/+162
| | | | llvm-svn: 132523
* Suppress some warings in the tests.Howard Hinnant2011-05-131-1/+1
| | | | llvm-svn: 131326
* Corrected tests for http://llvm.org/bugs/show_bug.cgi?id=9351Howard Hinnant2011-04-044-76/+5
| | | | llvm-svn: 128807
* ... And these wonderful tests.Howard Hinnant2011-04-034-0/+96
| | | | llvm-svn: 128797
* Bug 9096 - list::iterator not default constructibleHoward Hinnant2011-01-2814-10/+263
| | | | llvm-svn: 124508
* LWG 1191Howard Hinnant2010-11-171-0/+29
| | | | llvm-svn: 119545
* license changeHoward Hinnant2010-11-16740-1480/+1480
| | | | llvm-svn: 119395
* Fix two test bugsHoward Hinnant2010-10-142-4/+2
| | | | llvm-svn: 116515
* Updated by-chapter-summary with weekly test results, and fixed up some bad ↵Howard Hinnant2010-09-0836-41/+41
| | | | | | paths in some tests caused by aligning the test suite with N3126. llvm-svn: 113403
* sync with N3126Howard Hinnant2010-09-0583-0/+0
| | | | llvm-svn: 113101
* Changed __config to react to all of clang's currently documented has_feature ↵Howard Hinnant2010-09-04206-455/+455
| | | | | | flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature. llvm-svn: 113086
* Fixing whitespace problemsHoward Hinnant2010-08-22268-585/+574
| | | | llvm-svn: 111755
* US 117Howard Hinnant2010-08-212-13/+26
| | | | llvm-svn: 111745
* LWG 1278Howard Hinnant2010-08-193-6/+6
| | | | llvm-svn: 111532
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-11740-740/+740
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-11750-0/+50298
llvm-svn: 103490
OpenPOWER on IntegriCloud