[libcxx-commits] [PATCH] D65034: [libc++] use constexpr for sizeof comparisons
Alan Somers via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 19 19:07:13 PDT 2019
asomers created this revision.
Herald added subscribers: libcxx-commits, ldionne, christof, krytarowski, emaste.
Herald added a reviewer: EricWF.
This fixes a spurious placement-new error from GCC.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70834
Sponsored by: The FreeBSD Foundation
Repository:
rCXX libc++
https://reviews.llvm.org/D65034
Files:
include/functional
Index: include/functional
===================================================================
--- include/functional
+++ include/functional
@@ -1766,7 +1766,7 @@
if (__function::__not_null(__f))
{
_FunAlloc __af(__a);
- if (sizeof(_Fun) <= sizeof(__buf_) &&
+ if _LIBCPP_CONSTEXPR_AFTER_CXX14(sizeof(_Fun) <= sizeof(__buf_) &&
is_nothrow_copy_constructible<_Fp>::value &&
is_nothrow_copy_constructible<_FunAlloc>::value)
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65034.210944.patch
Type: text/x-patch
Size: 523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190720/b8948c1e/attachment.bin>
More information about the libcxx-commits
mailing list