Title
Does use of std::size_t in a header imply that typedef name is available to users?
Status
nad
Section
[using]
Submitter
BSI

Created on 2010-08-25.00:00:00 last changed 167 months ago

Messages

Date: 2011-03-05.21:44:45

Rationale:

The standard is correct as written.

Date: 2010-11-08.22:43:56

[ Batavia: NAD - see rationale below ]

Date: 2010-10-31.11:48:13

[ Resolution proposed by ballot comment: ]

Add a paragraph under [using] clarifying whether or not headers specified in terms of std::size_t can be used to access the typedef size_t, or whether the header <cstddef> must be included to reliably use this name.

Date: 2010-10-24.10:50:39

Addresses GB-58

It is not clear whether a library header specified in terms of a typedef name makes that same typedef name available for use, or if it simply requires that the specified type is an alias of the same type, and so the typedef name cannot be used without including the specific header that defines it. For example, is the following code required to be accepted:

#include <vector>
std::size_t x = 0;

Most often, this question concerns the typedefs defined in header <cstddef>

History
Date User Action Args
2011-03-05 21:44:45adminsetmessages: + msg5600
2010-11-08 22:43:56adminsetmessages: + msg5314
2010-11-08 22:43:56adminsetstatus: open -> nad
2010-10-24 22:33:31adminsetmessages: + msg5068
2010-08-25 00:00:00admincreate