Title
<bitset> still overspecified
Status
c++11
Section
[template.bitset]
Submitter
Martin Sebor

Created on 2009-10-29.00:00:00 last changed 154 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change [template.bitset]:

#include <cstddef>        // for size_t
#include <string>
#include <iosfwd>         // for istream, ostream
namespace std {
...
Date: 2010-02-08.00:00:00

[ 2010-02-08 Moved to Tentatively Ready after 6 positive votes on c++std-lib. ]

Date: 2009-10-29.00:00:00

Issue 1227<bitset> synopsis overspecified makes the observation that std::bitset, and in fact the whole library, may be implemented without needing to #include <stdexcept> in any library header. The proposed resolution removes the #include <stdexcept> directive from the header.

I'd like to add that the <bitset> header (as well as the rest of the library) has also been implemented without #including the <cstddef> header in any library header. In the case of std::bitset, the template is fully usable (i.e., it may be instantiated and all its member functions may be used) without ever mentioning size_t. In addition, just like no library header except for <bitset> #includes <stdexcept> in its synopsis, no header but <bitset> #includes <cstddef> either.

Thus I suggest that the #include <cstddef> directive be similarly removed from the synopsis of <bitset>.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg1319
2010-10-21 18:28:33adminsetmessages: + msg1318
2009-10-29 00:00:00admincreate