| 5774 | ////////////////////////////////////////////////////////////////////////// |
| 5775 | |
| 5776 | int ArrTest() |
| 5777 | { |
| 5778 | //SizedArray<int, 8> intArr; |
| 5779 | //Array<int> intArr; |
| 5780 | //std::vector<int> intArr; |
| 5781 | BfSizedVector<int, 8> intArr; |
| 5782 | |
| 5783 | //int val = intArr.GetLastSafe(); |
| 5784 | |
| 5785 | intArr.push_back(123); |
| 5786 | intArr.pop_back(); |
| 5787 | intArr.push_back(234); |
| 5788 | |
| 5789 | intArr.push_back(345); |
| 5790 | //intArr.push_back(567); |
| 5791 | |
| 5792 | //auto itr = std::find(intArr.begin(), intArr.end(), 234); |
| 5793 | //intArr.erase(itr); |
| 5794 | |
| 5795 | for (auto itr = intArr.begin(); itr != intArr.end(); ) |
| 5796 | { |
| 5797 | if (*itr == 234) |
| 5798 | itr = intArr.erase(itr); |
| 5799 | else |
| 5800 | itr++; |
| 5801 | } |
| 5802 | |
| 5803 | return (int)intArr.size(); |
| 5804 | //intArr.RemoveAt(2); |
| 5805 | } |
| 5806 | |
| 5807 | ////////////////////////////////////////////////////////////////////////// |
| 5808 | |