[PATCH] D142704: [C++20][Modules] Handle template declarations in header units.

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 28 12:10:07 PST 2023


iains marked an inline comment as done.
iains added a comment.

In D142704#4088217 <https://reviews.llvm.org/D142704#4088217>, @Arthapz wrote:

> tried the patch and it seems to work with libstdc++ but not with libc++
>
>   <SNIP>
>   > rm -rf .xmake build; xmake f --toolchain=clang --cxxflags="-stdlib=libc++"; xmake b                                                                                               
>   checking for platform ... linux
>   checking for architecture ... x86_64
>   <SNIP>
>   [ 88%]: compiling.release src/main.cpp
>   error: /usr/bin/../include/c++/v1/ostream:254:20: error: 'std::basic_ostream<char>::operator<<' from module '/usr/bin/../include/c++/v1/complex' is not present in definition of 'std::ostream' in module '/usr/bin/../include/c++/v1/iostream'
>       basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb);
>                      ^
>   /usr/bin/../include/c++/v1/ostream:221:20: note: declaration of 'operator<<' does not match
>       basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&))
>                      ^
>   <SNIP>
>   
>   using namespace std;
>   
>   int main(int argc, char** argv)
>   {
>       cout << "hello world!" << endl;
>       return 0;
>   }

These seem to be a different diagnostic, do you find that is in some way related to the changes in D140261 <https://reviews.llvm.org/D140261> + follow on patches?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142704/new/

https://reviews.llvm.org/D142704



More information about the cfe-commits mailing list