[PATCH] D40144: Implement `std::launder`

Marshall Clow via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 14:48:51 PST 2017


mclow.lists added inline comments.


================
Comment at: include/new:260
+    static_assert (!is_function<_Tp>::value, "can't launder functions" );
+    static_assert (!is_same_v<void, remove_cv_t<_Tp>>, "can't launder cv-void" );
+#ifdef _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER
----------------
tcanens wrote:
> Technically, the attempt is to launder //pointers to// //cv// `void`/functions. :)
> 
> Also, since `__launder` is non-C++17-specific, I guess it can't use `_t` and `_v` after all... - and I suppose it'll also need to parens-protect the `is_same` check for the fallback `static_assert` macro?
Oh, *bother* (and yes, you're correct)


https://reviews.llvm.org/D40144





More information about the cfe-commits mailing list