Skip to content

Commit ed3e086

Browse files
committed
Fix array constructor with iterators
1 parent a91122f commit ed3e086

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/xtd.core/include/xtd/basic_array.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ namespace xtd {
487487
template < class input_iterator_t >
488488
basic_array(input_iterator_t first, input_iterator_t last) {
489489
data_->items.assign(first, last);
490-
data_->upper_bound.push_back(data_->items.size() - 1);
490+
data_->upper_bound[0] = data_->items.size() - 1;
491491
}
492492

493493
basic_array(const std::vector < type_t >& items) {

0 commit comments

Comments
 (0)