[libcxx] Constrain function assignment operator (2574).
This patch fixes LWG issue 2574.
Differential Review: https://reviews.llvm.org/D62928
Cr-Mirrored-From: https://chromium.googlesource.com/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 8aa2266fd8dd237c84daf12c2eec0df244558f49
diff --git a/include/functional b/include/functional
index fa55864..9d15485 100644
--- a/include/functional
+++ b/include/functional
@@ -2387,7 +2387,7 @@
function& operator=(const function&);
function& operator=(function&&) _NOEXCEPT;
function& operator=(nullptr_t) _NOEXCEPT;
- template<class _Fp, class = _EnableIfCallable<_Fp>>
+ template<class _Fp, class = _EnableIfCallable<typename decay<_Fp>::type>>
function& operator=(_Fp&&);
~function();