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

    <tr>
        <th>Summary</th>
        <td>
            module before include will have a "requires clause differs in template redeclaration" error 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Using commit 5220b7bea.
```
[1/10] Scanning /usr/local/Sither/Cellar/llvm/5220b7bea/share/libc++/v1/std.compat.cppm for CXX dependencies
[2/10] Scanning /Users/Temp/playground/c++-std-modules/main.cpp for CXX dependencies
[3/10] Scanning /usr/local/Sither/Cellar/llvm/5220b7bea/share/libc++/v1/std.cppm for CXX dependencies
[4/10] Generating CXX dyndep file CMakeFiles/__cmake_cxx26.dir/CXX.dd
[5/10] Generating CXX dyndep file CMakeFiles/main.dir/CXX.dd
[6/10] Building CXX object CMakeFiles/__cmake_cxx26.dir/usr/local/Sither/Cellar/llvm/5220b7bea/share/libc++/v1/std.cppm.o
[7/10] Building CXX object CMakeFiles/__cmake_cxx26.dir/usr/local/Sither/Cellar/llvm/5220b7bea/share/libc++/v1/std.compat.cppm.o
[8/10] Linking CXX static library lib__cmake_cxx26.a
[9/10] Building CXX object CMakeFiles/main.dir/main.cpp.o
FAILED: CMakeFiles/main.dir/main.cpp.o
/usr/local/opt/llvm/bin/clang++ -I/Users/Temp/playground/c++-std-modules/_build/_deps/doctest-src -g -std=gnu++26 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -MD -MT CMakeFiles/main.dir/main.cpp.o -MF CMakeFiles/main.dir/main.cpp.o.d @CMakeFiles/main.dir/main.cpp.o.modmap -o CMakeFiles/main.dir/main.cpp.o -c /Users/Temp/playground/c++-std-modules/main.cpp
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /Users/Temp/playground/c++-std-modules/_build/_deps/doctest-src/doctest/doctest.h:514:
In file included from /usr/local/Sither/Cellar/llvm/5220b7bea/bin/../include/c++/v1/ostream:176:
In file included from /usr/local/Sither/Cellar/llvm/5220b7bea/bin/../include/c++/v1/__ostream/basic_ostream.h:14:
In file included from /usr/local/Sither/Cellar/llvm/5220b7bea/bin/../include/c++/v1/__memory/shared_ptr.h:31:
In file included from /usr/local/Sither/Cellar/llvm/5220b7bea/bin/../include/c++/v1/__memory/uninitialized_algorithms.h:13:
In file included from /usr/local/Sither/Cellar/llvm/5220b7bea/bin/../include/c++/v1/__algorithm/copy.h:12:
In file included from /usr/local/Sither/Cellar/llvm/5220b7bea/bin/../include/c++/v1/__algorithm/copy_move_common.h:12:
In file included from /usr/local/Sither/Cellar/llvm/5220b7bea/bin/../include/c++/v1/__algorithm/iterator_operations.h:13:
In file included from /usr/local/Sither/Cellar/llvm/5220b7bea/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h:13:
/usr/local/Sither/Cellar/llvm/5220b7bea/bin/../include/c++/v1/__iterator/concepts.h:222:11: error: requires clause differs in template redeclaration
  222 | requires(indirectly_readable<_Its> && ...) && invocable<_Fp, iter_reference_t<_Its>...>
      | ^
/usr/local/Sither/Cellar/llvm/5220b7bea/bin/../include/c++/v1/__iterator/concepts.h:222:11: note: previous template declaration is here
  222 | requires(indirectly_readable<_Its> && ...) && invocable<_Fp, iter_reference_t<_Its>...>
      |           ^
1 error generated.
ninja: build stopped: subcommand failed.
```

Similar to #91111.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMl9GO2ygXx5-G3KBYNo6d5CIXmWT8afR1tCtNK82dheHYoYOBBZw2-_Qr7Njpdqs2bbc7iaLEhsPhd_7AAahzolEAG5TdoWw_o50_aLtRTBwUNGpWaX7avHNCNZjpthUeZ4TE1bICGqF4j-ItyuPzd3jN7hJEiiRG2R4_MapUaItI0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