14 template <
typename T,
typename... Args>
requires std::is_constructible_v<T, Args...>
20 return std::apply([] (
const auto&... args) {
return T { args... }; }, args);
24 return std::apply([] (
auto&&... args) {
return T {
GRAPHLE_FWD(args)... }; }, std::move(args));
27 std::tuple<Args...> args;
36 template <
typename T,
bool ReturnCleared = true>
requires requires (T value) { value.clear(); }
39 explicit provide_owned(T value, std::bool_constant<ReturnCleared> = {}) : value(std::move(value)) {}
42 if constexpr (ReturnCleared) value.clear();
47 if constexpr (ReturnCleared) value.clear();
48 return std::move(value);
61 template <
typename T,
bool ReturnCleared = true>
requires requires (T value) { value.clear(); }
64 explicit provide_external(T& value, std::bool_constant<ReturnCleared> = {}) : value(std::addressof(value)) {}
67 if constexpr (ReturnCleared) value->clear();
provide_external(T &value, std::bool_constant< ReturnCleared >={})
constexpr auto & operator()(void) const noexcept
provide_newly_constructed(Args &&... args)
constexpr auto operator()(void) const &noexcept
constexpr auto operator()(void) &&noexcept
constexpr auto operator()(void) const &noexcept
constexpr auto operator()(void) &&noexcept
provide_owned(T value, std::bool_constant< ReturnCleared >={})