Commit Graph

114 Commits

Author SHA1 Message Date
Nikolas Klauser
475bd19ee8 [libc++][NFC] Refactor return type enable_ifs to defaulted template arguments
This brings most of the enable_ifs in libc++ to the same style. It also has the nice side-effect of reducing the size of names of these symbols, since the depedent return type is shorter.

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D157736
2023-08-15 12:19:21 -07:00
Nikolas Klauser
1e24b4d3fd [libc++] Fix template parameter naming and enforce it through readability-identifier-naming
Reviewed By: #libc, Mordante

Spies: Mordante, aheejin, libcxx-commits

Differential Revision: https://reviews.llvm.org/D156059
2023-07-24 19:54:12 -07:00
varconst
4122db1fbd [libc++][hardening] Categorize most assertions inside the container classes.
This introduces:
- `_LIBCPP_ASSERT_VALID_INPUT_RANGE`;
- `_LIBCPP_ASSERT_VALID_CONTAINER_ACCESS`;
- `_LIBCPP_ASSERT_VALID_ITERATOR_ACCESS`;
- `_LIBCPP_ASSERT_VALID_ALLOCATOR`;
- `_LIBCPP_ASSERT_INTERNAL`.

Differential Revision: https://reviews.llvm.org/D155349
2023-07-20 10:14:43 -07:00
Nicole Rabjohn
92e4d6791f Fixing conflicting macro definitions between curses.h and the standard library.
POSIX allows certain macros to exist with generic names (i.e. refresh(), move(), and erase()) to exist in `curses.h` which conflict with functions found in std::filesystem, among others. This patch undefs the macros in question and adds them to LIBCPP_PUSH_MACROS and LIBCPP_POP_MACROS.

Reviewed By: #libc, philnik, ldionne

Differential Revision: https://reviews.llvm.org/D147356
2023-07-06 17:21:08 +00:00
varconst
cd0ad4216c [libc++][hardening][NFC] Introduce _LIBCPP_ASSERT_UNCATEGORIZED.
Replace most uses of `_LIBCPP_ASSERT` with
`_LIBCPP_ASSERT_UNCATEGORIZED`.

This is done as a prerequisite to introducing hardened mode to libc++.
The idea is to make enabling assertions an opt-in with (somewhat)
fine-grained controls over which categories of assertions are enabled.
The vast majority of assertions are currently uncategorized; the new
macro will allow turning on `_LIBCPP_ASSERT` (the underlying mechanism
for all kinds of assertions) without enabling all the uncategorized
assertions (in the future; this patch preserves the current behavior).

Differential Revision: https://reviews.llvm.org/D153816
2023-06-28 15:10:31 -07:00
Louis Dionne
6d6e32895b [libc++][NFC] Add missing includes to perfect_forward.h
Differential Revision: https://reviews.llvm.org/D153807
2023-06-27 09:46:36 -04:00
Nikolas Klauser
f1ea0b11ca [libc++] Merge _LIBCPP_FUNC_VIS, _LIBCPP_TYPE_VIS and _LIBCPP_EXCEPTION_ABI into _LIBCPP_EXPORTED_FROM_ABI
These macros are always defined identically, so we can simplify the code a bit by merging them.

Reviewed By: ldionne, #libc

Spies: libcxx-commits, krytarowski, smeenai

Differential Revision: https://reviews.llvm.org/D152652
2023-06-15 08:56:45 -07:00
Hristo Hristov
9a6ca67397 [libc++][spaceship] P1614R2: Removed operator!= from functional
Implements parts of P1614R2:
- Removed `operator!=` from `functional`

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D152704
2023-06-12 19:48:42 +03:00
Nikolas Klauser
ee6ec2c5f1 [libc++][PSTL] Implement std::reduce and std::transform_reduce
Reviewed By: ldionne, #libc

Spies: libcxx-commits, miyuki

Differential Revision: https://reviews.llvm.org/D150736
2023-06-01 08:52:08 -07:00
Mark de Wever
bea2ff6550 [libc++] Untangles invoke.
The type traits parts are moved to a type_traits detail header.
This was discovered while working on modules.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D150538
2023-05-24 07:51:27 +02:00
Mark de Wever
b7932803de [libc++] Moves unwrap_reference to type_traits.
This was discovered while working on modules.

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D149351
2023-05-14 20:03:55 +02:00
Ian Anderson
79702f7f59 [libc++][Modules] Add missing includes and exports
Several headers are missing includes for things they use.

type_traits.is_enum needs to export type_traits.integral_constant so that clients can access its `value` member without explicitly including __type_traits/integral_constant.h themselves.

Make `subrange_fwd` a peer submodule to `subrange` rather than a submodule of it, and have `subrange` export `subrange_fwd`. That will make it easier to programmatically generate modules for the private detail headers, and it will accomplish the same effect that __ranges/subrange.h will make subrange_kind visible.

Reviewed By: Mordante, #libc

Differential Revision: https://reviews.llvm.org/D150055
2023-05-07 19:54:49 -05:00
Louis Dionne
13f5579cae [libc++] Make std::bind constexpr-friendly
std::bind is supposed to be constexpr-friendly since C++20 and it was
marked as such in our synopsis. However, the tests were not actually
testing any of it and as it happens, std::bind was not really constexpr
friendly. This fixes the issue and makes sure that at least some of the
tests are running in constexpr mode.

Some tests for std::bind check functions that return void, and those
use global variables. These tests haven't been made constexpr-friendly,
however the coverage added by this patch should be sufficient to get
decent confidence.

Differential Revision: https://reviews.llvm.org/D149295
2023-05-03 12:27:06 -04:00
Louis Dionne
77ac36547a [libc++] Fix ODR violation with placeholders
In D145589, we made the std::bind placeholders inline constexpr to
satisfy C++17. It turns out that this causes ODR violations since the
shared library provides strong definitions for those placeholders, and
the linker on Windows actually complains about this.

Fortunately, C++17 only encourages implementations to use `inline constexpr`,
it doesn't force them. So instead, we unconditionally define the placeholders
as `extern const`, which avoids the ODR violation and is indistinguishable
from `inline constexpr` for most purposes, since the placeholders are
empty types anyway.

Note that we could also go back to the pre-D145589 state of defining them
as non-inline constexpr variables in C++17, however that is definitely
non-conforming since that means the placeholders have different addresses
in different TUs. This is all a bit pedantic, but all in all I feel that
`extern const` provides the best bang for our buck, and I can't really
find any downsides to that solution.

Differential Revision: https://reviews.llvm.org/D149292
2023-04-27 10:57:15 -04:00
Louis Dionne
8643bdd016 [libc++] Make std::allocator_arg and friends conforming in C++17
This patch makes global tag variables like std::allocator_arg
conform to C++17 by defining them as inline constexpr variables.
This is possible without creating an ODR violation now that we don't
define strong definitions of those variables in the shared library
anymore.

Differential Revision: https://reviews.llvm.org/D145589
2023-04-21 17:47:17 -04:00
Nikolas Klauser
83ce139721 [libc++] Add hide_from_abi check for classes
We already have a clang-tidy check for making sure that `_LIBCPP_HIDE_FROM_ABI` is on free functions. This patch extends this to class members. The places where we don't check for `_LIBCPP_HIDE_FROM_ABI` are classes for which we have an instantiation in the library.

Reviewed By: ldionne, Mordante, #libc

Spies: jplehr, mikhail.ramalho, sstefan1, libcxx-commits, krytarowski, miyuki, smeenai

Differential Revision: https://reviews.llvm.org/D142332
2023-04-16 15:23:23 +02:00
Nikolas Klauser
e2b15ec235 [libc++] Rename __tuple_dir back to __tuple
This essentially reverts D139270

Reviewed By: #libc, EricWF

Spies: tahonermann, libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D147519
2023-04-12 14:30:39 +02:00
Nikolas Klauser
173476ea04 [libc++] Add __decay_t and use it instead of decay<>::type
This avoids instantiating lots of types.

Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D146984
2023-03-31 02:22:48 +02:00
Nikolas Klauser
c9d36bd807 [libc++] Granularize <exception> includes
Reviewed By: ldionne, #libc

Spies: mikhail.ramalho, smeenai, libcxx-commits

Differential Revision: https://reviews.llvm.org/D146097
2023-03-19 10:28:32 +01:00
Nikolas Klauser
308bcb3f7b [libc++] Use the _LIBCPP_VERBOSE_ABORT macro instead of calling the function directly
These calls were added in D141222.

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits, smeenai, mikhail.ramalho

Differential Revision: https://reviews.llvm.org/D146227
2023-03-18 00:34:28 +01:00
Nikolas Klauser
16d1b0e105 [libc++] Use __verbose_abort instead of std::abort in __throw_ functions
This results in proper error messages instead of just an abort.

Reviewed By: ldionne, Mordante, #libc

Spies: #libc_vendors, smeenai, libcxx-commits

Differential Revision: https://reviews.llvm.org/D141222
2023-03-14 19:33:19 +01:00
Nikolas Klauser
0a4aa8a122 [libc++] Granularize <type_traits> includes
Reviewed By: ldionne, #libc, #libc_abi

Spies: #libc_vendors, smeenai, libcxx-commits

Differential Revision: https://reviews.llvm.org/D145320
2023-03-08 22:05:04 +01:00
Arthur O'Dwyer
049a3fe10f [libc++] Fix "size_t" constants that should be "bool" or "int", and add tests
`is_placeholder`, despite having an "is_" name, actually returns an int:
1 for `_1`, 2 for `_2`, 3 for `_3`, and so on. But it should still be int,
not size_t.
2023-02-27 16:53:04 -05:00
Nikolas Klauser
b4ecfd3c46 [libc++] Forward to std::memcmp for trivially comparable types in equal
Reviewed By: #libc, ldionne

Spies: ldionne, Mordante, libcxx-commits

Differential Revision: https://reviews.llvm.org/D139554
2023-02-21 17:11:21 +01:00
Nikolas Klauser
b22aa3d74f [libc++][NFC] Rename _LIBCPP_NO_EXCEPTIONS to _LIBCPP_HAS_NO_EXCEPTIONS
Other macros that disable parts of the library are named `_LIBCPP_HAS_NO_WHATEVER`.

Reviewed By: ldionne, Mordante, #libc

Spies: libcxx-commits, smeenai

Differential Revision: https://reviews.llvm.org/D143163
2023-02-17 17:39:03 +01:00
Nikolas Klauser
4f15267d3d [libc++][NFC] Replace _LIBCPP_STD_VER > x with _LIBCPP_STD_VER >= x
This change is almost fully mechanical. The only interesting change is in `generate_feature_test_macro_components.py` to generate `_LIBCPP_STD_VER >=` instead. To avoid churn in the git-blame this commit should be added to the `.git-blame-ignore-revs` once committed.

Reviewed By: ldionne, var-const, #libc

Spies: jloser, libcxx-commits, arichardson, arphaman, wenlei

Differential Revision: https://reviews.llvm.org/D143962
2023-02-15 16:52:25 +01:00
Louis Dionne
87cc95a904 [libc++] Implement P2136R3 std::invoke_r
Differential Revision: https://reviews.llvm.org/D143610
2023-02-13 08:46:57 -05:00
Nikolas Klauser
d05f889535 [libc++] Enable radability-identifier-naming for local variables and fix any problems
Fixes #60658

Reviewed By: Mordante, #libc

Spies: aheejin, sstefan1, libcxx-commits

Differential Revision: https://reviews.llvm.org/D143737
2023-02-11 20:03:53 +01:00
Louis Dionne
91e38bc760 [libc++][NFC] Reorganize hash.h
- Add missing _LIBCPP_HIDE_FROM_ABI
- Implement inline functions in the class to simplify the code
- Add missing `const` to `operator()`
- Move _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK to the usual location for function attributes

Differential Revision: https://reviews.llvm.org/D143668
2023-02-10 09:47:10 -08:00
Louis Dionne
02718433a0 [libc++] Guard the fix to CityHash behind ABI v2
As explained in a comment in https://reviews.llvm.org/D134124, we tried
landing this unconditionally but this actually bit some users who were
sharing std::unordered_map across an ABI boundary. This shows that the
ABI break is not benign and it should be guarded behind ABI v2.

Differential Revision: https://reviews.llvm.org/D143688
2023-02-09 17:10:02 -08:00
Nikolas Klauser
cf65d275ac [libc++][NFC] Rename _LIBCPP_NO_RTTI to _LIBCPP_HAS_NO_RTTI
Other macros that disable parts of the library are named `_LIBCPP_HAS_NO_WHATEVER`.

Reviewed By: ldionne, Mordante, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D143164
2023-02-05 00:21:56 +01:00
Mark de Wever
76804e89b3 [libc++] Addresses LWG3764.
LWG3764 reference_wrapper::operator() should propagate noexcept

As drive-by adds constexpr to the synopsis, since it has already been
implemented.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D142814
2023-01-31 19:59:16 +01:00
Nikolas Klauser
987f08fe22 [libc++] Implement P1413R3 (Deprecate std::aligned_storage and std::aligned_union)
There are no tests for the aliases because clang doesn't diagnose deprecated template aliases currently.

Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D127678
2023-01-21 15:08:27 +01:00
Nikolas Klauser
73e8e1ba8d [libc++][NFC] Qualify declval
While it's not necessary to qualify calls to `declval` it makes error messages very crypric if the declaration isn't reachable anymore

For example:
```
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__chrono/duration.h:53:66: error: no type named 'type' in 'std::common_type<long, long>'
        typedef chrono::duration<typename common_type<_Rep1, _Rep2>::type,
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__type_traits/common_type.h:107:14: note: in instantiation of template class 'std::common_type<std::chrono::duration<long, std::ratio<3600, 1>>, std::chrono::duration<long, std::ratio<3600, 1>>>' requested here
        : public common_type<_Tp, _Tp> {};
                 ^
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__chrono/duration.h:279:58: note: in instantiation of template class 'std::common_type<std::chrono::duration<long, std::ratio<3600, 1>>>' requested here
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator+() const {return typename common_type<duration>::type(*this);}
                                                             ^
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__chrono/duration.h:308:54: note: in instantiation of template class 'std::chrono::duration<long, std::ratio<3600, 1>>' requested here
    typedef duration<     int, ratio_multiply<ratio<24>, hours::period>>         days;
                                                         ^
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__chrono/duration.h:280:81: error: no type named 'type' in 'std::common_type<std::chrono::duration<long, std::ratio<3600, 1>>>'
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator-() const {return typename common_type<duration>::type(-__rep_);}
                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__chrono/duration.h:308:54: note: in instantiation of template class 'std::chrono::duration<long, std::ratio<3600, 1>>' requested here
    typedef duration<     int, ratio_multiply<ratio<24>, hours::period>>         days;
                                                         ^
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__chrono/duration.h:53:66: error: no type named 'type' in 'std::common_type<int, int>'
        typedef chrono::duration<typename common_type<_Rep1, _Rep2>::type,
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__type_traits/common_type.h:107:14: note: in instantiation of template class 'std::common_type<std::chrono::duration<int, std::ratio<86400, 1>>, std::chrono::duration<int, std::ratio<86400, 1>>>' requested here
        : public common_type<_Tp, _Tp> {};
                 ^
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__chrono/duration.h:279:58: note: in instantiation of template class 'std::common_type<std::chrono::duration<int, std::ratio<86400, 1>>>' requested here
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator+() const {return typename common_type<duration>::type(*this);}
                                                             ^
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__chrono/duration.h:309:55: note: in instantiation of template class 'std::chrono::duration<int, std::ratio<86400, 1>>' requested here
    typedef duration<     int, ratio_multiply<ratio<7>,   days::period>>         weeks;
                                                          ^
    19 similar errors omitted
```
changes with qualification added to:
```
    While building module 'std' imported from /home/nikolask/llvm-projects/libcxx/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp:13:
    In file included from <module-includes>:17:
    In file included from /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/math.h:309:
    In file included from /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/limits:107:
    In file included from /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/type_traits:432:
    In file included from /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__type_traits/common_reference.h:13:
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__type_traits/common_type.h:28:43: error: declaration of 'declval' must be imported from module 'std.utility.__utility.declval' before it is required
    using __cond_type = decltype(false ? std::declval<_Tp>() : std::declval<_Up>());
                                              ^
    /home/nikolask/llvm-projects/libcxx/build/include/c++/v1/__utility/declval.h:30:34: note: declaration here is not visible
    decltype(std::__declval<_Tp>(0)) declval() _NOEXCEPT;
                                     ^
    /home/nikolask/llvm-projects/libcxx/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp:13:10: fatal error: could not build module 'std'
    #include <functional>
     ~~~~~~~~^
    2 errors generated.
```

Reviewed By: ldionne, Mordante, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D130854
2023-01-12 18:28:41 +01:00
Louis Dionne
5efc81166d [libc++] Remove HIDE_FROM_ABI from virtual functions
_LIBCPP_HIDE_FROM_ABI (which is what _LIBCPP_INLINE_VISIBILITY is) uses
ABI tags to avoid ODR violations when linking together object files
compiled against different versions of libc++. However, pointer
authentication uses the mangled name of the function to sign the
function pointer in the vtable, which means that the ABI tag effectively
changes how the pointers are signed.

This leads to PAC failures when passing an object that holds one of these
pointers in its vtable across an ABI boundary: one side will sign the
pointer using one function mangling (with one ABI tag), and the other
side will authenticate the pointer expecting it to have a different
mangled name, which won't work.

To make sure this does not regress in the future, this patch also adds
a clang-query test to detect incorrect applications of _LIBCPP_HIDE_FROM_ABI.

Differential Revision: https://reviews.llvm.org/D140453
2023-01-09 10:29:42 -05:00
Mark de Wever
0c731b0c00 [libc++][CI] Fixes robust against ADL for C++03.
This was disabled in D139545.

Reviewed By: philnik, #libc

Differential Revision: https://reviews.llvm.org/D140731
2023-01-08 16:43:23 +01:00
Nikolas Klauser
841399a218 [libc++] Add custom clang-tidy checks
Reviewed By: #libc, ldionne

Spies: jwakely, beanz, smeenai, cfe-commits, tschuett, avogelsgesang, Mordante, sstefan1, libcxx-commits, ldionne, mgorny, arichardson, miyuki

Differential Revision: https://reviews.llvm.org/D131963
2022-12-23 15:42:13 +01:00
Nikolas Klauser
e0a66116fc [libc++] Granularize <type_traits> includes in <compare>
Reviewed By: Mordante, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D140480
2022-12-23 02:58:06 +01:00
Nikolas Klauser
947dfc95ca [libc++] Granularize <type_traits> includes in <utility>
Reviewed By: Mordante, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D140426
2022-12-22 23:17:47 +01:00
Michał Górny
ec11388b33 [libc++] Rename __tuple to __tuple_dir to avoid file collision
Rename the `__tuple` directory in libc++ headers to `__tuple_dir`
to avoid file collision when installing.  Historically, `__tuple` has
been a file and it has been replaced by a directory
in 2d52c6bfae.  Replacing a regular file
with a directory (or more importantly, the other way around when
downgrading) is not universally supported.  Since this is an internal
header, its actual name should not matter, so just rename it to avoid
problems.

Differential Revision: https://reviews.llvm.org/D139270
2022-12-21 19:19:58 +01:00
Nikolas Klauser
3ec6c997c6 [libc++] Implement P1169R4 (static operator())
Reviewed By: ldionne, huixie90, #libc

Spies: EricWF, libcxx-commits, royjacobson

Differential Revision: https://reviews.llvm.org/D135016
2022-12-15 02:18:54 +01:00
Nikolas Klauser
59ef4b3686 [libc++] Split __allocator_destructor out of shared_ptr.h
Reviewed By: ldionne, huixie90, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D134479
2022-11-05 21:25:54 +01:00
Nikolas Klauser
89b356f05a [libc++] Granularize <concept> includes
Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D137283
2022-11-05 20:59:29 +01:00
Nikolas Klauser
dbe60caa92 [libc++] Remove std::function in C++03
We've said that we'll remove `std::function` from C++03 in LLVM 16, so we might as well do it now before we forget.

Reviewed By: ldionne, #libc, Mordante

Spies: jloser, Mordante, libcxx-commits

Differential Revision: https://reviews.llvm.org/D135868
2022-10-19 11:08:35 +02:00
Louis Dionne
0e4802bf45 [libc++] Fix std::function's handling of blocks under Objc ARC
Previously, some uses of std::function with blocks would crash when ARC was enabled.

rdar://100907096

Differential Revision: https://reviews.llvm.org/D135706
2022-10-17 18:36:08 -04:00
Nikolas Klauser
d7d586e5a7 [libc++] static_assert that rebinding the allocator works as expected
Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D133638
2022-10-11 16:47:42 +02:00
oToToT
0da59bb865 [libc++] Fix wrong implementation of CityHash
As PR56606 stated, the current implementation of CityHash in libc++
would drop some bits unintentionally. Cast the 32bit int to the 64bit
int to avoid this happened.

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D134124
2022-10-06 04:32:04 +08:00
Louis Dionne
c2df707666 [libc++] Suppress -Wctad-maybe-unsupported on types w/o deduction guides
There are a handful of standard library types that are intended
to support CTAD but don't need any explicit deduction guides to
do so.

This patch adds a dummy deduction guide to those types to suppress
-Wctad-maybe-unsupported (which gets emitted in user code).

This is a re-application of the original patch by Eric Fiselier in
fcd549a7d8 which had been reverted due to reasons lost at this point.
I also added the macro to a few more types. Reviving this patch was
prompted by the discussion on https://llvm.org/D133425.

Differential Revision: https://reviews.llvm.org/D133535
2022-10-03 14:05:08 -04:00
Nikolas Klauser
ed2d3644ab [libc++][NFC] Prefer type aliases over structs
Reviewed By: ldionne, #libc

Spies: sstefan1, libcxx-commits, jeroen.dobbelaere

Differential Revision: https://reviews.llvm.org/D134901
2022-10-01 22:49:36 +02:00
Nikolas Klauser
5fab33af7f [libc++] Avoid instantiating type_trait classes
Use `using` aliases to avoid instantiating lots of types

Reviewed By: ldionne, #libc

Spies: libcxx-commits, miyuki

Differential Revision: https://reviews.llvm.org/D132785
2022-09-06 19:09:42 +02:00