| 1 | #include <boost/container/stable_vector.hpp>
|
|---|
| 2 |
|
|---|
| 3 | int main(int argc, char** argv)
|
|---|
| 4 | {
|
|---|
| 5 | boost::container::stable_vector<unsigned> v;
|
|---|
| 6 |
|
|---|
| 7 | for (unsigned i = 0; i < 256; ++i)
|
|---|
| 8 | v.push_back(i);
|
|---|
| 9 |
|
|---|
| 10 | const unsigned last = v.last();
|
|---|
| 11 |
|
|---|
| 12 | assert(last == 255); // BOOM!
|
|---|
| 13 |
|
|---|
| 14 | return 0;
|
|---|
| 15 | }
|
|---|