| #
2ac6babc |
| 21-Mar-2021 |
Arthur O'Dwyer <arthur.j.odwyer@gmail.com> |
[libc++] Move __libcpp_erase_if_container into <iterator>, and ADL-proof it.
The container headers don't need to include <functional> for any other reason (or at least, they wouldn't if we moved `le
[libc++] Move __libcpp_erase_if_container into <iterator>, and ADL-proof it.
The container headers don't need to include <functional> for any other reason (or at least, they wouldn't if we moved `less` and `equal_to` out of <functional>), so let's put `__libcpp_erase_if_container` somewhere that's common to the containers but outside of <functional>.
Also, calling `std::erase_if(c, pred)` should not trigger ADL.
Differential Revision: https://reviews.llvm.org/D99043
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc3 |
|
| #
09fa1d0e |
| 03-Mar-2021 |
Arthur O'Dwyer <arthur.j.odwyer@gmail.com> |
[libc++] Introduce __identity_t<T>. NFCI.
This is just a shorter synonym for `__identity<T>::type`. Use it consistently throughout, where possible.
There is still some metaprogramming in <memory> a
[libc++] Introduce __identity_t<T>. NFCI.
This is just a shorter synonym for `__identity<T>::type`. Use it consistently throughout, where possible.
There is still some metaprogramming in <memory> and <variant> where `__identity` is being used _without_ immediately calling `::type` on it; but this is the unusual case, and it will become even less usual as we start deliberately protecting certain types against deduction (e.g. D97742).
Differential Revision: https://reviews.llvm.org/D97862
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
| #
e5ec94a1 |
| 10-Nov-2020 |
Ruslan Arutyunyan <ruslan.arutyunyan@intel.com> |
[libc++] Implement P0919R3: heterogenous lookup for unordered containers
Implement heterogenous lookup for unordered containers, including the refinement from P1690R1.
Differential Revision: https:
[libc++] Implement P0919R3: heterogenous lookup for unordered containers
Implement heterogenous lookup for unordered containers, including the refinement from P1690R1.
Differential Revision: https://reviews.llvm.org/D87171
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6 |
|
| #
31e82037 |
| 02-Oct-2020 |
Louis Dionne <ldionne@apple.com> |
[libc++] NFCI: Simplify macro definitions for the debug mode
The debug mode always had three possibilities: - _LIBCPP_DEBUG is undefined => no assertions - _LIBCPP_DEBUG == 0 => some asserti
[libc++] NFCI: Simplify macro definitions for the debug mode
The debug mode always had three possibilities: - _LIBCPP_DEBUG is undefined => no assertions - _LIBCPP_DEBUG == 0 => some assertions - _LIBCPP_DEBUG == 1 => some assertions + iterator checks
This was documented that way, however the code did not make this clear at all. The discrepancy between _LIBCPP_DEBUG and _LIBCPP_DEBUG_LEVEL was especially confusing. I reworked how the various macros are defined without changing anything else to make the code clearer.
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
| #
3e895085 |
| 02-May-2020 |
Marek Kurdej <marek@quasardb.net> |
[libc++][P1115][C++20] Improving the Return Value of Erase-Like Algorithms II: Free erase/erase if.
Summary: This patch adds return type to std::erase and std::erase_if functions.
Also: * Update __
[libc++][P1115][C++20] Improving the Return Value of Erase-Like Algorithms II: Free erase/erase if.
Summary: This patch adds return type to std::erase and std::erase_if functions.
Also: * Update __cpp_lib_erase_if to 202002L. * Fix synopsis in unordered_map. * Fix generate_feature_test_macro_components.py script.
Reviewers: EricWF, mclow.lists, ldionne, #libc
Reviewed By: ldionne, #libc
Subscribers: broadwaylamb, zoecarver, dexonsmith, ldionne, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D75905
show more ...
|
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init |
|
| #
a17b1aed |
| 16-Jul-2019 |
Zoe Carver <z.zoelec2@gmail.com> |
Add contains method to associative containers. This patch implements P0458R2, adding contains to map, multimap, unordered_map, unordered_multimap, set, multiset, unordered_set, and unordered_multiset
Add contains method to associative containers. This patch implements P0458R2, adding contains to map, multimap, unordered_map, unordered_multimap, set, multiset, unordered_set, and unordered_multiset.
llvm-svn: 366170
show more ...
|
| #
296a8010 |
| 11-Jul-2019 |
Louis Dionne <ldionne@apple.com> |
[libc++] Implement deduction guides for <unordered_set>
Thanks to Arthur O'Dwyer for the patch. Differential Revision: https://reviews.llvm.org/D58617
llvm-svn: 365788
|
|
Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2 |
|
| #
a2a1ec27 |
| 29-May-2019 |
Louis Dionne <ldionne@apple.com> |
[NFC][libcxx] Remove trailing whitespace
It's incredibly annoying when trying to create diffs
llvm-svn: 361981
|
|
Revision tags: llvmorg-8.0.1-rc1 |
|
| #
7c142fcc |
| 11-Apr-2019 |
Louis Dionne <ldionne@apple.com> |
[libc++] Make sure we don't eagerly diagnose non-const comparators for containers of incomplete types
Summary: In r348529, I improved the library-defined diagnostic for using containers with a non-c
[libc++] Make sure we don't eagerly diagnose non-const comparators for containers of incomplete types
Summary: In r348529, I improved the library-defined diagnostic for using containers with a non-const comparator/hasher. However, the check is now performed too early, which leads to the diagnostic being emitted in cases where it shouldn't. See PR41360 for details.
This patch moves the diagnostic to the destructor of the containers, which means that the diagnostic will only be emitted when the container is instantiated at a point where the comparator and the key/value are required to be complete. We still retain better diagnostics than before r348529, because the diagnostics are performed in the containers themselves instead of __tree and __hash_table.
As a drive-by fix, I improved the diagnostic to mention that we can't find a _viable_ const call operator, as suggested by EricWF in PR41360.
Reviewers: EricWF, mclow.lists
Subscribers: christof, jkorous, dexonsmith, libcxx-commits, zoecarver
Tags: #libc
Differential Revision: https://reviews.llvm.org/D60540
llvm-svn: 358189
show more ...
|
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
| #
57b08b09 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update more file headers across all of the LLVM projects in the monorepo to reflect the new license. These used slightly different spellings that defeated my regular expressions.
We understand that
Update more file headers across all of the LLVM projects in the monorepo to reflect the new license. These used slightly different spellings that defeated my regular expressions.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351648
show more ...
|
| #
f60c63c0 |
| 14-Dec-2018 |
Marshall Clow <mclow.lists@gmail.com> |
Implement P1209 - Adopt Consistent Container Erasure from Library Fundamentals 2 for C++20. Reviewed as https://reviews.llvm.org/D55532
llvm-svn: 349178
|
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3 |
|
| #
3560fbf3 |
| 06-Dec-2018 |
Louis Dionne <ldionne@apple.com> |
[libc++] Improve diagnostics for non-const comparators and hashers in associative containers
Summary: When providing a non-const-callable comparator in a map or set, the warning diagnostic does not
[libc++] Improve diagnostics for non-const comparators and hashers in associative containers
Summary: When providing a non-const-callable comparator in a map or set, the warning diagnostic does not include the point of instantiation of the container that triggered the warning, which makes it difficult to track down the problem. This commit improves the diagnostic by placing it directly in the body of the associative container.
The same change is applied to unordered associative containers, which had a similar problem.
Finally, this commit cleans up the forward declarations of several map and unordered_map helpers, which are not needed anymore.
<rdar://problem/41370747>
Reviewers: EricWF, mclow.lists
Subscribers: christof, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D48955
llvm-svn: 348529
show more ...
|
|
Revision tags: llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
| #
5c4e07ae |
| 31-Oct-2018 |
Erik Pilkington <erik.pilkington@gmail.com> |
Second half of C++17's splicing maps and sets
This commit adds a merge member function to all the map and set containers, which splices nodes from the source container. This completes support for P0
Second half of C++17's splicing maps and sets
This commit adds a merge member function to all the map and set containers, which splices nodes from the source container. This completes support for P0083r3.
Differential revision: https://reviews.llvm.org/D48896
llvm-svn: 345744
show more ...
|
|
Revision tags: llvmorg-7.0.0 |
|
| #
f56972e2 |
| 12-Sep-2018 |
Marshall Clow <mclow.lists@gmail.com> |
Implement the infrastructure for feature-test macros. Very few actual feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955
llvm-svn: 342073
|
|
Revision tags: llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
| #
b0386a51 |
| 01-Aug-2018 |
Erik Pilkington <erik.pilkington@gmail.com> |
First half of C++17's splicing maps and sets
This commit adds a node handle type, (located in __node_handle), and adds extract() and insert() members to all map and set types, as well as their imple
First half of C++17's splicing maps and sets
This commit adds a node handle type, (located in __node_handle), and adds extract() and insert() members to all map and set types, as well as their implementations in __tree and __hash_table.
The second half of this feature is adding merge() members, which splice nodes in bulk from one container into another. This will be committed in a follow-up.
Differential revision: https://reviews.llvm.org/D46845
llvm-svn: 338472
show more ...
|
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2 |
|
| #
72c8fad4 |
| 15-Nov-2017 |
Marshall Clow <mclow.lists@gmail.com> |
First part of P0600 - '[[nodiscard] in the standard library'. Mark the 'empty()' methods of all the containers as nodiscard. If you're calling empty() w/o looking at the result, you probably meanto t
First part of P0600 - '[[nodiscard] in the standard library'. Mark the 'empty()' methods of all the containers as nodiscard. If you're calling empty() w/o looking at the result, you probably meanto to call 'clear()'. c++2a only
llvm-svn: 318269
show more ...
|
|
Revision tags: llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1 |
|
| #
f0f86ef9 |
| 18-Apr-2017 |
Eric Fiselier <eric@efcs.ca> |
Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in std::unordered_set and std::unordered_multiset
llvm-svn: 300619
|
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1 |
|
| #
e2f2d1ed |
| 04-Jan-2017 |
Eric Fiselier <eric@efcs.ca> |
[NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS
The name _LIBCPP_TYPE_VIS_ONLY is no longer accurate because both _LIBCPP_TYPE_VIS and _LIBCPP_TYPE_VIS_ONLY expand to __attribute__((__typ
[NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS
The name _LIBCPP_TYPE_VIS_ONLY is no longer accurate because both _LIBCPP_TYPE_VIS and _LIBCPP_TYPE_VIS_ONLY expand to __attribute__((__type_visibility__)) with Clang. The only remaining difference is that _LIBCPP_TYPE_VIS_ONLY can be applied to templates whereas _LIBCPP_TYPE_VIS cannot (due to dllimport/dllexport not being allowed on templates).
This patch renames _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS.
llvm-svn: 291035
show more ...
|
|
Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
| #
cd31b434 |
| 22-Apr-2016 |
Evgeniy Stepanov <eugeni.stepanov@gmail.com> |
Cleanup: move visibility/linkage attributes to the first declaration.
http://reviews.llvm.org/D15404
llvm-svn: 267093
|
|
Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1, llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1 |
|
| #
e3fbe143 |
| 13-Jul-2015 |
Marshall Clow <mclow.lists@gmail.com> |
Implement the first part of N4258: 'Cleaning up noexcept in the Library'. This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than
Implement the first part of N4258: 'Cleaning up noexcept in the Library'. This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates.
llvm-svn: 242056
show more ...
|
|
Revision tags: llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1 |
|
| #
ec392968 |
| 10-May-2015 |
Marshall Clow <mclow.lists@gmail.com> |
Fix for LWG Issue 2059: C++0x ambiguity problem with map::erase
llvm-svn: 236950
|
|
Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1, llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3 |
|
| #
c1bd9197 |
| 10-Aug-2014 |
Eric Fiselier <eric@efcs.ca> |
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 curr
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
show more ...
|
|
Revision tags: llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1, llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1, llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1 |
|
| #
45b983c4 |
| 30-Sep-2013 |
Marshall Clow <mclow.lists@gmail.com> |
Part 8 of LWG Issue 2210' unordered_set and unordered multiset; this got missed when I went on vacation
llvm-svn: 191705
|
| #
f0544c20 |
| 12-Aug-2013 |
Howard Hinnant <hhinnant@apple.com> |
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
|
| #
b24c8024 |
| 23-Jul-2013 |
Howard Hinnant <hhinnant@apple.com> |
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 lo
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
show more ...
|