diff --git a/src/main.cpp b/src/main.cpp index 34a81b4..0663e37 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -57,7 +57,8 @@ int main(int argc, char* argv[]) { }; int8_t exit_code = EXIT_SUCCESS; if (!files.empty()) { - vector>>> Units(files.size()); + using unit = future>>; + vector Units(files.size()); const launch& Policy = not parallel ? launch::deferred : launch::async; transform(files.cbegin(), files.cend(), Units.begin(), [&Policy, &compile](const string_view& fileName){ return async(Policy, [&fileName, &compile]() { @@ -81,8 +82,8 @@ int main(int argc, char* argv[]) { }); }); if (printResult) cout << "~~~~[Yerbacon compilation result]~~~~\n\n"; - if (any_of(Units.rbegin(), Units.rend(), [&printResult](future>>& currentFuture) -> bool { - const auto&& result = currentFuture.get(); + if (any_of(Units.rbegin(), Units.rend(), [&printResult](unit& currentFuture) -> bool { + const pair result = currentFuture.get(); const bool is_exception = result.second.has_value(); if (not is_exception) { if (printResult && !(result.first.empty() || all_of(result.first.begin(), result.first.end(), [](const char& character){