Selaa lähdekoodia

Stop using deprecated decls, and fix missing header for back_inserter

default_compile_flags
vector-of-bool 4 vuotta sitten
vanhempi
commit
4829527e4d
3 muutettua tiedostoa jossa 15 lisäystä ja 13 poistoa
  1. +13
    -12
      src/dds/build/plan/full.cpp
  2. +1
    -1
      src/dds/solve/solve.cpp
  3. +1
    -0
      src/dds/util/parallel.hpp

+ 13
- 12
src/dds/build/plan/full.cpp Näytä tiedosto

@@ -24,18 +24,19 @@ namespace {

template <typename T, typename Range>
decltype(auto) pair_up(T& left, Range& right) {
auto rep = ranges::view::repeat(left);
return ranges::view::zip(rep, right);
auto rep = ranges::views::repeat(left);
return ranges::views::zip(rep, right);
}

} // namespace

void build_plan::render_all(build_env_ref env) const {
auto templates = _packages //
| ranges::view::transform(&package_plan::libraries) //
| ranges::view::join //
| ranges::view::transform([](const auto& lib) { return pair_up(lib, lib.templates()); }) //
| ranges::view::join;
auto templates = _packages //
| ranges::views::transform(&package_plan::libraries) //
| ranges::views::join //
| ranges::views::transform(
[](const auto& lib) { return pair_up(lib, lib.templates()); }) //
| ranges::views::join;
for (const auto& [lib, tmpl] : templates) {
tmpl.render(env, lib.library_());
}
@@ -56,9 +57,9 @@ void build_plan::compile_files(const build_env& env,
fs::path filepath;
};

auto as_pending = //
ranges::view::all(filepaths) //
| ranges::view::transform([](auto&& path) {
auto as_pending = //
ranges::views::all(filepaths) //
| ranges::views::transform([](auto&& path) {
return pending_file{false, fs::weakly_canonical(path)};
})
| ranges::to_vector;
@@ -74,10 +75,10 @@ void build_plan::compile_files(const build_env& env,
};

auto comps
= iter_compilations(*this) | ranges::view::filter(check_compilation) | ranges::to_vector;
= iter_compilations(*this) | ranges::views::filter(check_compilation) | ranges::to_vector;

bool any_unmarked = false;
auto unmarked = ranges::view::filter(as_pending, ranges::not_fn(&pending_file::marked));
auto unmarked = ranges::views::filter(as_pending, ranges::not_fn(&pending_file::marked));
for (auto&& um : unmarked) {
dds_log(error, "Source file [{}] is not compiled by this project", um.filepath.string());
any_unmarked = true;

+ 1
- 1
src/dds/solve/solve.cpp Näytä tiedosto

@@ -160,7 +160,7 @@ std::vector<package_id> dds::solve(const std::vector<dependency>& deps,
pkg_id_provider_fn pkgs_prov,
deps_provider_fn deps_prov) {
auto wrap_req
= deps | ranges::v3::views::transform([](const dependency& dep) { return req_type{dep}; });
= deps | ranges::views::transform([](const dependency& dep) { return req_type{dep}; });

try {
auto solution = pubgrub::solve(wrap_req, solver_provider{pkgs_prov, deps_prov});

+ 1
- 0
src/dds/util/parallel.hpp Näytä tiedosto

@@ -1,6 +1,7 @@
#pragma once

#include <algorithm>
#include <iterator>
#include <mutex>
#include <stdexcept>
#include <thread>

Loading…
Peruuta
Tallenna