forked from OSchip/llvm-project
[flang][msvc] Avoid range-based for over initializer_list. NFC.
Msvc crashes with "INTERNAL COMPILER ERROR" when iterating over an `std::initializer_list` in a constexpr constructor. Explicitly use the iterator instead. 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: isuruf Differential Revision: https://reviews.llvm.org/D86425
This commit is contained in:
parent
795e4ee9d2
commit
c58dfbdc81
|
@ -37,8 +37,8 @@ public:
|
|||
|
||||
constexpr EnumSet() {}
|
||||
constexpr EnumSet(const std::initializer_list<enumerationType> &enums) {
|
||||
for (auto x : enums) {
|
||||
set(x);
|
||||
for (auto it{enums.begin()}; it != enums.end(); ++it) {
|
||||
set(*it);
|
||||
}
|
||||
}
|
||||
constexpr EnumSet(const EnumSet &) = default;
|
||||
|
|
Loading…
Reference in New Issue