From 7cbb4244166351ff15c5b997b94f18759a6ebad0 Mon Sep 17 00:00:00 2001 From: Username404 Date: Tue, 8 Feb 2022 18:21:42 +0100 Subject: [PATCH] Add a "unit_result" type alias to main.cpp Signed-off-by: Username404 --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0b249ba..e3b3638 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -57,12 +57,13 @@ int main(int argc, char* argv[]) { }; int8_t exit_code = EXIT_SUCCESS; if (!files.empty()) { - using unit = future>>; + using unit_result = pair>; + 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]() { - pair> resultingPair; + unit_result resultingPair; try { resultingPair.first = compile(fileName); } catch (const Yerbacon::Exception& error) {