[libcxx-commits] [libcxx] [libc++] Simplify std::launder (PR #147985)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 15 08:12:59 PDT 2025
================
@@ -20,15 +18,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT {
- static_assert(!(is_function<_Tp>::value), "can't launder functions");
- static_assert(!is_void<_Tp>::value, "can't launder cv-void");
----------------
philnik777 wrote:
The compilers didn't always diagnose misuses, which I think is the reason they were added in the first place. I can add a comment though.
https://github.com/llvm/llvm-project/pull/147985
More information about the libcxx-commits
mailing list