Marshall Clow
bc4c89a977
The rest of N4279 and LWG#2464 - for unordered_map
...
llvm-svn: 241555
2015-07-07 05:45:35 +00:00
Eric Fiselier
ee187e247b
[libcxx] Fix detection of __is_final.
...
Summary: Currently we only enable the use of __is_final(...) with Clang. GCC also provides __is_final(...) since 4.7 in all standard modes. This patch creates the macro _LIBCPP_HAS_IS_FINAL to note the availability of `__is_final`.
Reviewers: danalbert, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8795
llvm-svn: 239664
2015-06-13 07:08:02 +00:00
Marshall Clow
ec39296875
Fix for LWG Issue 2059: C++0x ambiguity problem with map::erase
...
llvm-svn: 236950
2015-05-10 13:35:00 +00:00
Marshall Clow
2764799450
Replace two naked references of 'std::' with the macro '_VSTD::'. No functionality change.
...
llvm-svn: 236593
2015-05-06 12:11:22 +00:00
Marshall Clow
1f508014df
In many places, there was an #ifdef/#else block that selected one of two implmentations of rebind_alloc based on whether or not we had template aliases. Create a helper struct to encapsulate that bit of logic, and replace all the ifdefs with uses of that struct. No functionality change intented.
...
llvm-svn: 234296
2015-04-07 05:21:38 +00:00
Eric Fiselier
c1bd9197eb
NFC. Move definition of _LIBCPP_ASSERT into __debug header and remove external include guards.
...
Things done in this patch:
1. Make __debug include __config since it uses macros from it.
2. The current method of defining _LIBCPP_ASSERT is prone to redefinitions. Move
the null _LIBCPP_ASSERT definition into the __debug header to prevent this.
3. Remove external <__debug> include gaurds. <__debug> guards almost all of its
contents internally. There is no reason to be doing it externally.
This patch should not change any functionality.
llvm-svn: 215332
2014-08-10 23:53:08 +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
Marshall Clow
3cd37e6456
LWG Issue 2210 (Part #6 ): unordered_map and unordered_multimap
...
llvm-svn: 190576
2013-09-12 03:00:31 +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
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
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
4c80bfbd53
Debug mode for unordered_multimap. Some mods were done for unordered_map as well to keep all the tests passing. However unordered_map is at the very least still missing tests, if not functionality (if it isn't tested, it probably isn't working).
...
llvm-svn: 187446
2013-07-30 21:04:42 +00:00
Howard Hinnant
b24c802489
Debug mode for unordered_set. I believe this to be fairly complete for
...
unordered_set, however it is not complete yet for unordered_multiset,
unordered_map or unordered_multimap. There has been a lot of work done
for these other three containers, however that work was done just to
keep all of the tests passing.
You can try this out with -D_LIBCPP_DEBUG2. You will have to link to a
libc++.dylib that has been compiled with src/debug.cpp. So far, vector
(but not vector<bool>), list, and unordered_set are treated. I hope to
get the other three unordered containers up fairly quickly now that
unordered_set is done.
The flag _LIBCPP_DEBUG2 will eventually be changed to _LIBCPP_DEBUG, but
not today. This is my second effort at getting debug mode going for
libc++, and I'm not quite yet ready to throw all of the work under the
first attempt away.
The basic design is that all of the debug information is kept in a
central database, instead of in the containers. This has been done as
an attempt to have debug mode and non-debug mode be ABI compatible with
each other. There are some circumstances where if you construct a
container in an environment without debug mode and pass it into debug
mode, the checking will get confused and let you know with a readable
error message. Passing containers the other way: from debug mode out to
a non-debugging mode container should be 100% safe (at least that is the
goal).
llvm-svn: 186991
2013-07-23 22:01:58 +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
307f814372
Implement full support for non-pointer types in custom allocators. This is for the unordered containers only. This work still needs to be done on the sequence containers.
...
llvm-svn: 184635
2013-06-22 15:21:29 +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
a1a9e77122
As an extension, support incomplete types in the unordered containers to match what we already do in the associative containers.
...
llvm-svn: 146376
2011-12-12 17:26:24 +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
7e6ca972c9
http://llvm.org/bugs/show_bug.cgi?id=10455
...
llvm-svn: 135854
2011-07-23 16:14:35 +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
3714107ed6
noexcept for <unordered_map>.
...
llvm-svn: 132646
2011-06-04 18:54:24 +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
412dbebe1b
license change
...
llvm-svn: 119395
2010-11-16 22:09:02 +00:00
Howard Hinnant
789847ddbb
visibility-decoration sweep completed.
...
llvm-svn: 114685
2010-09-23 18:58:28 +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
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