Skip to content

using namespace std before include causes ambiguous reference error #96423

Open
@ncihnegn

Description

@ncihnegn

With the patch suggested in #96147 applied on e7622ab,

Source:

import std;
using namespace std;

#include <vector>

int main() {
  return 0;
}

Errors:

[1/4] Scanning /Users/Temp/playground/c++-std-modules/main.cpp for CXX dependencies
[2/4] Generating CXX dyndep file CMakeFiles/main.dir/CXX.dd
[3/4] Building CXX object CMakeFiles/main.dir/main.cpp.o
FAILED: CMakeFiles/main.dir/main.cpp.o 
/usr/local/Sither/Cellar/llvm/e7622ab47/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 /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:108:28: error: reference to 'tm' is ambiguous
  108 | char *asctime(const struct tm *);
      |                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:112:8: error: reference to 'tm' is ambiguous
  112 | struct tm *getdate(const char *);
      |        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:113:8: error: reference to 'tm' is ambiguous
  113 | struct tm *gmtime(const time_t *);
      |        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:114:8: error: reference to 'tm' is ambiguous
  114 | struct tm *localtime(const time_t *);
      |        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:115:22: error: reference to 'tm' is ambiguous
  115 | time_t mktime(struct tm *) __DARWIN_ALIAS(mktime);
      |                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:116:82: error: reference to 'tm' is ambiguous
  116 | size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) __DARWIN_ALIAS(strftime);
      |                                                                                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:117:73: error: reference to 'tm' is ambiguous
  117 | char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) __DARWIN_ALIAS(strptime);
      |                                                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:125:30: error: reference to 'tm' is ambiguous
  125 | char *asctime_r(const struct tm * __restrict, char * __restrict);
      |                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:127:8: error: reference to 'tm' is ambiguous
  127 | struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict);
      |        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:127:55: error: reference to 'tm' is ambiguous
  127 | struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict);
      |                                                       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:128:8: error: reference to 'tm' is ambiguous
  128 | struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict);
      |        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:128:58: error: reference to 'tm' is ambiguous
  128 | struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict);
      |                                                          ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:137:25: error: reference to 'tm' is ambiguous
  137 | time_t timelocal(struct tm * const);
      |                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:138:22: error: reference to 'tm' is ambiguous
  138 | time_t timegm(struct tm * const);
      |                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:75:8: note: candidate found by name lookup is 'tm'
   75 | struct tm {
      |        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:16:14: note: candidate found by name lookup is 'std::tm'
   16 |   using std::tm _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:142:28: error: reference to 'timespec' is ambiguous
  142 | int nanosleep(const struct timespec *__rqtp, struct timespec *__rmtp) __DARWIN_ALIAS_C(nanosleep);
      |                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_timespec.h:33:1: note: candidate found by name lookup is 'timespec'
   33 | _STRUCT_TIMESPEC
      | ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_timespec.h:29:40: note: expanded from macro '_STRUCT_TIMESPEC'
   29 | #define _STRUCT_TIMESPEC        struct timespec
      |                                        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:15:14: note: candidate found by name lookup is 'std::timespec'
   15 |   using std::timespec _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:142:53: error: reference to 'timespec' is ambiguous
  142 | int nanosleep(const struct timespec *__rqtp, struct timespec *__rmtp) __DARWIN_ALIAS_C(nanosleep);
      |                                                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_timespec.h:33:1: note: candidate found by name lookup is 'timespec'
   33 | _STRUCT_TIMESPEC
      | ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_timespec.h:29:40: note: expanded from macro '_STRUCT_TIMESPEC'
   29 | #define _STRUCT_TIMESPEC        struct timespec
      |                                        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:15:14: note: candidate found by name lookup is 'std::timespec'
   15 |   using std::timespec _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:175:47: error: reference to 'timespec' is ambiguous
  175 | int clock_getres(clockid_t __clock_id, struct timespec *__res);
      |                                               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_timespec.h:33:1: note: candidate found by name lookup is 'timespec'
   33 | _STRUCT_TIMESPEC
      | ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_timespec.h:29:40: note: expanded from macro '_STRUCT_TIMESPEC'
   29 | #define _STRUCT_TIMESPEC        struct timespec
      |                                        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:15:14: note: candidate found by name lookup is 'std::timespec'
   15 |   using std::timespec _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:178:48: error: reference to 'timespec' is ambiguous
  178 | int clock_gettime(clockid_t __clock_id, struct timespec *__tp);
      |                                                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_timespec.h:33:1: note: candidate found by name lookup is 'timespec'
   33 | _STRUCT_TIMESPEC
      | ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_timespec.h:29:40: note: expanded from macro '_STRUCT_TIMESPEC'
   29 | #define _STRUCT_TIMESPEC        struct timespec
      |                                        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:15:14: note: candidate found by name lookup is 'std::timespec'
   15 |   using std::timespec _LIBCPP_USING_IF_EXISTS;
      |              ^
In file included from /Users/Temp/playground/c++-std-modules/main.cpp:4:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/vector:314:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/remove.h:12:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/__algorithm/find.h:31:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/cwchar:113:
In file included from /usr/local/Sither/Cellar/llvm/e7622ab47/bin/../include/c++/v1/wchar.h:127:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/wchar.h:91:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/time.h:187:54: error: reference to 'timespec' is ambiguous
  187 | int clock_settime(clockid_t __clock_id, const struct timespec *__tp);
      |                                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_timespec.h:33:1: note: candidate found by name lookup is 'timespec'
   33 | _STRUCT_TIMESPEC
      | ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/_types/_timespec.h:29:40: note: expanded from macro '_STRUCT_TIMESPEC'
   29 | #define _STRUCT_TIMESPEC        struct timespec
      |                                        ^
/usr/local/Sither/Cellar/llvm/e7622ab47/share/libc++/v1/std/ctime.inc:15:14: note: candidate found by name lookup is 'std::timespec'
   15 |   using std::timespec _LIBCPP_USING_IF_EXISTS;
      |              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: build stopped: subcommand failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:modulesC++20 modules and Clang Header Modules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions