id summary reporter owner description type status milestone component version severity resolution keywords cc 13201 boost::container::small_vector invalid internal capacity DirtY.iCE.hu@… Ion Gaztañaga "Sometimes the internal capacity of the small_vector is smaller than the specified. Take the following example: {{{ #include #include int main() { boost::container::small_vector v{ 0 }; boost::container::small_vector v2(15); std::cout << &v << ' ' << (void*)&v[0] << ' ' << v.capacity() << ' ' << decltype(v)::static_capacity << '\n'; std::cout << &v2 << "" "" << (void*)&v2[0] << ' ' << v2.capacity() << ' ' << decltype(v2)::static_capacity << '\n'; } }}} Output on amd64 linux (with clang 4.0.1, but gcc exhibits the same behavior): {{{ 0x7ffe053c4700 0x7ffe053c4718 8 15 0x7ffe053c46c8 0xbbfc20 23 15 }}} On 32-bit (-m32): {{{ 0xffdfecb0 0xffdfecbc 12 15 0xffdfec88 0x86aea10 27 15 }}} Even though the capacity should be 15, it's 8 on 64-bit and 12 on 32-bit, while static_capacity reports 15. When actually trying to put 15 elements into the vector, it allocates memory from heap. " Bugs new To Be Determined container Boost 1.65.0 Problem