File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
include/DRAMUtils/DRAMUtils/util Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,23 @@ class IdVariant<id_field_name, util::type_sequence<Ts...>>
88
88
}
89
89
90
90
public:
91
+ // Default constructor
92
+ IdVariant () = default ;
93
+
94
+ // copy/move constructors
95
+ IdVariant (const IdVariant&) = default ;
96
+ IdVariant (IdVariant&&) noexcept = default ;
97
+
98
+ // copy/move assignment
99
+ IdVariant& operator =(const IdVariant&) = default ;
100
+ IdVariant& operator =(IdVariant&&) noexcept = default ;
101
+
102
+ // Explicit forward constructor
103
+ template <typename T, typename = std::enable_if_t <!std::is_same_v<std::decay_t <T>, IdVariant> || std::is_lvalue_reference_v<T>>>
104
+ explicit IdVariant (T&& variant) {
105
+ setVariant (std::forward<T>(variant));
106
+ }
107
+
91
108
// Compile time check for MemSpec type
92
109
template <typename T>
93
110
void setVariant (T&& variant) {
You can’t perform that action at this time.
0 commit comments