6#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MEMORY_CONSTRUCT_AT_HPP_
7#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MEMORY_CONSTRUCT_AT_HPP_
12#include "arene/base/compiler_support/cpp14_inline.hpp"
13#include "arene/base/constraints/constraints.hpp"
14#include "arene/base/constraints/substitution_succeeds.hpp"
15#include "arene/base/stdlib_choice/declval.hpp"
16#include "arene/base/stdlib_choice/enable_if.hpp"
17#include "arene/base/stdlib_choice/forward.hpp"
18#include "arene/base/stdlib_choice/is_constructible.hpp"
19#include "arene/base/type_manipulation/give_qualifiers_to.hpp"
22#include "arene/base/stdlib_choice/new.hpp"
30namespace construct_at_detail {
32template <
typename T,
typename... Args>
33using try_construct =
decltype(::
new (std::declval<
void*>()) T(std::declval<Args>()...));
36template <
typename T,
typename... Args>
37constexpr bool is_constructible = substitution_succeeds<try_construct, T, Args...>;
40class do_construct_at {
59 template <
class T,
class... Args, constraints<std::enable_if_t<is_constructible<T, Args...>>> =
nullptr>
60 auto operator()(T* ptr, Args&&... args)
const noexcept(std::is_nothrow_constructible<T, Args...>::value) -> T* {
67 return ::
new (
const_cast<
void*>(
static_cast<give_qualifiers_to<T,
void>*>(ptr))) T(std::forward<Args>(args)...);
Definition array_exceptions_disabled.cpp:11
ARENE_CPP14_INLINE_VARIABLE(construct_at_detail::do_construct_at, construct_at)
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10