This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.

2536. What should <complex.h> do?

Section: 17.14 [support.c.headers] Status: C++17 Submitter: Richard Smith Opened: 2015-09-10 Last modified: 2023-02-07

Priority: 2

View all other issues in [support.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 [depr.c.headers]/2:

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

  2. Change in [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).