diff --git a/CMakeLists.txt b/CMakeLists.txt index faa609d..0093c63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 3.14) project(amc - VERSION 2.5.0 + VERSION 2.5.1 DESCRIPTION "Header base library of C++ containers" LANGUAGES CXX ) diff --git a/include/amc/vectorcommon.hpp b/include/amc/vectorcommon.hpp index bc5f8ec..516d7cf 100644 --- a/include/amc/vectorcommon.hpp +++ b/include/amc/vectorcommon.hpp @@ -1497,18 +1497,18 @@ class Vector : public vec::VectorWithInplaceStorage friend size_type erase(Vector &c, const V &value) { - auto it = std::remove(c.begin(), c.end(), value); - auto r = std::distance(it, c.end()); + const auto it = std::remove(c.begin(), c.end(), value); + const auto r = std::distance(it, c.end()); c.erase(it, c.end()); - return r; + return static_cast(r); } template friend size_type erase_if(Vector &c, Pred pred) { - auto it = std::remove_if(c.begin(), c.end(), pred); - auto r = std::distance(it, c.end()); + const auto it = std::remove_if(c.begin(), c.end(), pred); + const auto r = std::distance(it, c.end()); c.erase(it, c.end()); - return r; + return static_cast(r); } #endif }; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index caddfe6..cb372d1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -10,7 +10,7 @@ if (NOT GTest_FOUND) FetchContent_Declare( googletest GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG release-1.11.0 + GIT_TAG v1.14.0 ) # For Windows: Prevent overriding the parent project's compiler/linker settings @@ -54,4 +54,4 @@ add_unit_test( add_unit_test( sets_test sets_test.cpp -) \ No newline at end of file +)