Skip to content

Commit

Permalink
Prepare the constexpr machinery needed for string and vector
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Dec 21, 2020
1 parent 2914b43 commit 541f0d7
Show file tree
Hide file tree
Showing 5 changed files with 334 additions and 171 deletions.
16 changes: 0 additions & 16 deletions stl/inc/memory
Original file line number Diff line number Diff line change
Expand Up @@ -567,22 +567,7 @@ namespace ranges {
};

inline constexpr _Uninitialized_fill_n_fn uninitialized_fill_n{_Not_quite_object::_Construct_tag{}};
} // namespace ranges
#endif // __cpp_lib_concepts

// 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 (const_cast<void*>(static_cast<const volatile void*>(_Location)))
_Ty(_STD forward<_Types>(_Args)...))) // strengthened
-> decltype(
::new (const_cast<void*>(static_cast<const volatile void*>(_Location))) _Ty(_STD forward<_Types>(_Args)...)) {
return ::new (const_cast<void*>(static_cast<const volatile void*>(_Location))) _Ty(_STD forward<_Types>(_Args)...);
}

#ifdef __cpp_lib_concepts
namespace ranges {
// VARIABLE ranges::construct_at
class _Construct_at_fn : private _Not_quite_object {
public:
Expand All @@ -605,7 +590,6 @@ namespace ranges {
inline constexpr _Construct_at_fn construct_at{_Not_quite_object::_Construct_tag{}};
} // namespace ranges
#endif // __cpp_lib_concepts
#endif // _HAS_CXX20

#if _HAS_CXX17
// FUNCTION TEMPLATE destroy_at
Expand Down
Loading

0 comments on commit 541f0d7

Please sign in to comment.