Title
§[cstdint.syn]p2 and §[headers]p5 are not sufficiently clear
Status
new
Section
[cstdint.syn][headers]
Submitter
Dawid Pilarski

Created on 2020-01-14.00:00:00 last changed 58 months ago

Messages

Date: 2020-01-25.00:00:00

[ 2020-01-25 Issue Prioritization ]

Priority to 3 after reflector discussion.

Date: 2020-01-14.00:00:00

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 [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:

Definitions in both files are done the same way (cstdint provides typedefs not in namespace std, because it would be a different definition than one in stdint.h).

Also [headers]p5 is non sufficiently clear:

[…] the contents of each header cname is the same as that of the corresponding header name.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 namespace std 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.

History
Date User Action Args
2020-01-25 14:45:36adminsetmessages: + msg10963
2020-01-14 00:00:00admincreate