https://bugs.llvm.org/show_bug.cgi?id=49970

            Bug ID: 49970
           Summary: range-based for compilation fails for libstdc++ vector
                    with -std=c++20
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

The following <vector> code compiles fine with C++17, and with C++20/libc++,
but fails with c++20 and libstdc++.


#include <vector>

void foo() {
  std::vector<int> ints;
#pragma omp for
  for (int i : ints); // error: condition of OpenMP for loop must be a
relational comparison ('<', '<=', '>', '>=', or '!=') of loop variable
'__begin1'"
}


Live example: https://godbolt.org/z/1q6MxMP71

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to