[libcxx-commits] [libcxx] 2999b73 - [libc++] Make __decay_copy constexpr
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 27 14:32:17 PDT 2021
Author: Louis Dionne
Date: 2021-10-27T17:32:08-04:00
New Revision: 2999b7307f70d5452018cbec61742b93e347c69e
URL: https://github.com/llvm/llvm-project/commit/2999b7307f70d5452018cbec61742b93e347c69e
DIFF: https://github.com/llvm/llvm-project/commit/2999b7307f70d5452018cbec61742b93e347c69e.diff
LOG: [libc++] Make __decay_copy constexpr
This is going to be necessary to implement some range adaptors.
As a fly-by fix, rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI
and remove a redundant inline keyword.
Differential Revision: https://reviews.llvm.org/D112650
Added:
Modified:
libcxx/include/__utility/decay_copy.h
Removed:
################################################################################
diff --git a/libcxx/include/__utility/decay_copy.h b/libcxx/include/__utility/decay_copy.h
index 1a7b399d917d1..5c9716a892798 100644
--- a/libcxx/include/__utility/decay_copy.h
+++ b/libcxx/include/__utility/decay_copy.h
@@ -21,9 +21,10 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY typename decay<_Tp>::type __decay_copy(_Tp&& __t)
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+typename decay<_Tp>::type __decay_copy(_Tp&& __t)
#if _LIBCPP_STD_VER > 17
- noexcept(is_nothrow_convertible_v<_Tp, remove_reference_t<_Tp> >)
+ noexcept(is_nothrow_convertible_v<_Tp, remove_reference_t<_Tp>>)
#endif
{
return _VSTD::forward<_Tp>(__t);
More information about the libcxx-commits
mailing list