Changes in uspace/lib/cpp/include/__bits/string/string.hpp [bc56f30:1502c05] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/__bits/string/string.hpp
rbc56f30 r1502c05 521 521 522 522 basic_string(size_type n, value_type c, const allocator_type& alloc = allocator_type{}) 523 : data_{}, size_{n}, capacity_{n }, allocator_{alloc}523 : data_{}, size_{n}, capacity_{n + 1}, allocator_{alloc} 524 524 { 525 525 data_ = allocator_.allocate(capacity_); … … 908 908 { 909 909 // TODO: if (n > max_size()) throw length_error. 910 resize_without_copy_(n );910 resize_without_copy_(n + 1); 911 911 traits_type::copy(begin(), str, n); 912 912 size_ = n;
Note:
See TracChangeset
for help on using the changeset viewer.