26 Algorithms library [algorithms]

26.11 Specialized <memory> algorithms [specialized.algorithms]

26.11.8 construct_at [specialized.construct]

template<class T, class. Args> constexpr T* construct_at(T* location, Args&&. args); namespace ranges { template<class T, class. Args> constexpr T* construct_at(T* location, Args&&. args); }
Constraints: is_unbounded_array_v<T> is false.
The expression ​::​new (declval<void*>() T(declval<Args>().) is well-formed when treated as an unevaluated operand ([expr.context]).
Effects: Equivalent to: if constexpr (is_array_v<T>) return ::new (voidify(*location)) T[1](); else return ::new (voidify(*location)) T(std::forward<Args>(args).);

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant