facebook/folly — pull request #26 by celeraone (2013-03-25 10:20:40+00:00)
Title: Fix bug in reserve() and shrink_to_fit().

impl_.e_ += newB - impl_.b_;
fails when the difference between newB and impl_.b_ isn't a multiple
of sizeof(T).

Concrete example: With
sizeof(T) = 32, alignof(T) = 8, newB = 40, impl_.b_ = 0, impl_.e_ = 0
the old code would set impl_.e_ to 32 and impl_.b_ to 40.