summaryrefslogtreecommitdiffstats
path: root/9/sources/cxx-stl/llvm-libc++/libcxx/include/functional
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-05-12 03:46:51 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-05-12 03:46:51 +0000
commit4dde7571f1d7ab6439946b45ffaa55916fc5da5e (patch)
tree5c6aeb7acb5aa97762a1b97c74e754855455e083 /9/sources/cxx-stl/llvm-libc++/libcxx/include/functional
parent5fd2a238a3a2697a4cde0e4ed2a8b05b3791fb43 (diff)
parent1b1d56acc5281d0201fdbe8539012a2dbf09bc8f (diff)
downloadprebuilts_ndk-4dde7571f1d7ab6439946b45ffaa55916fc5da5e.zip
prebuilts_ndk-4dde7571f1d7ab6439946b45ffaa55916fc5da5e.tar.gz
prebuilts_ndk-4dde7571f1d7ab6439946b45ffaa55916fc5da5e.tar.bz2
Merge "Refresh 64-bit headers/libs; upgrade libc++ to r207307"
Diffstat (limited to '9/sources/cxx-stl/llvm-libc++/libcxx/include/functional')
-rw-r--r--9/sources/cxx-stl/llvm-libc++/libcxx/include/functional21
1 files changed, 11 insertions, 10 deletions
diff --git a/9/sources/cxx-stl/llvm-libc++/libcxx/include/functional b/9/sources/cxx-stl/llvm-libc++/libcxx/include/functional
index 891ed46..167790b 100644
--- a/9/sources/cxx-stl/llvm-libc++/libcxx/include/functional
+++ b/9/sources/cxx-stl/llvm-libc++/libcxx/include/functional
@@ -1617,21 +1617,22 @@ function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc& __a0, _Fp _
if (__not_null(__f))
{
typedef __function::__func<_Fp, _Alloc, _Rp(_ArgTypes...)> _FF;
- if (sizeof(_FF) <= sizeof(__buf_) && is_nothrow_copy_constructible<_Fp>::value)
+ typedef typename __alloc_traits::template
+#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+ rebind_alloc<_FF>
+#else
+ rebind_alloc<_FF>::other
+#endif
+ _Ap;
+ _Ap __a(__a0);
+ if (sizeof(_FF) <= sizeof(__buf_) &&
+ is_nothrow_copy_constructible<_Fp>::value && is_nothrow_copy_constructible<_Ap>::value)
{
__f_ = (__base*)&__buf_;
- ::new (__f_) _FF(_VSTD::move(__f));
+ ::new (__f_) _FF(_VSTD::move(__f), _Alloc(__a));
}
else
{
- typedef typename __alloc_traits::template
-#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
- rebind_alloc<_FF>
-#else
- rebind_alloc<_FF>::other
-#endif
- _Ap;
- _Ap __a(__a0);
typedef __allocator_destructor<_Ap> _Dp;
unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
::new (__hold.get()) _FF(_VSTD::move(__f), _Alloc(__a));