[libcxx-commits] [PATCH] D119896: [libc++] Remove a few unneeded _LIBCPP_CXX03_LANG ifdefs

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 15 16:34:17 PST 2022


Quuxplusone requested changes to this revision.
Quuxplusone added a comment.
This revision now requires changes to proceed.

LGTM except for the `unique_ptr` parts.



================
Comment at: libcxx/include/__memory/unique_ptr.h:261-264
-#ifdef _LIBCPP_CXX03_LANG
   unique_ptr(unique_ptr const&) = delete;
   unique_ptr& operator=(unique_ptr const&) = delete;
-#endif
----------------
This one is different — it's `#ifdef`, not `#ifndef`. Either leave this file alone, or dig into it a bit more to see whether we can just remove the whole block.


================
Comment at: libcxx/include/__memory/unique_ptr.h:484-487
-#ifdef _LIBCPP_CXX03_LANG
   unique_ptr(unique_ptr const&) = delete;
   unique_ptr& operator=(unique_ptr const&) = delete;
-#endif
----------------
Ditto.


================
Comment at: libcxx/include/type_traits:1289-1292
-#ifndef _LIBCPP_CXX03_LANG
 template <class _Tp>
 using __uncvref_t _LIBCPP_NODEBUG = typename __uncvref<_Tp>::type;
-#endif
----------------
Consider deferring this one to a later PR where you also update all the call-sites to use `__uncvref_t<T>` instead of `__uncvref<T>::type`. Not mandatory, but worth considering.


================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.fail.cpp:31
     std::tuple<upint> t;
-    upint p = std::get<upint>(t); // expected-error{{deleted copy constructor}}
+    upint p = std::get<upint>(t); // expected-error{{call to deleted constructor}}
 }
----------------
(After removing the non-NFC `unique_ptr` diffs, this test diff should also go away.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119896



More information about the libcxx-commits mailing list