Changeset 1340 for cpp/common/util-stl.h
- Timestamp:
- 05/06/25 23:06:50 (2 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/util-stl.h
r1288 r1340 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 3Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2025 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 26 26 if (it != v.end()) 27 27 v.erase(it); 28 } 29 30 // c++17 implementation of c++20 std::vector::erase_if() 31 template<typename T,typename P> void erase_if(vector<T>& v, P predicate) 32 { 33 v.erase(std::remove_if(v.begin(), v.end(), predicate), v.end()); 28 34 } 29 35
Note: See TracChangeset
for help on using the changeset viewer.