[llvm-bugs] [Bug 49970] New: range-based for compilation fails for libstdc++ vector with -std=c++20
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Thu Apr 15 07:46:31 PDT 2021
    
    
  
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: unassignedclangbugs at nondot.org
          Reporter: ldalessandro at gmail.com
                CC: llvm-bugs at lists.llvm.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210415/8a7458d4/attachment.html>
    
    
More information about the llvm-bugs
mailing list