Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Commit 220f0bd

Browse files
ChrisThrashertylerjw
authored andcommitted
Fix to_vector for vector<bool>
For whatever reason, using braces here resulted in the compiler trying to construct a vector of two elements which then failed to compile since a const bool* isn't implicitly convertable to a bool.
1 parent 0bef617 commit 220f0bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/rsl/static_vector.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class StaticVector {
7777
*/
7878
template <typename T, size_t capacity>
7979
[[nodiscard]] auto to_vector(StaticVector<T, capacity> const& static_vector) {
80-
return std::vector<T>{static_vector.begin(), static_vector.end()};
80+
return std::vector<T>(static_vector.begin(), static_vector.end());
8181
}
8282

8383
} // namespace rsl

0 commit comments

Comments
 (0)