Skip to content

Commit

Permalink
improving 14_23
Browse files Browse the repository at this point in the history
  • Loading branch information
pezy committed May 13, 2016
1 parent 5dec1e1 commit 90fbb89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ch14/ex14_23.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ bool operator>=(const StrVec& lhs, const StrVec& rhs)

StrVec& StrVec::operator=(std::initializer_list<std::string> il)
{
*this = StrVec(il);
auto data = alloc_n_copy(il.begin(), il.end());
free();
elements = data.first;
first_free = cap = data.second;
return *this;
}

0 comments on commit 90fbb89

Please sign in to comment.