From 97ca41e1ddfbb6812e2042dcbd2db6e0e7d0bc33 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 22 Sep 2020 14:19:40 -0500 Subject: [PATCH] [flang][msvc] Add explicit function template argument to applyLamda. NFC. Like in D87961, msvc has difficulties deducing the template argument. The error message is: ``` expr-parsers.cpp(383): error C2672: 'applyLambda': no matching overloaded function found ``` Explicitly pass the first template argument to help it. This patch is part of the series to make flang compilable with MS Visual Studio . Reviewed By: DavidTruby Differential Revision: https://reviews.llvm.org/D88001 --- flang/lib/Parser/expr-parsers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flang/lib/Parser/expr-parsers.cpp b/flang/lib/Parser/expr-parsers.cpp index 35e68e364ed5..0743e120025b 100644 --- a/flang/lib/Parser/expr-parsers.cpp +++ b/flang/lib/Parser/expr-parsers.cpp @@ -379,8 +379,8 @@ template <> std::optional Parser::Parse(ParseState &state) { return Expr{Expr::DefinedBinary( std::move(op), std::move(result).value(), std::move(right))}; }}; - auto more{ - attempt(sourced(applyLambda(defBinOp, definedOpName, level5Expr)))}; + auto more{attempt( + sourced(applyLambda(defBinOp, definedOpName, level5Expr)))}; while (std::optional next{more.Parse(state)}) { result = std::move(next); result->source.ExtendToCover(source);