Title
Handling of deduction guides in global-module-fragment
Status
drwp
Section
10.4 [module.global.frag]
Submitter
Daniela Engert

Created on 2023-08-21.00:00:00 last changed 1 month ago

Messages

Date: 2023-10-06.22:55:13

Proposed resolution (approved by CWG 2023-10-06):

Add a new bullet after 10.4 [module.global.frag] bullet 3.5.7 as follows:

  • ...
  • there exists a declaration M that is not a namespace-definition for which M is decl-reachable from S and either
    • ...
    • one of M and D declares a template and the other declares a partial or explicit specialization or an implicit or explicit instantiation of that template, or
    • M declares a class template and D is a deduction guide for that template, or
Date: 2023-10-06.22:55:13

Proposed resolution (approved by CWG 2023-08-25) [SUPERSEDED]:

Add a new bullet after 10.4 [module.global.frag] bullet 3.5.7 as follows:

  • ...
  • there exists a declaration M that is not a namespace-definition for which M is decl-reachable from S and either
    • ...
    • one of M and D declares a template and the other declares a partial or explicit specialization or an implicit or explicit instantiation of that template, or
    • one of M and D declares a class template and the other declares a deduction guide for that template, or
Date: 2023-11-15.00:00:00

[Accepted as a DR at the November, 2023 meeting.]

Consider:

  // header "S.h"

  template<class T>
  struct S {
    S(const T*);
  };
  template<class T>
  S(T*) -> S<T>

  // translation unit
  module;
  #include "S.h"

  export module M;
  export using ::S;

Obviously, the using-declaration referring to the class template S is exported by M, but what about the deduction guide of S?

History
Date User Action Args
2024-04-05 21:43:46adminsetstatus: dr -> drwp
2023-12-19 10:15:28adminsetstatus: ready -> dr
2023-12-02 15:54:05adminsetstatus: tentatively ready -> ready
2023-10-06 22:55:13adminsetmessages: + msg7449
2023-10-06 22:55:13adminsetstatus: review -> tentatively ready
2023-09-16 07:00:56adminsetstatus: tentatively ready -> review
2023-08-26 21:49:54adminsetstatus: open -> tentatively ready
2023-08-21 18:52:09adminsetmessages: + msg7398
2023-08-21 00:00:00admincreate