Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/array
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,9 @@ public:
typedef const_pointer const_iterator;
typedef size_t size_type;

private:
value_type _data[N ? N : 1];

public:
array() = default;
array(std::initializer_list<T> init) {
if (init.size() != N) {
// error
}
size_t i = 0;
for(const auto& item : init) {
_data[i++] = item;
}
}
array& operator=(const array& other) = default;

reference operator[](size_type i) { return _data[i]; }
const_reference operator[](size_type i) const { return _data[i]; }
reference front() { return _data[0]; }
Expand Down