public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "eddiejnolan at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113405] New: Can't access member type alias of concept-constrained class template specialization in global module fragment via alias template in different module Date: Mon, 15 Jan 2024 19:41:54 +0000 [thread overview] Message-ID: <bug-113405-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113405 Bug ID: 113405 Summary: Can't access member type alias of concept-constrained class template specialization in global module fragment via alias template in different module Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eddiejnolan at gmail dot com Target Milestone: --- This example shows GCC failing to resolve the member type alias "foobar" in a concept-constrained specialization of class template "corge" when it's accessed from module2 via an alias template in module1. Compiler explorer link: https://godbolt.org/z/4sh6xG6P4 Minimal reproduction: // CMakeLists.txt cmake_minimum_required(VERSION 3.28) project(repro CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) add_library(module1) target_sources(module1 PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES module1.cpp ) target_include_directories(module1 PRIVATE "include/") add_library(module2) target_sources(module2 PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES module2.cpp ) target_link_libraries(module2 PUBLIC module1) // include/foo.h template <typename> concept foo = false; template <typename> concept bar = true; template <typename> struct corge {}; template <foo T> struct corge<T> {}; template <bar T> struct corge<T> { using foobar = int; }; // module1.cpp module; #include "foo.h" export module module1; export template<class T> using corge_alias = corge<T>::foobar; // module2.cpp export module module2; import module1; struct foobaz{}; using quux = corge_alias<foobaz>;
next reply other threads:[~2024-01-15 19:41 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-15 19:41 eddiejnolan at gmail dot com [this message] 2024-01-15 19:51 ` [Bug c++/113405] " pinskia at gcc dot gnu.org 2024-01-15 21:33 ` eddiejnolan at gmail dot com 2024-01-15 22:20 ` eddiejnolan at gmail dot com 2024-01-19 3:38 ` nathanieloshead at gmail dot com 2024-01-25 3:20 ` cvs-commit at gcc dot gnu.org 2024-01-27 10:19 ` nshead at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113405-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).