Section: 17.4.1 [cstdint.syn], 16.4.2.3 [headers] Status: New Submitter: Dawid Pilarski Opened: 2020-01-14 Last modified: 2020-01-25
Priority: 3
View all other issues in [cstdint.syn].
View all issues with New status.
Discussion:
This issue has been submitted, because the editorial change requests c++-draft-issue 3521 and c++-draft-pull request 3528 has been rejected as not being editorial changes:
Currently given wording of 17.4.1 [cstdint.syn]p2:
The header defines all types and macros the same as the C standard library header
<stdint.h>.
might be understood as intended: typedefs inside stdint.h and inside cstdint in namespace
std:: refer to the same types, but another interpretation could be, that it's understood as:
cstdint provides typedefs not in namespace
std, because it would be a different definition than one in stdint.h).
Also 16.4.2.3 [headers]p5 is non sufficiently clear:
[…] the contents of each header
cnameis the same as that of the corresponding headername.h[…]
As it doesn't say what does "same content" mean. For example is an implementation allowed to do following:
// __impl.h
typedef int __my_int;
namespace std { typedef long __my_int; }
// cname header
#include "__impl.h"
namespace std {
typedef __my_int uint32_t;
}
// name.h header
#include "__impl.h"
typedef __my_int uint32_t;
?
In this case typedef from namespacestd and from global namespace refer to different types?
Proposed change:
Apply wording, that will unambiguously make typedefs from namespace std refer to the same types
as typedefs from global namespace for all headers name.h and their corresponding headers
cname.
[2020-01-25 Issue Prioritization]
Priority to 3 after reflector discussion.
Proposed resolution: