[libc++] Gives ignore external linkage.

A slightly different fix is in D144994.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D151490
This commit is contained in:
Mark de Wever
2023-05-25 21:59:25 +02:00
parent ac7d60f73a
commit 5d4281d549

View File

@@ -1508,9 +1508,13 @@ struct __ignore_t
const __ignore_t& operator=(_Tp&&) const {return *this;}
};
# if _LIBCPP_STD_VER >= 17
inline constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
# else
namespace {
constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
} // namespace
# endif
template <class... _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14