C++ 2011ISO C++2011
This table is based on the table of contents of ISO/IEC
JTC1 SC22 WG21 Doc No: N3290 Date: 2011-04-11
Final Draft International Standard, Standard for Programming Language C++
In this implementation the -std=gnu++11 or
-std=c++11 flag must be used to enable language
and library
features. See dialect
options. The pre-defined symbol
__cplusplus is used to check for the
presence of the required flag.
This page describes the C++11 support in mainline GCC SVN, not in any
particular release.
Implementation Specific BehaviorFor behaviour which is also specified by the 1998 and 2003 standards,
see C++ 1998/2003 Implementation
Specific Behavior. This section only documents behaviour which
is new in the 2011 standard.
17.6.5.12 [res.on.exception.handling]
There are no implementation-defined exception classes, only standard
exception classes (or classes derived from them) will be thrown.
17.6.5.14 [value.error.codes]
The error_category for errors originating outside
the OS, and the possible error code values for each error category,
should be documented here.
18.6.2.2 [new.badlength]what() returns
"std::bad_array_new_length".
20.6.9.1 [allocator.member]/5
Over-aligned types are not supported by
std::allocator.
20.7.2.2.1 [util.smartptr.shared.const]
When a shared_ptr constructor fails
bad_alloc (or types derived from it) will
be thrown, or when an allocator is passed to the constructor then any
exceptions thrown by the allocator.
20.7.2.0 [util.smartptr.weakptr]what() returns "bad_weak_ptr".
20.8.9.1.3 [func.bind.place]/1 There are 29
placeholders defined and the placeholder types are
CopyAssignable.
20.11.7.1 [time.clock.system]/3, /4
Time point values are truncated to time_t values.
There is no loss of precision for conversions in the other direction.
20.15.7 [meta.trans]/2aligned_storage does not support extended
alignment.
21.2.3.2 [char.traits.specializations.char16_t],
21.2.3.3 [char.traits.specializations.char32_t]
The types u16streampos and
u32streampos are both synonyms for
fpos<mbstate_t>.
The function eof returns int_type(-1).
char_traits<char16_t>::to_int_type will
transform the "noncharacter" U+FFFF to U+FFFD (REPLACEMENT CHARACTER).
This is done to ensure that to_int_type never
returns the same value as eof, which is U+FFFF.
22.3.1 [locale]
There is one global locale for the whole program, not per-thread.
22.4.5.1.2 [locale.time.get.virtuals],
22.4.5.3.2 [locale.time.put.virtuals]
Additional supported formats should be documented here.
22.4.7.1.2 [locale.messages.virtuals]
The mapping should be documented here.
23.3.2.1 [array.overview]array<T, N>::iterator is T* and
array<T, N>::const_iterator is
const T*.
23.5.4.2 [unord.map.cnstr],
23.5.5.2 [unord.multimap.cnstr],
23.5.6.2 [unord.set.cnstr],
23.5.7.2 [unord.multiset.cnstr]
The default minimal bucket count is 0 for the default constructors, range
constructors and initializer-list constructors.
25.3.12 [alg.random.shuffle]
The two-argument overload of random_shuffle
uses rand as the source of randomness.
26.5.5 [rand.predef]
The type default_random_engine is a synonym for
minstd_rand0.
26.5.6 [rand.device]
The default token argument to the
random_device constructor is
"default". Other valid arguments are
"/dev/random" and "/dev/urandom",
which determine the character special file to read random bytes from.
The "default" token will read bytes from a hardware
RNG if available (currently this only supports the IA-32 RDRAND
instruction) otherwise it is equivalent to
"/dev/urandom".
An exception of type runtime_error will be
thrown if a random_device object cannot open
or read from the source of random bytes.
26.5.8.1 [rand.dist.general]
The algorithms used by the distributions should be documented here.
26.8 [c.math] Whether the
rand function introduces data races depends on
the C library as the function is not provided by libstdc++.
27.8.2.1 [stringbuf.cons]
Whether the sequence pointers are copied by the
basic_stringbuf move constructor should be
documented here.
27.9.1.2 [filebuf.cons]
Whether the sequence pointers are copied by the
basic_filebuf move constructor should be
documented here.
28.5.1 [re.synopt],
28.5.2 [re.matchflag] ,
28.5.3 [re.err] syntax_option_type, match_flag_type
and error_type are unscoped enumeration types.
28.7 [re.traits]
The blank character class corresponds to the
ctype_base::blank mask.
29.4 [atomics.lockfree]
The values of the ATOMIC_xxx_LOCK_FREE macros depend on
the target and cannot be listed here.
30.2.3 [thread.req.native]/1native_handle_type and
native_handle are provided. The handle types
are defined in terms of the Gthreads abstraction layer, although this
is subject to change at any time. Any use of
native_handle is inherently non-portable and
not guaranteed to work between major releases of GCC.
thread: The native handle type is
a typedef for __gthread_t i.e. pthread_t
when GCC is configured with the posix thread
model. The value of the native handle is undefined for a thread
which is not joinable.
mutex and
timed_mutex:
The native handle type is __gthread_mutex_t* i.e.
pthread_mutex_t* for the posix
thread model.
recursive_mutex and
recursive_timed_mutex:
The native handle type is __gthread_recursive_mutex_t*
i.e. pthread_mutex_t* for the posix
thread model.
condition_variable: The native
handle type is __gthread_cond_t* i.e.
pthread_cond_t* for the posix
thread model.
30.6.1 [futures.overview]/2launch is a scoped enumeration type with
overloaded operators to support bitmask operations. There are no
additional bitmask elements defined.