diff options
| -rw-r--r-- | CMakeLists.txt | 3 | ||||
| -rw-r--r-- | conanfile.py | 5 | ||||
| -rw-r--r-- | src/wanda/filesystem.cpp | 14 |
3 files changed, 11 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3db7399..4fe0f53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project("wanda" LANGUAGES CXX) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_STANDARD "17") +set(CMAKE_CXX_STANDARD "20") if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") @@ -91,7 +91,6 @@ add_library("${PROJECT_NAME}" STATIC target_link_libraries("${PROJECT_NAME}" "${C++FS_LIBRARIES}" "CONAN_PKG::asio" - "CONAN_PKG::range-v3" "CONAN_PKG::spdlog" "Threads::Threads" ) diff --git a/conanfile.py b/conanfile.py index dbe4c65..1635cb6 100644 --- a/conanfile.py +++ b/conanfile.py @@ -25,11 +25,10 @@ class Wanda(ConanFile): "src/*", ) requires = ( - "asio/1.12.2", - "lyra/1.2.0", + "asio/1.18.1", + "lyra/1.5.1", "CUTE/2.2.6@fmorgner/stable", "spdlog/1.4.2", - "range-v3/0.4.0@ericniebler/stable", ) def configure_cmake(self): diff --git a/src/wanda/filesystem.cpp b/src/wanda/filesystem.cpp index d94894a..4da30b1 100644 --- a/src/wanda/filesystem.cpp +++ b/src/wanda/filesystem.cpp @@ -1,8 +1,7 @@ #include <wanda/filesystem.hpp> -#include <range/v3/all.hpp> - #include <random> +#include <ranges> namespace wanda { @@ -12,10 +11,13 @@ namespace wanda { return std::nullopt; } - - auto begin = std::filesystem::recursive_directory_iterator{source}; - auto end = std::filesystem::recursive_directory_iterator{}; - return ranges::make_iterator_range(begin, end) | ranges::view::filter(filter); + auto entries = std::filesystem::recursive_directory_iterator{source}; + auto result = path_list{}; + for (auto & entry : entries | std::views::filter(filter)) + { + result.push_back(entry.path()); + } + return result; } std::filesystem::path random_pick(path_list const & paths) |
