Skip to content

Commit 2999b73

Browse files
committed
[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
1 parent 3e39bbf commit 2999b73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libcxx/include/__utility/decay_copy.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

2323
template <class _Tp>
24-
inline _LIBCPP_INLINE_VISIBILITY typename decay<_Tp>::type __decay_copy(_Tp&& __t)
24+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
25+
typename decay<_Tp>::type __decay_copy(_Tp&& __t)
2526
#if _LIBCPP_STD_VER > 17
26-
noexcept(is_nothrow_convertible_v<_Tp, remove_reference_t<_Tp> >)
27+
noexcept(is_nothrow_convertible_v<_Tp, remove_reference_t<_Tp>>)
2728
#endif
2829
{
2930
return _VSTD::forward<_Tp>(__t);

0 commit comments

Comments
 (0)