Skip to content

Commit 71acd46

Browse files
committed
Support deducing a c_array for make_static_vector
1 parent 3791af2 commit 71acd46

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/containers/static_vector.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ constexpr auto make_static_vector(Source && source) {
157157
return static_vector<range_value_t<Source>, size>(OPERATORS_FORWARD(source));
158158
}
159159

160+
export template<typename T, std::size_t size>
161+
constexpr auto make_static_vector(c_array<T, size> && source) {
162+
return static_vector<T, bounded::constant<size>>(std::move(source));
163+
}
164+
160165
} // namespace containers
161166

162167
template<typename T, containers::array_size_type<T> capacity>

0 commit comments

Comments
 (0)