[libcxx-commits] [PATCH] D102006: [libcxx][ranges] Add range.subrange.

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 6 22:20:43 PDT 2021


cjdb added inline comments.


================
Comment at: libcxx/include/type_traits:2311-2314
+template<class _From>
+[[nodiscard]] constexpr auto __to_unsigned_like(_From __x) noexcept {
+  return static_cast<make_unsigned_t<_From>>(__x);
+}
----------------
Mordante wrote:
> cjdb wrote:
> > I wanna poach this for D101922. WDYT?
> I would like `_LIBCPP_INLINE_VISIBILITY` and I dislike the `_like` suffix. Of course if we remove the `_like` it duplicates `__to_unsigned` defined in `<charconv>`. I start to feel it makes sense to make a header to do some of these signed to unsigned conversions. (I also use them for `<format>` but there I already require `<charconv>`. WDYT? (Note `<charconv>` is available in C++11 as an extension.)
> I wouldn't mind to put up a review to make this change.
This is already in main. I'm not sure why it's showing up in the diff.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102006/new/

https://reviews.llvm.org/D102006



More information about the libcxx-commits mailing list