[libcxx-commits] [PATCH] D62928: Constrain function assignment operator (2574)

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 5 12:55:39 PDT 2019


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


================
Comment at: test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp:128
+        using F1 = std::function<int(int, int)>;
+        using F2 = std::function<A  (int, int)>;
+        static_assert(!std::is_assignable<F1&, F2&&>::value, "");
----------------
Is it okay to allow assignment of functions with return types that are convertible to each other? The issue says:

> Callable (C++14 ยง20.9.11.2) for argument types ArgTypes... and return type R.


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D62928





More information about the libcxx-commits mailing list