| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc++] Make the __availability header a sub-header of __config (#93083) In essence, this header has always been related to configuration of the library but we didn't want to put it inside <__config> due to complexity reasons. Now that we have sub-headers in <__config>, we can move <__availability> to it and stop including it everywhere since we already obtain the required macros via <__config>. | 2 年前 | |
[libc++] restrict the expected conversion constructor not compete against copy constructor (#96101) fixes #92676 So right now clang does not like std::expected<std::any, int> e1; auto e2 = e1; So basically when clang tries to do overload resolution of auto e2 = e1; It finds expected(const expected&); // 1. This is OK expected(const expected<_Up, _OtherErr>&) requires __can_convert; // 2. This needs to check its constraints Then in __can_convert, one of the check is _Not<is_constructible<_Tp, expected<_Up, _OtherErr>&>> which is checking is_constructible<std::any, expected<_Up, _OtherErr>&> Then it looks at std::any's constructor template < class _ValueType, class _Tp = decay_t<_ValueType>, class = enable_if_t< !is_same<_Tp, any>::value && !__is_inplace_type<_ValueType>::value && is_copy_constructible<_Tp>::value> > any(_ValueType&& __value); In the above, is_copy_constructible<_Tp> expands to is_copy_constructible<std::expected<std::any, int>> And the above goes back to the original thing we asked : copy the std::expected, which goes to the overload resolution again. expected(const expected&); expected(const expected<_Up, _OtherErr>&) requires __can_convert; So the second overload results in a logical cycle. I am not a language lawyer. We could argue that clang should give up on the second overload which has logical cycle, as the first overload is a perfect match. Anyway, the fix in this patch tries to short-circuiting the second overload's constraint check: that is, if the argument matches exact same expected<T, E>, we give up immediately and let the copy constructor to deal with it | 2 年前 | |
[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 | 3 年前 | |
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 | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 |