[libcxx-commits] [PATCH] D80030: [libc++][test] cleanup some small test issues

Casey Carter via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 15 14:42:16 PDT 2020


CaseyCarter marked an inline comment as done.
CaseyCarter added inline comments.


================
Comment at: libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp:140
         using F2 = std::function<void(int, int)&&>;
         static_assert(!std::is_assignable<F1&, F2&&>::value, "");
     }
----------------
ldionne wrote:
> Sorry if I'm being slow, but can you explain why that's UB?
Sure! `F2` is incomplete, and `is_assignable<F1&, F2&&>::value` could yield a different result if `F2` were completed - say if `F2`has a conversion operator to `F1&` - which is undefined per [meta.reqmts]/5.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80030/new/

https://reviews.llvm.org/D80030





More information about the libcxx-commits mailing list