C++ 2011
ISO 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 the GCC 6 series.
C++ 2011 Implementation Status
Section
Description
Status
Comments
18
Language support
18.1
General
Y
18.2
Types
Y
18.3
Implementation properties
18.3.2
Numeric Limits
18.3.2.3
Class template numeric_limits
Y
18.3.2.4
numeric_limits
members
Y
18.3.2.5
float_round_style
N
18.3.2.6
float_denorm_style
N
18.3.2.7
numeric_limits
specializations
Y
18.3.3
C Library
Y
18.4
Integer types
18.4.1
Header <cstdint>
synopsis
Y
18.5
Start and termination
Partial
C library dependency for quick_exit, at_quick_exit
18.6
Dynamic memory management
Y
18.7
Type identification
18.7.1
Class type_info
Y
18.7.2
Class bad_cast
Y
18.7.3
Class bad_typeid
Y
18.8
Exception handling
18.8.1
Class exception
Y
18.8.2
Class bad_exception
Y
18.8.3
Abnormal termination
Y
18.8.4
uncaught_exception
Y
18.8.5
Exception Propagation
Y
18.8.6
nested_exception
Y
18.9
Initializer lists
18.9.1
Initializer list constructors
Y
18.9.2
Initializer list access
Y
18.9.3
Initializer list range access
Y
18.10
Other runtime support
Y
19
Diagnostics
19.1
General
Y
19.2
Exception classes
Y
19.3
Assertions
Y
19.4
Error numbers
Y
19.5
System error support
19.5.1
Class error_category
Y
19.5.2
Class error_code
Y
19.5.3
Class error_condition
Y
19.5.4
Comparison operators
Y
19.5.5
Class system_error
Y
20
General utilities
20.1
General
20.2
Utility components
20.2.1
Operators
Y
20.2.2
Swap
Y
20.2.3
forward
and move
helpers
Y
20.2.4
Function template declval
Y
20.3
Pairs
20.3.1
In general
20.3.2
Class template pair
Y
20.3.3
Specialized algorithms
Y
20.3.4
Tuple-like access to pair
Y
20.3.5
Piecewise construction
Y
20.4
Tuples
20.4.1
In general
20.4.2
Class template tuple
20.4.2.1
Construction
Y
20.4.2.2
Assignment
Y
20.4.2.3
Swap
Y
20.4.2.4
Tuple creation functions
Y
20.4.2.5
Tuple helper classes
Y
20.4.2.6
Element access
Y
20.4.2.7
Relational operators
Y
20.4.2.8
Tuple traits
Y
20.4.2.9
Tuple specialized algorithms
Y
20.5
Class template bitset
Y
20.5.1
bitset
constructors
Y
20.5.2
bitset
members
Y
20.5.3
bitset
hash support
Y
20.5.4
bitset
operators
Y
20.6
Memory
20.6.1
In general
20.6.2
Header <memory>
synopsis
20.6.3
Pointer traits
Y
20.6.4
Pointer safety
Y
20.6.5
Align
Y
20.6.6
Allocator argument tag
Y
20.6.7
uses_allocator
Y
20.6.8
Allocator traits
Y
20.6.9
The default allocator
Y
20.6.10
Raw storage iterator
Y
20.6.11
Temporary buffers
Y
20.6.12
Specialized algorithms
20.6.12.1
addressof
Y
20.6.12.2
uninitialized_copy
Y
20.6.12.3
uninitialized_fill
Y
20.6.12.4
uninitialized_fill_n
Y
20.6.13
C library
Y
20.7
Smart pointers
20.7.1
Class template unique_ptr
Y
20.7.2
Shared-ownership pointers
Y
20.7.2.1
Class bad_weak_ptr
Y
20.7.2.2
Class template shared_ptr
Y
Uses code from
boost::shared_ptr.
20.7.2.3
Class template weak_ptr
Y
20.7.2.4
Class template emable_shared_from_this
Y
20.7.2.5
shared_ptr
atomic access
Y
20.7.2.6
Smart pointer hash support
Y
20.8
Function objects
20.8.1
Definitions
20.8.2
Requirements
20.8.3
Class template reference_wrapper
Y
20.8.4
Arithmetic operation
Y
20.8.5
Comparisons
Y
20.8.6
Logical operations
Y
20.8.7
Bitwise operations
Y
20.8.8
Negators
Y
20.8.9
Function template bind
Y
20.8.10
Function template mem_fn
Y
20.8.11
Polymorphic function wrappers
20.8.11.1
Class bad_function_call
Y
20.8.11.2
Class template function
Partial
Missing allocator support
20.8.12
Class template hash
Y
20.9
Metaprogramming and type traits
20.9.1
Requirements
Y
20.9.2
Header <type_traits>
synopsis
20.9.3
Helper classes
Y
20.9.4
Unary Type Traits
Y
20.9.4.1
Primary type categories
Y
20.9.4.2
Composite type traits
Y
20.9.4.3
Type properties
Y
20.9.5
Type property queries
Y
20.9.6
Relationships between types
Y
20.9.7
Transformations between types
20.9.7.1
Const-volatile modifications
Y
20.9.7.2
Reference modifications
Y
20.9.7.3
Sign modifications
Y
20.9.7.4
Array modifications
Y
20.9.7.5
Pointer modifications
Y
20.9.7.6
Other transformations
Y
20.10
Compile-time rational arithmetic
20.10.1
In general
20.10.2
Header <ratio>
synopsis
20.10.3
Class template ratio
Y
20.10.4
Arithmetic on ratio
s
Y
20.10.5
Comparison of ratio
s
Y
20.10.6
SI types for ratio
Y
20.11
Time utilities
20.11.3
Clock requirements
Y
20.11.4
Time-related traits
20.11.4.1
treat_as_floating_point
Y
20.11.4.2
duration_values
Y
20.11.4.3
Specializations of common_type
Y
20.11.5
Class template duration
Y
20.11.6
Class template time_point
Y
20.11.7
Clocks
20.11.7.1
Class system_clock
Y
20.11.7.2
Class steady_clock
Y
20.11.7.3
Class high_resolution_clock
Y
20.11.8
Date and time functions
Y
20.12
Scoped allocator adaptor
Y
20.12.1
Header <scoped_allocator>
synopsis
20.12.2
Scoped allocator adaptor member types
Y
20.12.3
Scoped allocator adaptor constructors
Y
20.12.4
Scoped allocator adaptor members
Y
20.12.5
Scoped allocator operators
Y
20.13
Class type_index
Y
21
Strings
21.1
General
Y
21.2
Character traits
21.2.1
Character traits requirements
Y
21.2.2
traits typedefs
Y
21.2.3
char_traits
specializations
21.2.3.1
struct char_traits<char>
Y
21.2.3.2
struct char_traits<char16_t>
Y
21.2.3.3
struct char_traits<char32_t>
Y
21.2.3.4
struct char_traits<wchar_t>
Y
21.3
String classes
Y
21.4
Class template basic_string
Y
21.5
Numeric Conversions
Y
21.6
Hash support
Y
21.7
Null-terminated sequence utilities
Partial
C library dependency.
Missing
22
Localization
22.1
General
Y
22.2
Header <locale>
synopsis
Y
22.3
Locales
22.3.1
Class locale
Y
22.3.2
locale
globals
Y
22.3.3
Convenience interfaces
22.3.3.1
Character classification
Y
22.3.3.2
Conversions
22.3.3.2.1
Character conversions
Y
22.3.3.2.2
string
conversions
Y
22.3.3.2.3
Buffer conversions
Y
22.4
Standard locale
categories
22.4.1
The ctype
category
Y
22.4.2
The numeric category
22.4.2.1
num_get
Y
22.4.2.2
num_put
Y
22.4.3
The numeric punctuation facet
Y
22.4.4
The collate category
Y
22.4.5
The time category
22.4.5.1
Class template time_get
Y
22.4.5.2
Class template time_get_byname
Y
22.4.5.3
Class template time_put
Y
22.4.5.3
Class template time_put_byname
Y
22.4.6
The monetary category
22.4.6.1
Class template money_get
Y
22.4.6.2
Class template money_put
Y
22.4.6.3
Class template money_punct
Y
22.4.6.4
Class template money_punct_byname
Y
22.4.7
The message retrieval category
Y
22.4.8
Program-defined facets
Y
22.5
Standard code conversion facets
Y
22.6
C Library Locales
Y
23
Containers
23.1
General
23.2
Container requirements
23.2.1
General container requirements
Y
23.2.2
Container data races
Y
23.2.3
Sequence containers
Y
23.2.4
Associative containers
Y
23.2.5
Unordered associative containers
Y
23.3
Sequence containers
23.3.2
Class template array
Y
23.3.3
Class template deque
Y
23.3.4
Class template forward_list
Y
23.3.5
Class template list
Y
23.3.6
Class template vector
Y
23.3.7
Class vector<bool>
Y
23.4
Associative containers
23.4.4
Class template map
Y
23.4.5
Class template multimap
Y
23.4.6
Class template set
Y
23.4.7
Class template multiset
Y
23.5
Unordered associative containers
23.5.4
Class template unordered_map
Y
23.5.5
Class template unordered_multimap
Y
23.5.6
Class template unordered_set
Y
23.5.7
Class template unordered_multiset
Y
23.6
Container adaptors
23.6.1
Class template queue
Y
23.6.2
Class template priority_queue
Y
23.6.3
Class template stack
Y
24
Iterators
24.1
General
Y
24.2
Iterator requirements
Y
24.3
Header <iterator>
synopsis
Y
24.4
Iterator primitives
Y
24.5
Iterator adaptors
24.5.1
Reverse iterators
Y
24.5.2
Insert iterators
Y
24.5.3
Move iterators
Y
24.6
Stream iterators
24.6.1
Class template istream_iterator
Y
24.6.2
Class template ostream_iterator
Y
24.6.3
Class template istreambuf_iterator
Y
24.6.4
Class template ostreambuf_iterator
Y
24.6.5
range access
Y
25
Algorithms
25.1
General
25.2
Non-modifying sequence operations
Y
25.3
Mutating sequence operations
Y
25.4
Sorting and related operations
Y
25.5
C library algorithms
Y
26
Numerics
26.1
General
Y
26.2
Numeric type requirements
Y
26.3
The floating-point environment
Y
26.4
Complex numbers
Y
26.5
Random number generation
26.5.1
Requirements
26.5.2
Header <random>
synopsis
26.5.3
Random number engine class templates
26.5.3.1
Class template linear_congruential_engine
Y
26.5.3.2
Class template mersenne_twister_engine
Y
26.5.3.3
Class template subtract_with_carry_engine
Y
26.5.4
Random number engine adaptor class templates
26.5.4.2
Class template discard_block_engine
Y
26.5.4.3
Class template independent_bits_engine
Y
26.5.4.4
Class template shuffle_order_engine
Y
26.5.5
Engines and engine adaptors with predefined parameters
Y
26.5.6
Class random_device
Y
26.5.7
Utilities
26.5.7.1
Class seed_seq
Y
26.5.7.2
Function template generate_canonical
Y
26.5.8
Random number distribution class templates
26.5.8.2
Uniform distributions
26.5.8.2.1
Class template uniform_int_distribution
Y
26.5.8.2.2
Class template uniform_real_distribution
Y
26.5.8.3
Bernoulli distributions
26.5.8.3.1
Class bernoulli_distribution
Y
26.5.8.3.2
Class template binomial_distribution
Y
26.5.8.3.3
Class template geometric_distribution
Y
26.5.8.3.4
Class template negative_binomial_distribution
Y
26.5.8.4
Poisson distributions
26.5.8.4.1
Class template poisson_distribution
Y
26.5.8.4.2
Class template exponential_distribution
Y
26.5.8.4.3
Class template gamma_distribution
Y
26.5.8.4.4
Class template weibull_distribution
Y
26.5.8.4.5
Class template extreme_value_distribution
Y
26.5.8.5
Normal distributions
26.5.8.5.1
Class template normal_distribution
Y
26.5.8.5.2
Class template lognormal_distribution
Y
26.5.8.5.3
Class template chi_squared_distribution
Y
26.5.8.5.4
Class template cauchy_distribution
Y
26.5.8.5.5
Class template fisher_f_distribution
Y
26.5.8.5.6
Class template student_t_distribution
Y
26.5.8.6
Sampling distributions
26.5.8.6.1
Class template discrete_distribution
Y
26.5.8.6.2
Class template piecewise_constant_distribution
Y
26.5.8.6.3
Class template piecewise_linear_distribution
Y
26.6
Numeric arrays
26.6.1
Header <valarray>
synopsis
Y
26.6.2
Class template valarray
Y
26.6.3
valarray
non-member operations
Y
26.6.4
Class slice
Y
26.6.5
Class template slice_array
Y
26.6.6
The gslice
class
Y
26.6.7
Class template gslice_array
Y
26.6.8
Class template mask_array
Y
26.6.9
Class template indirect_array
Y
26.6.10
valarray
range access
Y
26.7
Generalized numeric operations
26.7.1
Header <numeric>
synopsis
Y
26.7.2
accumulate
Y
26.7.3
inner_product
Y
26.7.4
partial_sum
Y
26.7.5
adjacent_difference
Y
26.7.6
iota
Y
26.8
C Library
Y
27
Input/output library
27.1
General
Y
27.2
Iostreams requirements
Y
27.2.1
Imbue Limitations
Y
27.2.2
Positioning Type Limitations
Y
27.2.3
Thread safety
Partial
27.3
Forward declarations
Y
27.4
Standard iostream objects
Y
27.4.1
Overview
Y
27.4.2
Narrow stream objects
Y
27.4.3
Wide stream objects
Y
27.5
Iostreams base classes
Y
27.6
Stream buffers
Y
27.7
Formatting and manipulators
Y
27.8
String-based streams
Y
27.9
File-based streams
Y
28
Regular expressions
28.1
General
Y
28.2
Definitions
Y
28.3
Requirements
Y
28.4
Header <regex>
synopsis
Y
28.5
Namespace std::regex_constants
Y
28.6
Class regex_error
Y
28.7
Class template regex_traits
Partial
transform_primary
is not correctly implemented
28.8
Class template basic_regex
Y
28.9
Class template sub_match
Y
28.10
Class template match_results
Y
28.11
Regular expression algorithms
Y
28.12
Regular expression Iterators
Y
28.13
Modified ECMAScript regular expression grammar
Y
29
Atomic operations
29.1
General
Y
29.2
Header <atomic>
synopsis
Y
29.3
Order and consistency
Partial
29.4
Lock-free property
Y
29.5
Atomic types
Y
29.6
Operations on atomic types
Y
29.7
Flag Type and operations
Y
29.8
Fences
Y
30
Thread support
30.1
General
Y
30.2
Requirements
Y
30.3
Threads
30.3.1
Class thread
Partial
thread::id
comparisons not well-defined
30.3.2
Namespace this_thread
Y
30.4
Mutual exclusion
30.4.1
Mutex requirements
30.4.1.1
In general
30.4.1.2
Mutex types
30.4.1.2.1
Class mutex
Y
30.4.1.2.2
Class recursive_mutex
Y
30.4.1.3
Timed mutex types
30.4.1.3.1
Class timed_mutex
Y
30.4.1.3.2
Class recursive_timed_mutex
Y
30.4.2
Locks
30.4.2.1
Class template lock_guard
Y
30.4.2.2
Class template unique_lock
Y
30.4.3
Generic locking algorithms
Y
30.4.4
Call once
30.4.4.1
Struct once_flag
Y
30.4.4.2
Function call_once
Y
30.5
Condition variables
Y
30.5.1
Class condition_variable
Y
30.5.2
Class condition_variable_any
Y
30.6
Futures
30.6.1
Overview
30.6.2
Error handling
Y
30.6.3
Class future_error
Y
30.6.4
Shared state
Y
30.6.5
Class template promise
Y
30.6.6
Class template future
Y
30.6.7
Class template shared_future
Y
30.6.8
Function template async
Y
30.6.9
Class template packaged_task
Y
Appendix D
Compatibility features
D.1
Increment operator with bool
operand
D.2
register
keyword
D.3
Implicit declaration of copy functions
D.4
Dynamic exception specifications
D.5
C standard library headers
D.6
Old iostreams members
D.7
char*
streams
D.8
Function objects
D.9
Binders
D.10
auto_ptr
D.11
Violating exception-specifications
Implementation Specific Behavior
For 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.
20.7.2.2.1 [util.smartptr.shared.const]
Only bad_alloc (or types derived from it) will
be thrown.
20.8.9.1.3 [func.bind.place]/1 There are 29
placeholders defined and the placeholder types are
CopyAssignable .
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)
.
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.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++.
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.
30.2.3 [thread.req.native]/1
native_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]/2
launch
is a scoped enumeration type with
overloaded operators to support bitmask operations. There are no
additional bitmask elements defined.