[libcxx-commits] [PATCH] D119958: Remove __uncvref; use __uncvref_t instead
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 16 12:21:11 PST 2022
Quuxplusone added a comment.
Seems fine to me, modulo I expect a bunch of C++03 failures because `>>`.
================
Comment at: libcxx/include/__functional/bind.h:30
false_type,
- is_bind_expression<typename __uncvref<_Tp>::type>
+ is_bind_expression<__uncvref_t<_Tp>>
> {};
----------------
I suspect here and throughout you'll need `> >` in place of `>>`. (Please run the `--param std=c++03` tests locally until they pass, since I could envision lots of round-trips to CI here.)
================
Comment at: libcxx/include/experimental/functional:211-213
+ static_assert ( __is_same_uncvref<typename iterator_traits<_RandomAccessIterator1>::value_type,
+ typename iterator_traits<_RandomAccessIterator2>::value_type>::value,
"Corpus and Pattern iterators must point to the same type" );
----------------
This seems fine; might as well tighten up the ` ( ` and ` )` into `(` and `)` while you're here.
(Ah, I see you did what I'm asking for on line 361 already, too.)
================
Comment at: libcxx/include/future:1888
template <class _Fp,
- class = typename enable_if
- <
- !is_same<
- typename __uncvref<_Fp>::type,
- packaged_task
- >::value
- >::type
- >
+ class = __enable_if_t<!is_same<__uncvref_t<_Fp>, packaged_task>::value>>
_LIBCPP_INLINE_VISIBILITY
----------------
This could use `class = __enable_if_t<!__is_same_uncvref<_Fp, packaged_task>::value>`, right?
================
Comment at: libcxx/include/tuple:1458-1459
{
typedef _LIBCPP_NODEBUG typename __tuple_cat_type<tuple<_Types...>,
- typename __make_tuple_types<typename __uncvref<_Tuple0>::type>::type>::type
- type;
+ typename __make_tuple_types<__uncvref_t<_Tuple0>>::type>::type type;
};
----------------
Pre-existing, but as long as you're touching this line, please reformat to match the Pythonesque indentation style of the surrounding code, e.g.
```
using type _LIBCPP_NODEBUG = typename __tuple_cat_type<
tuple<_Types...>,
typename __make_tuple_types<__uncvref_t<_Tuple0> >::type
>::type;
```
================
Comment at: libcxx/include/type_traits:1277-1280
template <class _Tp>
struct __unconstref {
typedef _LIBCPP_NODEBUG typename remove_const<typename remove_reference<_Tp>::type>::type type;
};
----------------
No action required here, but: An interesting followup PR might dig into why `__tree` uses `__unconstref`, and whether we can conformingly just use `__uncvref` instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119958/new/
https://reviews.llvm.org/D119958
More information about the libcxx-commits
mailing list