mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 02:28:42 +00:00
[core] Give StaticVector a user provided default constructor (#19110)
This commit is contained in:
@@ -242,8 +242,9 @@ template<typename T, size_t N> class StaticVector {
|
||||
size_t count_{0};
|
||||
|
||||
public:
|
||||
// Default constructor
|
||||
StaticVector() = default;
|
||||
// User provided, not "= default": otherwise `StaticVector<...> x_{}` members
|
||||
// value-initialize and memset data_, defeating the comment above.
|
||||
constexpr StaticVector() noexcept {}
|
||||
|
||||
// Iterator range constructor
|
||||
template<typename InputIt> StaticVector(InputIt first, InputIt last) {
|
||||
|
||||
Reference in New Issue
Block a user