Iros
 
Loading...
Searching...
No Matches
make_from_tuple.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace di::vocab {
8namespace detail {
9 template<typename T>
11 template<concepts::TupleLike Tup>
12 constexpr auto operator()(Tup&& tuple) const -> T
13 requires(requires {
14 apply(
15 []<typename... Args>(Args&&... args) {
16 return T(util::forward<Args>(args)...);
17 },
18 util::forward<Tup>(tuple));
19 })
20 {
21 return apply(
22 []<typename... Args>(Args&&... args) {
23 return T(util::forward<Args>(args)...);
24 },
25 util::forward<Tup>(tuple));
26 }
27 };
28}
29
30template<typename T>
32}
33
34namespace di {
36}
Definition erasure_cast.h:7
Definition lazy.h:165
constexpr auto make_from_tuple
Definition make_from_tuple.h:31
constexpr auto apply(F &&f, Tup &&tuple) -> decltype(detail::apply_impl(meta::MakeIndexSequence< meta::TupleSize< Tup > > {}, util::forward< F >(f), util::forward< Tup >(tuple)))
Definition apply.h:22
Definition zstring_parser.h:9
Definition make_from_tuple.h:10
constexpr auto operator()(Tup &&tuple) const -> T requires(
Definition make_from_tuple.h:12