Add some const_casts in places where we were implicitly casting away constness. No functional change, but now they're explicit

llvm-svn: 305410
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 8b086e38789796b575be2cc875dd8d67cd714338
diff --git a/include/functional b/include/functional
index ea35697..83a2e5a 100644
--- a/include/functional
+++ b/include/functional
@@ -1941,8 +1941,8 @@
 function<_Rp(_ArgTypes...)>::target() _NOEXCEPT
 {
     if (__f_ == 0)
-        return (_Tp*)0;
-    return (_Tp*)__f_->target(typeid(_Tp));
+        return nullptr;
+    return (_Tp*) const_cast<void *>(__f_->target(typeid(_Tp)));
 }
 
 template<class _Rp, class ..._ArgTypes>
@@ -1951,7 +1951,7 @@
 function<_Rp(_ArgTypes...)>::target() const _NOEXCEPT
 {
     if (__f_ == 0)
-        return (const _Tp*)0;
+        return nullptr;
     return (const _Tp*)__f_->target(typeid(_Tp));
 }