Skip to content

Commit

Permalink
Perma-workaround DevCom-1328628 "SFINAE bug when a default argument i…
Browse files Browse the repository at this point in the history
…s protected".
  • Loading branch information
StephanTLavavej committed Feb 3, 2021
1 parent 5bb20e5 commit 075dfaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ _NODISCARD constexpr void* _Voidify_iter(_Iter _It) noexcept {

// FUNCTION TEMPLATE construct_at
#if _HAS_CXX20
template <class _Ty, class... _Types>
_CONSTEXPR20_DYNALLOC auto construct_at(_Ty* const _Location, _Types&&... _Args) noexcept(
noexcept(::new (_Voidify_iter(_Location)) _Ty(_STD forward<_Types>(_Args)...))) // strengthened
-> decltype(::new (_Voidify_iter(_Location)) _Ty(_STD forward<_Types>(_Args)...)) {
template <class _Ty, class... _Types,
class = void_t<decltype(::new (_STD declval<void*>()) _Ty(_STD declval<_Types>()...))>>
_CONSTEXPR20_DYNALLOC _Ty* construct_at(_Ty* const _Location, _Types&&... _Args) noexcept(
noexcept(::new (_Voidify_iter(_Location)) _Ty(_STD forward<_Types>(_Args)...))) /* strengthened */ {
return ::new (_Voidify_iter(_Location)) _Ty(_STD forward<_Types>(_Args)...);
}
#endif // _HAS_CXX20
Expand Down

0 comments on commit 075dfaf

Please sign in to comment.