<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/105498>105498</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang: OpenMP conflict with #include <format> 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          wmurw
      </td>
    </tr>
</table>

<pre>
    clang 18.1.8
clang 17.0.3 (from Visual Studio 2022)

Under windows code:
```C++
#include <iostream>
#include <chrono> 
#include <omp.h>

int main()
{
#pragma omp parallel
        { std::cout << "Hello from thread " << omp_get_thread_num() << ", nthreads " << omp_get_num_threads() << "\n"; }
        return 0;
};
```
when compiling: `clang++ main.cpp -std=c++23 -O2 -fopenmp`
generates an error:
```C++
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\format:3204:54: error: capturing a
      structured binding is not yet supported in OpenMP
 3204 |         return _STD _Widen_and_copy<_CharT>(_Buffer, _End, _STD move(_Out));
      | ^
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\format:3188:17: note: '_End' declared
      here
 3188 |     const auto [_End, _Ec] = _STD to_chars(_Buffer, _STD end(_Buffer), reinterpret_cast<uintptr_t>(_Value), 16);
      |                 ^
1 error generated.
```
although `format` is not used here and there is not even `#include <format>` (it is inside `iostream` and `chrono`) 
Without `#include <chrono>` the code compiles with `-std=c++20`

There is no problem when compiling _msvc_, although the same microsoft header files are used.

When compiling _MinGW_ with its alternative std there is no problem either.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEVU1vpDgT_jXuSykIbGjoQx8SOnnfy2hGmuzkiNymGrzyB_JHovz7lYGmM5lIe1yEDLh4qspPlR9z7-VgEI-keiDVacdjGK07vuno3nZn278fheJmgKLJiqwh-Ynk9-tMneUZA0Kbi7Mafk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