Skip to content

Commit 052d8b8

Browse files
GinShionhaehnle
authored andcommitted
Comma expresion for MSVC fold expression bug
Boolean fold expression seems like some bugs in MSVC, it's incorrectly removed. In other projects, we found similar problems. But gcc or clang not. On the other hand, fold expression with comma seems cleaner than lambda. Referenced-by: ZigRazor/CXXGraph#415
1 parent a3f36a8 commit 052d8b8

File tree

1 file changed

+1
-4
lines changed
  • include/llvm-dialects/Dialect

1 file changed

+1
-4
lines changed

include/llvm-dialects/Dialect/OpSet.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@ class OpSet final {
9292
template <typename... OpTs> static const OpSet &get() {
9393
static const auto set = ([]() {
9494
OpSet set;
95-
(void)(... && ([&set]() {
96-
set.tryInsertOp(OpDescription::get<OpTs>());
97-
return true;
98-
})());
95+
(..., set.tryInsertOp(OpDescription::get<OpTs>()));
9996
return set;
10097
})();
10198
return set;

0 commit comments

Comments
 (0)