File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
libcxx/include/__functional Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -212,8 +212,8 @@ class __default_alloc_func<_Fp, _Rp(_ArgTypes...)> {
212
212
213
213
_LIBCPP_HIDE_FROM_ABI __default_alloc_func* __clone () const {
214
214
using _Self = __default_alloc_func;
215
- unique_ptr<_Self, __deallocating_deleter<_Self>> __hold =
216
- std::__libcpp_allocate<_Self>(sizeof (_Self), _LIBCPP_ALIGNOF (_Self));
215
+ unique_ptr<_Self, __deallocating_deleter<_Self>> __hold (
216
+ static_cast <_Self*>( std::__libcpp_allocate<_Self>(sizeof (_Self), _LIBCPP_ALIGNOF (_Self)) ));
217
217
_Self* __res = ::new ((void *)__hold.get ()) _Self (__f_);
218
218
(void )__hold.release ();
219
219
return __res;
@@ -669,8 +669,8 @@ class __policy_func<_Rp(_ArgTypes...)> {
669
669
if (__use_small_storage<_Fun>()) {
670
670
::new ((void *)&__buf_.__small ) _Fun (std::move (__f));
671
671
} else {
672
- unique_ptr<_Fun, __deallocating_deleter<_Fun>> __hold =
673
- std::__libcpp_allocate<_Fun>(sizeof (_Fun), _LIBCPP_ALIGNOF (_Fun));
672
+ unique_ptr<_Fun, __deallocating_deleter<_Fun>> __hold (
673
+ static_cast <_Fun*>( std::__libcpp_allocate<_Fun>(sizeof (_Fun), _LIBCPP_ALIGNOF (_Fun)) ));
674
674
__buf_.__large = ::new ((void *)__hold.get ()) _Fun (std::move (__f));
675
675
(void )__hold.release ();
676
676
}
You can’t perform that action at this time.
0 commit comments