Skip to content

Commit

Permalink
microsoftGH-482 removed _Max_value.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej committed Mar 4, 2020
1 parent 177bfa2 commit f0098a5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions stl/inc/memory
Original file line number Diff line number Diff line change
Expand Up @@ -1725,8 +1725,8 @@ private:
}

virtual void _Delete_this() noexcept override { // destroy self
using _Storage = aligned_storage_t<_Max_value(alignof(_Ty), alignof(_Ref_count_unbounded_array<_Ty>)),
_Max_value(alignof(_Ty), alignof(_Ref_count_unbounded_array<_Ty>))>;
using _Storage = aligned_storage_t<(_STD max)(alignof(_Ty), alignof(_Ref_count_unbounded_array<_Ty>)),
(_STD max)(alignof(_Ty), alignof(_Ref_count_unbounded_array<_Ty>))>;
this->~_Ref_count_unbounded_array();
delete[] reinterpret_cast<_Storage*>(this);
}
Expand Down Expand Up @@ -1758,8 +1758,8 @@ private:
}

virtual void _Delete_this() noexcept override { // destroy self
using _Storage = aligned_storage_t<_Max_value(alignof(_Ty), alignof(_Ref_count_unbounded_array<_Ty>)),
_Max_value(alignof(_Ty), alignof(_Ref_count_unbounded_array<_Ty>))>;
using _Storage = aligned_storage_t<(_STD max)(alignof(_Ty), alignof(_Ref_count_unbounded_array<_Ty>)),
(_STD max)(alignof(_Ty), alignof(_Ref_count_unbounded_array<_Ty>))>;
this->~_Ref_count_unbounded_array();
delete[] reinterpret_cast<_Storage*>(this);
}
Expand Down Expand Up @@ -2035,7 +2035,7 @@ private:

virtual void _Delete_this() noexcept override { // destroy self
constexpr size_t _Max_alignment =
_Max_value(alignof(_Ty), alignof(_Ref_count_unbounded_array_alloc<_Ty, _Alloc>));
(_STD max)(alignof(_Ty), alignof(_Ref_count_unbounded_array_alloc<_Ty, _Alloc>));
using _Storage = aligned_storage_t<_Max_alignment, _Max_alignment>;
_Rebind_alloc_t<_Alloc, _Storage> _Al(this->_Get_val());
this->~_Ref_count_unbounded_array_alloc();
Expand Down Expand Up @@ -2107,7 +2107,7 @@ _NODISCARD shared_ptr<_Ty> make_shared(
const size_t _Count) { // make a shared_ptr to an unbounded array
using _Refc = _Ref_count_unbounded_array<_Ty>;
using _Storage =
aligned_storage_t<_Max_value(alignof(_Ty), alignof(_Refc)), _Max_value(alignof(_Ty), alignof(_Refc))>;
aligned_storage_t<(_STD max)(alignof(_Ty), alignof(_Refc)), (_STD max)(alignof(_Ty), alignof(_Refc))>;
const auto _Rx =
reinterpret_cast<_Refc*>(new _Storage[_Div_ceil(_Count * sizeof(remove_extent_t<_Ty>), sizeof(_Storage))
+ _Div_ceil(sizeof(_Refc), sizeof(_Storage))]);
Expand All @@ -2128,7 +2128,7 @@ _NODISCARD shared_ptr<_Ty> make_shared(
const size_t _Count, const remove_extent_t<_Ty>& _Val) { // make a shared_ptr to an unbounded array
using _Refc = _Ref_count_unbounded_array<_Ty>;
using _Storage =
aligned_storage_t<_Max_value(alignof(_Ty), alignof(_Refc)), _Max_value(alignof(_Ty), alignof(_Refc))>;
aligned_storage_t<(_STD max)(alignof(_Ty), alignof(_Refc)), (_STD max)(alignof(_Ty), alignof(_Refc))>;
const auto _Rx =
reinterpret_cast<_Refc*>(new _Storage[_Div_ceil(_Count * sizeof(remove_extent_t<_Ty>), sizeof(_Storage))
+ _Div_ceil(sizeof(_Refc), sizeof(_Storage))]);
Expand Down Expand Up @@ -2195,7 +2195,7 @@ _NODISCARD shared_ptr<_Ty> allocate_shared(
const _Alloc& _Al, const size_t _Count) { // make a shared_ptr to an unbounded array
using _Refc = _Ref_count_unbounded_array_alloc<remove_cv_t<_Ty>, _Alloc>;
using _Storage =
aligned_storage_t<_Max_value(alignof(_Ty), alignof(_Refc)), _Max_value(alignof(_Ty), alignof(_Refc))>;
aligned_storage_t<(_STD max)(alignof(_Ty), alignof(_Refc)), (_STD max)(alignof(_Ty), alignof(_Refc))>;
_Rebind_alloc_t<_Alloc, _Storage> _Rebound(_Al);
size_t _Size =
_Div_ceil(_Count * sizeof(remove_extent_t<_Ty>), sizeof(_Storage)) + _Div_ceil(sizeof(_Refc), sizeof(_Storage));
Expand All @@ -2217,7 +2217,7 @@ _NODISCARD shared_ptr<_Ty> allocate_shared(const _Alloc& _Al, const size_t _Coun
const remove_extent_t<_Ty>& _Val) { // make a shared_ptr to an unbounded array
using _Refc = _Ref_count_unbounded_array_alloc<remove_cv_t<_Ty>, _Alloc>;
using _Storage =
aligned_storage_t<_Max_value(alignof(_Ty), alignof(_Refc)), _Max_value(alignof(_Ty), alignof(_Refc))>;
aligned_storage_t<(_STD max)(alignof(_Ty), alignof(_Refc)), (_STD max)(alignof(_Ty), alignof(_Refc))>;
_Rebind_alloc_t<_Alloc, _Storage> _Rebound(_Al);
size_t _Size =
_Div_ceil(_Count * sizeof(remove_extent_t<_Ty>), sizeof(_Storage)) + _Div_ceil(sizeof(_Refc), sizeof(_Storage));
Expand Down

0 comments on commit f0098a5

Please sign in to comment.