public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114683] New: [modules] name declared in GMF in inline namespace and exported via using-decl from parent namespace is not visible to importer
@ 2024-04-10 20:22 m.cencora at gmail dot com
  2024-05-24 14:36 ` [Bug c++/114683] " nshead at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: m.cencora at gmail dot com @ 2024-04-10 20:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114683

            Bug ID: 114683
           Summary: [modules] name declared in GMF in inline namespace and
                    exported via using-decl from parent namespace is not
                    visible to importer
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: m.cencora at gmail dot com
  Target Milestone: ---

$ cat std.cpp
module;

#include "std.h"

export module std;

export namespace std
{
#ifdef WORKAROUND
inline namespace __cxx11
{
using std::__cxx11::basic_string;
}
#else
using std::basic_string;
#endif
}

$ cat std.h
#pragma once

namespace std
{
inline namespace __cxx11
{
template <typename T>
struct basic_string{};
}
}

$ cat std_user.cpp 
import std;

int main()
{
using std::basic_string;
}

$ g++ -std=c++2b -fmodules-ts std.cpp std_user.cpp
std_user.cpp: In function ‘int main()’:
std_user.cpp:5:12: error: ‘basic_string’ has not been declared in ‘std’

Works fine on clang.
Reduced from standard library headers.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-06-23  7:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10 20:22 [Bug c++/114683] New: [modules] name declared in GMF in inline namespace and exported via using-decl from parent namespace is not visible to importer m.cencora at gmail dot com
2024-05-24 14:36 ` [Bug c++/114683] " nshead at gcc dot gnu.org
2024-06-12 21:14 ` jason at gcc dot gnu.org
2024-06-13 15:06 ` cvs-commit at gcc dot gnu.org
2024-06-13 15:09 ` jason at gcc dot gnu.org
2024-06-23  7:26 ` nshead at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).