Closed
Description
// A.cppm
module;
#include <ranges>
export module A;
// B.cppm
module;
#include <ranges>
export module B;
import A;
clang++ -fprebuilt-module-path=. -std=c++20 --precompile A.cppm -o A.pcm
clang++ -fprebuilt-module-path=. -std=c++20 --precompile B.cppm -o B.pcm
Compilation of the second file results in several errors like this
In module 'A' imported from B.cppm:6:
/usr/sbin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/ranges:1258:2: error: 'std::ranges::views::_All::operator()' from module 'A.<global>' is not present in definition of 'std::ranges::views::_All' provided earlier
operator() [[nodiscard]] (_Range&& __r) const
^
/usr/sbin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/ranges:1258:2: note: declaration of 'operator()' does not match
operator() [[nodiscard]] (_Range&& __r) const
^
This is using Clang trunk and libstdc++ that is distributed with GCC 12.2.1.