[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 11:30:51 PDT 2021


zoecarver added inline 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>
----------------
Quuxplusone wrote:
> zoecarver wrote:
> > 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. 
> > 
> > 
> Well, by "C++98" we mean "C++03" (they're basically synonymous), but sure, libc++ supports `-std=c++03`.
That's not what I'm talking about. At one point we had `-std=c++98`, but I don't think we support that anymore. 

Anyway, ignore my original comment, I just misread the condition and thought you were enabling this starting in C++03 mode, which we wouldn't need a condition for. But we're not, so it's all good :)


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