Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US133 15.03 Header units containing internal-linkage entities P2003 P1815 #132

Closed
wg21bot opened this issue Oct 23, 2019 · 4 comments · Fixed by cplusplus/draft#3740
Closed
Labels
Projects
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 23, 2019

It is not clear whether header-unit source code can contain internal-linkage entities.  For example the iostream header can contain:
  static ios_base::Ioinit __ioinit;
Is that permitted, or does it make the header file incompatible with being a header unit?

Proposed change:
Preference for internal linkage entities to be an error.  Thus library implementors will need an (implementation-defined) mechanism to know whether the header file is being textually included, or whether it is being processed to create a header-unit.

@wg21bot wg21bot added EWG Evolution modules Modules labels Oct 23, 2019
@jfbastien jfbastien removed the EWG Evolution label Oct 26, 2019
@jfbastien jfbastien added the EWG Evolution label Jan 7, 2020
@jfbastien
Copy link
Collaborator

From the Belfast discussion:

Poll: EWG encourages further work to solve the issue of internal-linkage-entities in header units for C++20
SF F N A SA 17 9 0 0 0
Motion passes

Poll: Accept the proposed change in US133 for C++20
SF F N A SA 0 4 1 12 7
Motion does not pass

@jfbastien
Copy link
Collaborator

jfbastien commented Jan 18, 2020

See P2003 Fixing Internal and External Linkage Entities in Header Units cplusplus/papers#740

@jensmaurer jensmaurer changed the title US133 15.03 Header units containing internal-linkage entities US133 15.03 Header units containing internal-linkage entities P2003 Jan 19, 2020
@jfbastien jfbastien added CWG Core and removed EWG Evolution labels Feb 11, 2020
@jensmaurer jensmaurer added this to TODO in CWG Feb 11, 2020
@jensmaurer
Copy link
Member

Wording integrating in P1815.

@jensmaurer jensmaurer changed the title US133 15.03 Header units containing internal-linkage entities P2003 US133 15.03 Header units containing internal-linkage entities P2003 P1815 Feb 12, 2020
@jensmaurer jensmaurer moved this from TODO to Drafting in CWG Feb 12, 2020
@jensmaurer jensmaurer moved this from Drafting to Accepted in CWG Feb 14, 2020
@jensmaurer
Copy link
Member

CWG in Prague: Accepted with modification. See paper P1815R2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
CWG
Accepted
Development

Successfully merging a pull request may close this issue.

3 participants