[libcxx-commits] [PATCH] D102332: [libc++][nfc] remove duplicated __to_unsigned.

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 12 10:52:27 PDT 2021


zoecarver accepted this revision as: zoecarver.
zoecarver added a comment.

LGTM! Thanks! Feel free to approve this as libc++ yourself and land it. Or maybe wait to see if Arthur has any more comments.



================
Comment at: libcxx/include/type_traits:2314
 
-template<class _From>
-[[nodiscard]] constexpr auto __to_unsigned_like(_From __x) noexcept {
-  return static_cast<make_unsigned_t<_From>>(__x);
+#ifndef _LIBCPP_CXX03_LANG
+template <class _Tp>
----------------
I don't quite understand this change? Maybe it comes from your comment:
> The builds failed since <type_traits> is available in C++98.
> Added guards against C++98 for the new function.

I thought we didn't support C++98 anymore. In any case, I strongly feel that we shouldn't. Do we have bots that run C++98? If so, I'm shocked they pass. 




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102332



More information about the libcxx-commits mailing list