This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
"implementation-defined" parts of the library
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 6 May 2011 20:22:18 +0100
- Subject: "implementation-defined" parts of the library
I've compiled the following list of implementation-defined parts of
the standard library (there is also an index of implementation-defined
behaviour in the FDIS).
We are required by [defns.impl.defined] to document our implementation
defined behaviour, which we don't do for some (or most?) of the items
below.
The G++ front end documents implementation-defined behaviour at
http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Implementation.html
I think we should have a similar single place in our manual where we
list all the choices, rather than scattering it around the manual.
I'm going to start documenting missing pieces but if someone else
wants to help then I'd be grateful - it would be a great way to help
the project and to become familiar with some of the internals of
libstdc++ - volunteers would be very welcome! If a few people want to
help then I might create a wiki page so we can track what's been done
and don't duplicate work, but for now just reply to this mail if you
want to contribute some documentation. Some of the items can be
covered *very* simply, e.g. NULL is defined to be __null by this
implementation. There, that was easy, eh? :^)
If any of the items below are already covered by the libstdc++ manual
please point them out to me, to save me trawling around to see what
we've documented already. I know about
http://gcc.gnu.org/onlinedocs/libstdc++/manual/support.html#std.support.types.null
for NULL.
[compliance]/2
A freestanding implementation has an implementation-defined set of headers.
[using.linkage]/2
Whether a name from the C standard library declared with external
linkage has extern "C" or extern "C++" linkage is
implementation-defined. It is recommended that an implementation use
extern "C++" linkage for this purpose
[reentrancy]/1
Except where explicitly specified in this standard, it is
implementation-defined which functions in the Standard C++ library may
be recursively reentered.
[res.on.exception.handling]/4
Any other functions defined in the C++ Standard Library that do not
have an exception-specification may throw implementation-defined
exceptions unless otherwise specified.
[value.error.codes]/1
That object’s category() member shall return std::system_category()
for errors originating from the operating system, or a reference to an
implementation-defined error_category object for errors originating
elsewhere. The implementation shall define the possible values of
value() for each of these error categories.
[support.types]/3,5,6
The macro NULL is an implementation-defined C++ null pointer constant.
The type ptrdiff_t is an implementation-defined signed integer type
The type size_t is an implementation-defined unsigned integer type
[support.start.term]/8
If status is zero or EXIT_SUCCESS, an implementation-defined form of
the status successful termination is returned. If status is
EXIT_FAILURE, an implementation-defined form of the status
unsuccessful termination is returned.
Otherwise the status returned is implementation-defined.
[bad.alloc]/3,5
The result of calling what() on the newly constructed object is
implementation-defined.
An implementation-defined NTBS.
[new.badlength]/1
report an attempt to allocate an array of size less than zero or
greater than an implementation-defined limit.
the result of calling what() on the newly constructed object is
implementation-defined.
[type.info]/9
An implementation-defined NTBS.
[bad.cast]/3,5
The result of calling what() on the newly constructed object is
implementation-defined.
An implementation-defined NTBS.
[bad.typeid]/3,5
The result of calling what() on the newly constructed object is
implementation-defined.
An implementation-defined NTBS.
[exception]/9
An implementation-defined NTBS.
[bad.exception]/3,5
The result of calling what() on the newly constructed object is
implementation-defined.
An implementation-defined NTBS.
[support.runtime]/9
The behavior of any other function used as a signal handler in a C++
program is implementation defined.
[util.dynamic.safety]/16
It is implementation defined whether get_pointer_safety returns
pointer_safety::relaxed or pointer_safety::preferred if the
implementation has relaxed pointer safety.
[allocator.members]/5
It is implementation-defined whether over-aligned types are supported
[util.smartptr.shared.const]/6,11,31
Throws: bad_alloc, or an implementation-defined exception when a
resource other than memory
could not be obtained.
[func.bind.place]
// M is the implementation-defined number of placeholders
It is implementation-defined whether placeholder types are CopyAssignable.
[meta.trans.other]/2
It is implementation-defined whether any extended alignment is supported
[time.clock.system]/3,4
It is implementation defined whether values are rounded or truncated
to the required precision.
[char.traits.typedefs]/2
off_type, pos_type
[char.traits.specializations.char]/2,3,4
The type streampos shall be an implementation-defined type
The type streamoff shall be an implementation-defined type
The type mbstate_t is defined in <cwchar> and can represent any of the
conversion states that can occur
in an implementation-defined set of supported multibyte character
encoding rules.
[char.traits.specializations.char16_t]/1,3
The type u16streampos shall be an implementation-defined type
The member eof() shall return an implementation-defined constant
[char.traits.specializations.char16_t]/1,3
The type u32streampos shall be an implementation-defined type
The member eof() shall return an implementation-defined constant
[char.traits.specializations.wchar_t]/2,3
The type wstreampos shall be an implementation-defined type
The type mbstate_t is defined in <cwchar> and can represent any of the
conversion states that can occur
in an implementation-defined set of supported multibyte character
encoding rules.
[basic.string]/5
iterator, const_iterator
[locale]/9
Whether there is one global locale object for the entire program or
one global locale object per thread is
implementation-defined.
[locale.statics]/2
otherwise, the effect on the C locale, if any, is implementation-defined.
[facet.ctype.special]/1
The implementation-defined value of member table_size is at least 256.
[locale.codecvt]/3
The specializations required in Table 81 (22.3.1.1.1) convert the
implementation-defined native character
set.
[locale.time.get.virtuals]/5,9
An implementation may also accept additional implementation-defined formats.
It is implementation-defined whether two-digit year numbers are
accepted, and (if so) what century they
are assumed to lie in.
[locale.time.put.virtuals]/1
the sequence of characters produced for those specifiers that are
described as depending on the C locale
are instead implementation-defined.
[locale.messages.virtuals]/1,8
identified by the string name according to an implementation-defined mapping
The limit on such resources, if any, is implementation-defined.
[array.overview]/3
iterator, const_iterator
[deque.overview]/2
[forwardlist.overview]/2
[list.overview]/2
[vector.overview]/2
iterator, const_iterator, size_type, difference_type
[vector.bool]/1
iterator, const_iterator, size_type, difference_type, pointer, const_pointer
[map.overview]/2
[multimap.overview]/2
[set.overview]/2
[multiset.overview]/2
iterator, const_iterator, size_type, difference_type
[unord.map.overview]/2
[unord.multimap.overview]/2
[unord.set.overview]/2
[unord.multiset.overview]/2
iterator, const_iterator, size_type, difference_type, local_iterator,
const_local_iterator
[unord.map.cnstr]/1,3
[unord.multimap.cnstr]/1,3
[unord.set.cnstr]/1,3
[unord.multiset.cnstr]/1,3
the number of buckets is implementation-defined
the number of buckets is implementation-defined
[alg.random.shuffle]/4
The underlying source of random numbers for the first form of the
function is implementation-defined.
[complex.transcendentals]/21
The value returned for pow(0,0) is implementation-defined.
[rand.predef]/10
The choice of engine type named by this typedef is implementation-defined.
[rand.device]/3,4,6,7
The semantics and default value of the token parameter are
implementation-defined
Throws: A value of an implementation-defined type derived from
exception if the random_device
could not be initialized.
It is implementation-defined how these values are generated.
Throws: A value of an implementation-defined type derived from
exception if a random number
could not be obtained.
[rand.dist.general]/3
The algorithms for producing each of the specified distributions are
implementation-defined.
[c.math]/5
It is implementation-defined whether the rand function may introduce data races.
[iostreams.limits.pos]/1
Except as noted explicitly below, their behavior when traits::pos_type
and traits::off_type are other types is implementation-defined.
[stream.types]/1,2
streamoff, streamsize
[ios.members.static]/2
If any input or output operation has occurred using the standard
streams prior to the call, the effect is implementation-defined.
[iostate.flags]/5
constructed with implementation-defined argument values.
[stringbuf.cons]/4
[filebuf.cons]/3
It is implementation-defined whether the sequence pointers in *this
(eback(), gptr(), egptr(), pbase(), pptr(), epptr()) obtain the values
which rhs had.
[stringbuf.virtuals]/15
[filebuf.virtuals]/12
effects of setbuf
[filebuf.virtuals]/19
effects of sync when get area exists
[re.synopt]/1
[re.matchflag]/1
[re.err]/1
syntax_option_type, match_flag_type, error_type
[re.traits]/12
implementation-defined subset of the characters for which isspace(c,
getloc()) returns true
[re.results]/5
const_iterator
[thread.req.native]/1
native handles
[futures.overview]/2
type and values of enum launch