| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Refactor the recent implicit default constructor changes to match the
existing SFINAE style.
llvm-svn: 373263
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
LWG2510 makes tag types like allocator_arg_t explicitly default
constructible instead of implicitly default constructible. It also
makes the constructors for std::pair and std::tuple conditionally
explicit based on the explicit-ness of the default constructibility
for the pair/tuple's elements.
This was previously committed as r372777 and reverted in r372832 due to
the commit breaking LLVM's build in C++14 mode. This issue has now been
addressed.
Reviewers: mclow.lists
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65161
llvm-svn: 372983
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also reverts:
- r372778: [libc++] Implement LWG 3158
- r372782: [libc++] Try fixing tests that fail on GCC 5 and older
- r372787: Purge mentions of GCC 4 from the test suite
Reason: the change breaks compilation of LLVM with libc++, for details see
http://lists.llvm.org/pipermail/libcxx-dev/2019-September/000599.html
llvm-svn: 372832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
LWG2510 makes tag types like allocator_arg_t explicitly default
constructible instead of implicitly default constructible. It also
makes the constructors for std::pair and std::tuple conditionally
explicit based on the explicit-ness of the default constructibility
for the pair/tuple's elements.
Reviewers: mclow.lists, EricWF
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65161
llvm-svn: 372777
|
|
|
|
|
|
| |
NFC. Thanks to @Quuxplusone (Arthur O'Dwyer) for this change.
llvm-svn: 371639
|
|
|
|
|
|
|
| |
The constructors for std::pair and std::tuple have been made conditionally
explicit, however the synopsis in the headers do not reflect that.
llvm-svn: 366735
|
|
|
|
|
|
| |
and iter_swap are updated (with tests).
llvm-svn: 365238
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: mclow.lists
Subscribers: christof, ldionne, cfe-commits, libcxx-commits
Differential Revision: https://reviews.llvm.org/D62782
llvm-svn: 364798
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When applied to a typedef or alias template, the [[nodebug]] attribute
makes the typedef transparent to the debugger, so instead of seeing
`std::__function::__alloc_func<remove_reference<void(&)()>::type,
allocator<remove_reference<void(&)()>, void()>::_Target` you see
`void(&)()` as the type of the variable in your debugger.
Removing all this SFINAE noise from debug info has huge binary size
wins, in addition to improving the readability.
For now this change is on by default. Users can override it by
specifying -D_LIBCPP_NODEBUG_TYPE=
llvm-svn: 363117
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similarly to https://reviews.llvm.org/rL350972, this revision changes
std::tuple_element from class to struct.
Fixes PR41331.
Thanks to Jan Wilken Dörrie for the patch.
Differential Revision: https://reviews.llvm.org/D60069
llvm-svn: 357411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
FreeBSD ships a very old and deprecated ABI for std::pair where the copy and move constructors are not allowed to be trivial. D25389 change how this was implemented by introducing a non-trivial base class. This patch, introduced in October 2016, introduced an ABI bug that caused nested `std::pair` instantiations to have padding. For example:
```
using PairT = std::pair< std::pair<char, char>, char >;
static_assert(offsetof(PairT, first) == 0, "First member should exist at offset zero"); // Fails on FreeBSD!
```
The bug occurs because the base class for the first element (the nested pair) cannot be put at offset zero because the top-level pair already has the same base class laid out there.
This patch fixes that ABI bug by templating the dummy base class on the same parameters as the pair.
Technically this fix is an ABI break for users who depend on the "broken" ABI introduced in 2016. I'm putting this up for review so that the FreeBSD maintainers can sign off on fixing the ABI by breaking the ABI.
Another option, since we have to "break" the ABI to fix it, would be to move FreeBSD off the deprecated non-trivial pair ABI instead.
Also see:
* https://llvm.org/PR40230
* https://reviews.llvm.org/D21329
Reviewers: rsmith, dim, emaste
Reviewed By: rsmith
Subscribers: mclow.lists, krytarowski, christof, ldionne, libcxx-commits
Differential Revision: https://reviews.llvm.org/D56357
llvm-svn: 351290
|
|
|
|
| |
llvm-svn: 350972
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
std::tuple marks its constructors as noexcept when the corresponding
memberwise constructors are noexcept too -- this commit improves std::pair
so that it behaves the same.
This is a re-application of r348824, which broke the build in C++03 mode
because a test was marked as supported in C++03 when it shouldn't be.
Note:
I did not add support in the explicit and non-explicit `pair(_Tuple&& __p)`
constructors because those are non-standard extensions, and supporting them
properly is tedious (we have to copy the rvalue-referenceness of the deduced
_Tuple&& onto the result of tuple_element).
<rdar://problem/29537079>
Reviewers: mclow.lists, EricWF
Subscribers: christof, llvm-commits
Differential Revision: https://reviews.llvm.org/D48669
llvm-svn: 348847
|
|
|
|
|
|
|
| |
This broke the tests on Linux. Reverting until I find out why the tests
are broken (tomorrow).
llvm-svn: 348825
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
std::tuple marks its constructors as noexcept when the corresponding
memberwise constructors are noexcept too -- this commit improves std::pair
so that it behaves the same.
Note:
I did not add support in the explicit and non-explicit `pair(_Tuple&& __p)`
constructors because those are non-standard extensions, and supporting them
properly is tedious (we have to copy the rvalue-referenceness of the deduced
_Tuple&& onto the result of tuple_element).
<rdar://problem/29537079>
Reviewers: mclow.lists, EricWF
Subscribers: christof, llvm-commits
Differential Revision: https://reviews.llvm.org/D48669
llvm-svn: 348824
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This was voted into C++20 in San Diego. Note that there was a revision
D0318R2 which did include unwrap_reference_t, but we mistakingly voted
P0318R1 into the C++20 Working Draft (which does not include
unwrap_reference_t). This patch implements D0318R2, which is what
we'll end up with in the Working Draft once this mistake has been
fixed.
Reviewers: EricWF, mclow.lists
Subscribers: christof, dexonsmith, libcxx-commits
Differential Revision: https://reviews.llvm.org/D54485
llvm-svn: 348138
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: EricWF, ldionne, mclow.lists
Reviewed By: ldionne
Subscribers: christof, libcxx-commits
Differential Revision: https://reviews.llvm.org/D54234
llvm-svn: 346369
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
When building with -fvisibility=hidden, some symbols do not get exported from
libc++.dylib. This means that some entities are not explicitly given default
visibility in the source code, and that we rely on the fact -fvisibility=default
is the default. This commit explicitly gives default visibility to those
symbols to avoid being dependent on the command line flags used.
The commit also remove symbols from the dylib -- those symbols do not
actually need to be exported from the dylib and this should not be an
ABI break.
Finally, in the future, we may want to mark the whole std:: namespace as
having hidden visibility (to switch from opt-out to opt-in), in which
case the changes done in this commit will be required.
Reviewers: EricWF
Subscribers: mgorny, christof, dexonsmith, libcxx-commits
Differential Revision: https://reviews.llvm.org/D52662
llvm-svn: 345260
|
|
|
|
|
|
|
| |
This patch disables shift-sign-overflow warnings for now. It also
fixes most -Wfloat-equal warnings and -Wextra-semi warnings.
llvm-svn: 343438
|
|
|
|
|
|
| |
feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955
llvm-svn: 342073
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_LIBCPP_BUILDING_LIBRARY
Summary: As suggested by Marshall in https://reviews.llvm.org/D49914
Reviewers: mclow.lists, EricWF
Subscribers: christof, dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D50008
llvm-svn: 338475
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
It is part of the synopsis in the Standard and <utility> does include it,
but it was left out of the synopsis comment.
Reviewers: EricWF, mclow.lists
Subscribers: christof, llvm-commits
Differential Revision: https://reviews.llvm.org/D48611
llvm-svn: 336368
|
|
|
|
| |
llvm-svn: 324851
|
|
|
|
| |
llvm-svn: 323159
|
|
|
|
|
|
| |
exported from the dylib.
llvm-svn: 321663
|
|
|
|
|
|
| |
involved marking a lot of variables as inline (but only for C++17 and later).
llvm-svn: 321658
|
|
|
|
|
|
|
| |
This patch adds the newly standardized deduction guides
for std::pair, allowing it to work class template deduction.
llvm-svn: 314864
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This is used to constrain `variant`'s converting constructor correctly.
Reviewers: EricWF, mclow.lists
Reviewed By: EricWF, mclow.lists
Differential Revision: https://reviews.llvm.org/D34111
llvm-svn: 305370
|
|
|
|
|
|
| |
add a message to variant_alternative<> in the similar case (it already asserted). Add tests for this
llvm-svn: 305196
|
|
|
|
| |
llvm-svn: 300808
|
|
|
|
| |
llvm-svn: 300644
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r296565 attempted to add better diagnostics when an unordered container
is instantiated with a hash that doesn't meet the Hash requirements.
However I mistakenly checked the wrong set of requirements. Specifically
it checked if the hash met the requirements for specializations of
std::hash. However these requirements are stricter than the generic
Hash requirements.
This patch fixes the assertions to only check the Hash requirements.
llvm-svn: 296919
|
|
|
|
|
|
| |
internals
llvm-svn: 294391
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Exactly what the title says.
This patch also adds a `std::hash<nullptr_t>` specialization in C++17, but it was not added by this paper and I can't find the actual paper that adds it.
See http://wg21.link/P0513R0 for more info.
If there are no comments in the next couple of days I'll commit this
Reviewers: mclow.lists, K-ballo, EricWF
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D28938
llvm-svn: 292684
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 287255
|
|
|
|
| |
llvm-svn: 287250
|
|
|
|
| |
llvm-svn: 284322
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
FreeBSD ships an old ABI for std::pair which requires that it have non-trivial copy/move constructors. Currently the non-trivial copy/move is achieved by providing explicit definitions of the constructors. This is problematic because it means the constructors don't SFINAE properly. In order to SFINAE copy/move constructors they have to be explicitly defaulted and hense non-trivial.
This patch attempts to provide SFINAE'ing copy/move constructors for std::pair while still making them non-trivial. It does this by adding a base class with a non-trivial copy constructor and then allowing pair's constructors to be generated by the compiler. This also allows the constructors to be constexpr.
Reviewers: emaste, theraven, rsmith, dim
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25389
llvm-svn: 283944
|
|
|
|
|
|
|
|
|
|
|
| |
This assignment operator was previously broken since the SFINAE always resulted
in substitution failure. This caused assignments to turn into
copy construction + assignment.
This patch was originally committed as r279953 but was reverted due to warnings
in the test-suite. This new patch corrects those warnings.
llvm-svn: 279955
|
|
|
|
|
|
|
| |
The test emits warnings causing the test-suite to fail. Since I want this
patch merged into 3.9 I'll recommit it with a clean test.
llvm-svn: 279954
|
|
|
|
|
|
|
|
| |
This assignment operator was previously broken since the SFINAE always resulted
in substitution failure. This caused assignments to turn into
copy construction + assignment.
llvm-svn: 279953
|
|
|
|
| |
llvm-svn: 276605
|
|
|
|
|
|
|
| |
I think I've solved issues with is_assignable and references to incomplete
types. The updated patch adds tests for this case.
llvm-svn: 276603
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a breaking change. The SFINAE required is instantiated the second
the class is instantiated, and this can cause hard SFINAE errors
when applied to references to incomplete types. Ex.
struct IncompleteType;
extern IncompleteType it;
std::tuple<IncompleteType&> t(it); // SFINAE will blow up.
llvm-svn: 276598
|
|
|
|
|
|
|
|
| |
In C++03 mode evaluating the SFINAE can cause a hard error due to
access control violations. This is a problem because the SFINAE
is evaluated as soon as the class is instantiated, and not later.
llvm-svn: 276594
|
|
|
|
| |
llvm-svn: 276556
|
|
|
|
| |
llvm-svn: 276548
|
|
|
|
|
|
|
| |
That paper also has changes to any/optional but those will
be implemented later.
llvm-svn: 276537
|