Commit Graph

40 Commits

Author SHA1 Message Date
Marshall Clow 0aacbc92df Fix bug 20740 - std::set/std::map don't support heterogeneous lookup for count(). Thanks to Jim Porter for the bug report
llvm-svn: 216353
2014-08-24 23:54:16 +00:00
Marshall Clow c303bba184 Remove some unnecessary noexcept conditions. Thanks to Richard Smith for the catch.
llvm-svn: 206424
2014-04-16 23:12:55 +00:00
Marshall Clow 415a24e41f Fix bug I introduced (enabling implicit conversions from compare function to map) in r202994. Thanks to Sebastian Redl for the catch.
llvm-svn: 203443
2014-03-10 04:50:10 +00:00
Marshall Clow 78a87e8a68 Implement LWG 2193. Default constructors for standard library containers are explicit. Note that libc++ already did this for string/deque/forward_list/list/vector and the unordered containers; implement it for set/multiset/map/multimap. Add tests for all the containers. Two drive-by fixes as well: add a missing explicit in <deque>, and remove a tab that snuck into a container test. This issue is also LLVM bug 15724, and resolves it.
llvm-svn: 202994
2014-03-05 19:06:20 +00:00
Marshall Clow 74cf6ff5e5 Fix for PR18735 - self-assignment for map/multimap gives incorrect results in C++03
llvm-svn: 201021
2014-02-08 04:03:14 +00:00
Howard Hinnant 9fd9f84f48 SCARY/N2913 iterator support between the multi and non-multi versions of the associative and unordered containers. I beleive lack of support for this was accidentally recently introduced (by me) and this is fixing a regression. This time tests are put in to prevent such a regression in the future.
llvm-svn: 191692
2013-09-30 19:08:22 +00:00
Howard Hinnant 872ac4b5f0 A collection of minor type-o fixes. The first two aren't testable, but all tests pass with them. I stumbled across them while experimenting with a std::move that checks its argument for non-const. The third corrects a test that is currently failing.
llvm-svn: 190563
2013-09-12 00:10:44 +00:00
Marshall Clow fbc317d480 LWG Issue #2210 Part 5 - map/multimap; no, really - the last one was set/multiset. THIS is map/multimap
llvm-svn: 190474
2013-09-11 01:15:47 +00:00
Howard Hinnant 179b1f8cf2 Zhihao Yuan noted that there were a few unneeded statements. Eliminated the unnecessary ones, and commented the ones that are there for non-obvious reasons such as to help things limp along in C++03 language mode.
llvm-svn: 189039
2013-08-22 18:29:50 +00:00
Marshall Clow 2585835c3b Second half (map/multimap) of N3657
llvm-svn: 188320
2013-08-13 22:18:47 +00:00
Howard Hinnant f0544c2086 Nico Rieck: this patch series fixes visibility issues on Windows as explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>.
llvm-svn: 188192
2013-08-12 18:38:34 +00:00
Howard Hinnant abb160e689 Remove implicit conversion from __value_type to value_type in [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16549
llvm-svn: 185711
2013-07-05 18:06:00 +00:00
Howard Hinnant 4a95f9eb7e Removed extension in [unordered_][multi]map which allowed one to emplace using just an argument for the key, as opposed to using piecewise_construct. However a bug report exposed that this created an unfortunate ambiguity. People who are currently using the extension will be notified the next time they compile, and will have to change to using piecewise_construct. There are no ABI issues with the removal of this extension. This fixes http://llvm.org/bugs/show_bug.cgi?id=16542
llvm-svn: 185666
2013-07-04 20:59:16 +00:00
Howard Hinnant bbdf669bde Simplify comparators of [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16538
llvm-svn: 185665
2013-07-04 19:46:35 +00:00
Howard Hinnant 07d3eccd26 Implement full support for non-pointer types in custom allocators. This is for the associative containers only. This work still needs to be done on the unordered and sequence containers. Fixes http://llvm.org/bugs/show_bug.cgi?id=15978
llvm-svn: 184358
2013-06-19 21:29:40 +00:00
Howard Hinnant 6e41256f68 No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
llvm-svn: 176593
2013-03-06 23:30:19 +00:00
Howard Hinnant 8b805c915a The rules for emplace in map, multimap, unordered_map and unordered_multimap 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
2012-05-25 22:04:21 +00:00
Howard Hinnant 42b8bb5033 Fix http://llvm.org/bugs/show_bug.cgi?id=11461. Credit Alberto Ganesh Barbati.
llvm-svn: 146345
2011-12-11 20:31:33 +00:00
Howard Hinnant c003db1fca Further macro protection by replacing _[A-Z] with _[A-Z]p
llvm-svn: 145410
2011-11-29 18:15:50 +00:00
Howard Hinnant 073458b1ab Windows support by Ruben Van Boxem.
llvm-svn: 142235
2011-10-17 20:05:10 +00:00
Howard Hinnant 54976f2619 Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574
llvm-svn: 137522
2011-08-12 21:56:02 +00:00
Howard Hinnant 5a33687da0 Correct for new rules regarding implicitly deleted special members. http://llvm.org/bugs/show_bug.cgi?id=10191
llvm-svn: 134248
2011-07-01 19:24:36 +00:00
Howard Hinnant ce48a1137d _STD -> _VSTD to avoid macro clash on windows
llvm-svn: 134190
2011-06-30 21:18:19 +00:00
Howard Hinnant a945a32981 More fixes: One of my fixes to type_traits earlier today was incorrect, so that is reverted. Recently clang appears to have tightened up its definition of is_convertible and that has caused some failures in [unordered_][multi]map. I've switched to using is_constructible to restablish the desired functionality in [unordered_][multi]map. Specifically, inserting rvalues of move-only types for the keys.
llvm-svn: 133402
2011-06-19 21:45:00 +00:00
Howard Hinnant ce53420e37 Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools.
llvm-svn: 133008
2011-06-14 19:58:17 +00:00
Howard Hinnant 0e9f71c13f noexcept for <set>. Plus a few fixes to noexcept for <map>.
llvm-svn: 132640
2011-06-04 15:22:34 +00:00
Howard Hinnant 1052ee39cb noexcept for <map>.
llvm-svn: 132639
2011-06-04 14:31:57 +00:00
Howard Hinnant 40dab2ce86 http://llvm.org/bugs/show_bug.cgi?id=9672
llvm-svn: 129266
2011-04-11 02:18:41 +00:00
Howard Hinnant 73736effce Fixed two problems found by Chris Jefferson: Made operator>> for char consistent with gcc. Opened an LWG issue on this one. 2) Renamed some private typedefs which are causing boost grief.
llvm-svn: 126576
2011-02-27 18:02:02 +00:00
Howard Hinnant a0fe8c436e Chris Jefferson noted many places where function calls needed to be qualified (thanks Chris).
llvm-svn: 125510
2011-02-14 19:12:38 +00:00
Howard Hinnant 72c5e14203 Qualify calls to addressof with std::. Bug 9106
llvm-svn: 124726
2011-02-02 17:36:20 +00:00
Howard Hinnant ab061a656d Marshall Clow's fix for Bug 8421.
llvm-svn: 122825
2011-01-04 19:21:05 +00:00
Howard Hinnant 412dbebe1b license change
llvm-svn: 119395
2010-11-16 22:09:02 +00:00
Howard Hinnant 848a5374d0 visibility-decoration.
llvm-svn: 114551
2010-09-22 16:48:34 +00:00
Howard Hinnant 959cf8aede Fix whitespace
llvm-svn: 113089
2010-09-04 23:46:48 +00:00
Howard Hinnant 7609c9b665 Changed __config to react to all of clang's currently documented has_feature 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
2010-09-04 23:28:19 +00:00
Howard Hinnant b3371f6f49 Fixing whitespace problems
llvm-svn: 111750
2010-08-22 00:02:43 +00:00
Howard Hinnant 54b409fdb9 now works with -fno-exceptions and -fno-rtti
llvm-svn: 110828
2010-08-11 17:04:31 +00:00
Howard Hinnant 5b08a8a432 Wiped out some non-ascii characters that snuck into the copyright.
llvm-svn: 103516
2010-05-11 21:36:01 +00:00
Howard Hinnant 3e519524c1 libcxx initial import
llvm-svn: 103490
2010-05-11 19:42:16 +00:00