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

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 15 14:44:43 PDT 2020


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

Ship it with the `is_assignable` test removed. Thanks!



================
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, "");
     }
----------------
CaseyCarter wrote:
> 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.
Oh. It's incomplete cause we don't define `std::function<R(Args...)&&>`. Of course. It makes sense to remove this IMO.


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