2536. What should <complex.h> do?

Section: D.5 [depr.c.headers] Status: C++17 Submitter: Richard Smith Opened: 2015-09-10 Last modified: 2017-07-30

Priority: 2

View all other issues in [depr.c.headers].

View all issues with C++17 status.

Discussion:

LWG issue 1134 removed the resolution of LWG 551, leaving an incorrect specification for the behavior of <complex.h>. This header is currently required to make std::complex (and associated functions) visible in the global namespace, but should not be so required.

[2016-09-09 Issues Resolution Telecon]

Move to Tentatively Ready

Proposed resolution:

This wording is relative to N4527.

  1. Add a new paragraph before D.5 [depr.c.headers]/2:

    -?- The header <complex.h> behaves as if it simply includes the header <ccomplex>.

  2. Change in D.5 [depr.c.headers]/2:

    -2- Every other C header, each of which has a name of the form name.h, behaves as if each name placed in the standard library namespace by the corresponding cname header is placed within the global namespace scope. It is unspecified whether these names are first declared or defined within namespace scope (3.3.6) of the namespace std and are then injected into the global namespace scope by explicit using-declarations (7.3.3).