Skip to content

Commit ff5a412

Browse files
committed
Create a type once instead of once per tuple instantiation.
1 parent 5ee15e9 commit ff5a412

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/tv/tuple.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ struct tuple_value<index, void> {
9393
}
9494
};
9595

96+
struct unusable {
97+
unusable() = delete;
98+
};
99+
96100
template<typename Indexes, typename... Types>
97101
struct tuple_impl;
98102

@@ -116,9 +120,6 @@ struct tuple_impl<std::index_sequence<indexes...>, Types...> : tuple_value<index
116120
protected:
117121
// Add in an overload that is guaranteed to exist so the using operator[]
118122
// in tuple is well-formed even for empty tuples
119-
struct unusable {
120-
unusable() = delete;
121-
};
122123
void operator[](unusable) = delete;
123124
};
124125

0 commit comments

Comments
 (0)