[all-commits] [llvm/llvm-project] 2aaa5a: [flang][msvc] Disambiguate injected class name.

Michael Kruse via All-commits all-commits at lists.llvm.org
Sat Aug 22 10:16:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2aaa5a546ea016b8e2092ced1bd7147db51d483a
      https://github.com/llvm/llvm-project/commit/2aaa5a546ea016b8e2092ced1bd7147db51d483a
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2020-08-22 (Sat, 22 Aug 2020)

  Changed paths:
    M flang/include/flang/Evaluate/expression.h

  Log Message:
  -----------
  [flang][msvc] Disambiguate injected class name.

The identifier `Expr` within the scope of the Expr class (including its temple specializations) refers to the current template/instantiation (see https://en.cppreference.com/w/cpp/language/injected-class-name for details). The `MapTemplate` template expect a non-instantiated template as the first template argument, not the concrete instantiation of `Expr`.

At least msvc interprets `Expr` as the injected class name, whereas gcc and clang use the global `flang::evaluate::Expr` template. Disambiguate by explicitly using the namespace.

This patch is part of the series to [[ http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html | make flang compilable with MS Visual Studio ]].

Reviewed By: DavidTruby

Differential Revision: https://reviews.llvm.org/D85646




More information about the All-commits mailing list