Skip to content

CWG2971 [module.global.frag] Specializations for a class are not decl-reachable via it #655

@opensdh

Description

@opensdh

Reference (section label): [module.global.frag]

Link to reflector thread (if any): https://anarthal.github.io/cppblog/modules2

Issue description:

/3.5.7 means that X<0> but not Y<Z> is reachable in importers of the following:

module;
// included...
template<int> struct X {};
template<> struct X<0> {};
struct Z;
template<class> struct Y {};
template<> struct Y<Z> {};
// ...done
export module M;
export using ::X;
export using ::Z;

This is not helpful when Y is a trait defined by another library and specialized for the library being exposed as M.

Suggested resolution:

Extend /3.5 to include the case where D is a declaration of a partial or explicit specialization (or explicit instantiation) and M is a declaration of an entity that appears in D's template argument list (recursively).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions