diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2019-07-26 16:32:33 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2019-07-26 16:32:33 -0700 |
| commit | f990dfaa5ba82155f95b75021453c075816fd4be (patch) | |
| tree | 607eb3d0a982ce16ef2c68de65dbda2d884f63d6 /toolsrc/include | |
| parent | 8900146533f8e38266ef89766a2bbacffcb67836 (diff) | |
| download | vcpkg-f990dfaa5ba82155f95b75021453c075816fd4be.tar.gz vcpkg-f990dfaa5ba82155f95b75021453c075816fd4be.zip | |
[vcpkg] Fix RealFilesystem::remove_all (#7430)
* fix remove_all
we were attempting to remove READONLY files before this, and so set them to non-READONLY
* fix linux/macos support
* whee fix vs2015
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/files.h | 2 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/base/work_queue.h | 20 |
2 files changed, 14 insertions, 8 deletions
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index a5e04db25..ae699036c 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -31,7 +31,7 @@ namespace fs struct symlink_status_t { file_status operator()(const path& p, std::error_code& ec) const noexcept; - file_status operator()(const path& p, vcpkg::LineInfo li) const noexcept; + file_status operator()(vcpkg::LineInfo li, const path& p) const noexcept; }; struct is_symlink_t { diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h index 70142e110..1c49cc1a7 100644 --- a/toolsrc/include/vcpkg/base/work_queue.h +++ b/toolsrc/include/vcpkg/base/work_queue.h @@ -12,17 +12,23 @@ namespace vcpkg namespace detail { // for SFINAE purposes, keep out of the class - template<class Action, class ThreadLocalData> - auto call_moved_action(Action& action, + // also this sfinae is so weird because Backwards Compatibility with VS2015 + template<class Action, + class ThreadLocalData, + class = decltype(std::declval<Action>()(std::declval<ThreadLocalData&>(), + std::declval<const WorkQueue<Action, ThreadLocalData>&>()))> + void call_moved_action(Action& action, const WorkQueue<Action, ThreadLocalData>& work_queue, - ThreadLocalData& tld) -> decltype(static_cast<void>(std::move(action)(tld, work_queue))) + ThreadLocalData& tld) { std::move(action)(tld, work_queue); } - template<class Action, class ThreadLocalData> - auto call_moved_action(Action& action, const WorkQueue<Action, ThreadLocalData>&, ThreadLocalData& tld) - -> decltype(static_cast<void>(std::move(action)(tld))) + template<class Action, + class ThreadLocalData, + class = decltype(std::declval<Action>()(std::declval<ThreadLocalData&>())), + class = void> + void call_moved_action(Action& action, const WorkQueue<Action, ThreadLocalData>&, ThreadLocalData& tld) { std::move(action)(tld); } @@ -32,7 +38,7 @@ namespace vcpkg struct WorkQueue { template<class F> - WorkQueue(std::uint16_t num_threads, LineInfo li, const F& tld_init) noexcept + WorkQueue(LineInfo li, std::uint16_t num_threads, const F& tld_init) noexcept { m_line_info = li; |
