[libcxx-commits] [PATCH] D145701: [libc++] Remove conditional usage of rvalue references in C++03

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 9 09:30:54 PST 2023


ldionne created this revision.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This one is easy -- Clang supports rvalue references in C++03 mode, so
we should be able to remove that conditional.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145701

Files:
  libcxx/include/exception


Index: libcxx/include/exception
===================================================================
--- libcxx/include/exception
+++ libcxx/include/exception
@@ -320,11 +320,7 @@
 template <class _Tp, class _Up>
 struct __throw_with_nested<_Tp, _Up, false> {
     _LIBCPP_NORETURN static inline _LIBCPP_INLINE_VISIBILITY void
-#ifndef _LIBCPP_CXX03_LANG
     __do_throw(_Tp&& __t)
-#else
-    __do_throw (_Tp& __t)
-#endif // _LIBCPP_CXX03_LANG
     {
         throw static_cast<_Tp&&>(__t);
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145701.503811.patch
Type: text/x-patch
Size: 499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230309/cc26c8c7/attachment.bin>


More information about the libcxx-commits mailing list