You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interface/core/containers/tuple.h
+50-9Lines changed: 50 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@
31
31
#include"../traits/is_not_same.h"
32
32
#include"../traits/is_swappable.h"
33
33
#include"../templates/tag_init.h"
34
+
#include"../templates/tag_piecewise_constrcut.h"
34
35
35
36
namespacehud
36
37
{
@@ -96,6 +97,20 @@ namespace hud
96
97
static_assert(hud::is_nothrow_move_constructible_v<type_t, UType>, "type_t(UType&&) move constructor is throwable. tuple is not designed to allow throwable move constructible components");
97
98
}
98
99
100
+
/**
101
+
* Piecewise constructor.
102
+
* @tparam type_t Parameter pack for constructing.
103
+
* @tparam indexes Index sequence for elements to extract from the tuple.
104
+
* @param tuple_type Reference to the tuple to move from.
105
+
* @param ... Index sequences used to unpack the tuple elements.
static_assert(hud::is_nothrow_constructible_v<type_t, hud::get<indexes>(hud::move(tuple))...>, "type_t(hud::get<indexes>(tuple)&&...) constructor is throwable. pair is not designed to allow throwable constructible components");
112
+
}
113
+
99
114
/**
100
115
* Assigns operator.
101
116
* @tparam UType type_t of other tuple_leaf parameter
@@ -132,7 +147,7 @@ namespace hud
132
147
* Default constructor that calls all tuple leafs default constructors.
0 commit comments