[all-commits] [llvm/llvm-project] d2d7a4: [flang][msvc] Avoid templated initializer list ini...
Michael Kruse via All-commits
all-commits at lists.llvm.org
Tue Sep 29 09:41:02 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d2d7a44facd2dc895d378f19233837147f587b6d
https://github.com/llvm/llvm-project/commit/d2d7a44facd2dc895d378f19233837147f587b6d
Author: Michael Kruse <llvm-project at meinersbur.de>
Date: 2020-09-29 (Tue, 29 Sep 2020)
Changed paths:
M flang/include/flang/Evaluate/constant.h
Log Message:
-----------
[flang][msvc] Avoid templated initializer list initialization of vector. NFC.
The Microsoft compiler emits an error when populating the vector with a single element of a templated argument using the brace syntax. The error is:
```
constant.h(102,1): error C2664: 'std::vector<Fortran::evaluate::value::Complex<...>, ...>::vector(std::initializer_list<_Ty>,const _Alloc &)': cannot convert argument 1 from 'initializer list' to 'std::initializer_list<_Ty>'
```
To work around this error, we replace the templated constructor with one for the expected type. Conversion to the element type has to be done by the caller.
This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>.
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D88163
More information about the All-commits
mailing list