ISO C++
ISO C++
api
api
evolution
evolution
deprecation
deprecation
history
history
API Evolution and Deprecation History
API Evolution and Deprecation History
A list of user-visible changes, in chronological order
A list of user-visible changes, in chronological order
3.0
3.0
Extensions moved to include/ext .
Extensions moved to include/ext .
Include files from the SGI/HP sources that pre-date the ISO standard
Include files from the SGI/HP sources that pre-date the ISO standard
are added. These files are placed into
are added. These files are placed into
the include/backward directory and a deprecated warning
the include/backward directory and a deprecated warning
is added that notifies on inclusion (-Wno-deprecated
is added that notifies on inclusion (-Wno-deprecated
deactivates the warning.)
deactivates the warning.)
Deprecated include added.
Deprecated include added.
Removal of include , , , , , , and .
Removal of include , , , , , , and .
3.1
3.1
Extensions from SGI/HP moved from namespace std
Extensions from SGI/HP moved from namespace std
to namespace __gnu_cxx
. As part of this, the following
to namespace __gnu_cxx
. As part of this, the following
new includes are
new includes are
added: , , , , and .
added: , , , , and .
Extensions to basic_filebuf
introduced: __gnu_cxx::enc_filebuf
, and __gnu_cxx::stdio_filebuf
.
Extensions to basic_filebuf
introduced: __gnu_cxx::enc_filebuf
, and __gnu_cxx::stdio_filebuf
.
Extensions to tree data structures added in .
Extensions to tree data structures added in .
Removal of , moved to .
Removal of , moved to .
3.2
3.2
Symbol versioning introduced for shared library.
Symbol versioning introduced for shared library.
Removal of include .
Removal of include .
Allocator changes. Change __malloc_alloc
to malloc_allocator
and __new_alloc
to new_allocator
.
Allocator changes. Change __malloc_alloc
to malloc_allocator
and __new_alloc
to new_allocator
.
For GCC releases from 2.95 through the 3.1 series, defining
For GCC releases from 2.95 through the 3.1 series, defining
__USE_MALLOC on the gcc command line would change the
__USE_MALLOC on the gcc command line would change the
default allocation strategy to instead use malloc
and
default allocation strategy to instead use malloc
and
free . (This same functionality is now spelled _GLIBCXX_FORCE_NEW , see
free . (This same functionality is now spelled _GLIBCXX_FORCE_NEW , see
this page
this page
for details.
for details.
Error handling in iostreams cleaned up, made consistent.
Error handling in iostreams cleaned up, made consistent.
3.3
3.3
3.4
3.4
Large file support.
Large file support.
Extensions for generic characters and char_traits
added in .
Extensions for generic characters and char_traits
added in .
Support for wchar_t
specializations of basic_filebuf
enhanced to support UTF-8
and Unicode
, depending on host. More hosts support basic wchar_t
functionality.
Support for wchar_t
specializations of basic_filebuf
enhanced to support UTF-8
and Unicode
, depending on host. More hosts support basic wchar_t
functionality.
Support for char_traits
beyond builtin types.
Support for char_traits
beyond builtin types.
Conformant allocator
class and usage in containers. As
Conformant allocator
class and usage in containers. As
part of this, the following extensions are
part of this, the following extensions are
added: , , , ,, .
added: , , , ,, .
This is a change from all previous versions, and may require
This is a change from all previous versions, and may require
source-level changes due to allocator-related changes to structures
source-level changes due to allocator-related changes to structures
names and template parameters, filenames, and file locations. Some,
names and template parameters, filenames, and file locations. Some,
like __simple_alloc, __allocator, __alloc,
and
like __simple_alloc, __allocator, __alloc,
and
_Alloc_traits
have been removed.
_Alloc_traits
have been removed.
Default behavior of std::allocator
has changed.
Default behavior of std::allocator
has changed.
Previous versions prior to 3.4 cache allocations in a memory
Previous versions prior to 3.4 cache allocations in a memory
pool, instead of passing through to call the global allocation
pool, instead of passing through to call the global allocation
operators (i.e., __gnu_cxx::pool_allocator ). More
operators (i.e., __gnu_cxx::pool_allocator ). More
recent versions default to the
recent versions default to the
simpler __gnu_cxx::new_allocator .
simpler __gnu_cxx::new_allocator .
Previously, all allocators were written to the SGI
Previously, all allocators were written to the SGI
style, and all STL containers expected this interface. This
style, and all STL containers expected this interface. This
interface had a traits class called _Alloc_traits
that
interface had a traits class called _Alloc_traits
that
attempted to provide more information for compile-time allocation
attempted to provide more information for compile-time allocation
selection and optimization. This traits class had another allocator
selection and optimization. This traits class had another allocator
wrapper, __simple_alloc<T,A>
, which was a
wrapper, __simple_alloc<T,A>
, which was a
wrapper around another allocator, A, which itself is an allocator
wrapper around another allocator, A, which itself is an allocator
for instances of T. But wait, there's more:
for instances of T. But wait, there's more:
__allocator<T,A>
is another adapter. Many of
__allocator<T,A>
is another adapter. Many of
the provided allocator classes were SGI style: such classes can be
the provided allocator classes were SGI style: such classes can be
changed to a conforming interface with this wrapper:
changed to a conforming interface with this wrapper:
__allocator<T, __alloc>
is thus the same as
__allocator<T, __alloc>
is thus the same as
allocator<T>
.
allocator<T>
.
The class allocator used the typedef
The class allocator used the typedef
__alloc to select an underlying allocator that
__alloc to select an underlying allocator that
satisfied memory allocation requests. The selection of this
satisfied memory allocation requests. The selection of this
underlying allocator was not user-configurable.
underlying allocator was not user-configurable.
Extension Allocators
Extension Allocators
|
|
Allocator (3.4)
Allocator (3.4)
Header (3.4)
Header (3.4)
Allocator (3.[0-3])
Allocator (3.[0-3])
Header (3.[0-3])
Header (3.[0-3])
|
|
__gnu_cxx::new_allocator<T>
__gnu_cxx::new_allocator<T>
std::__new_alloc
std::__new_alloc
|
|
__gnu_cxx::malloc_allocator<T>
__gnu_cxx::malloc_allocator<T>
std::__malloc_alloc_template<int>
std::__malloc_alloc_template<int>
|
|
__gnu_cxx::debug_allocator<T>
__gnu_cxx::debug_allocator<T>
std::debug_alloc<T>
std::debug_alloc<T>
|
|
__gnu_cxx::__pool_alloc<T>
__gnu_cxx::__pool_alloc<T>
std::__default_alloc_template<bool,int>
std::__default_alloc_template<bool,int>
|
|
__gnu_cxx::__mt_alloc<T>
__gnu_cxx::__mt_alloc<T>
|
|
__gnu_cxx::bitmap_allocator<T>
__gnu_cxx::bitmap_allocator<T>
Releases after gcc-3.4 have continued to add to the collection
Releases after gcc-3.4 have continued to add to the collection
of available allocators. All of these new allocators are
of available allocators. All of these new allocators are
standard-style. The following table includes details, along with
standard-style. The following table includes details, along with
the first released version of GCC that included the extension allocator.
the first released version of GCC that included the extension allocator.
Extension Allocators Continued
Extension Allocators Continued
|
|
Allocator
Allocator
Include
Include
Version
Version
|
|
__gnu_cxx::array_allocator<T>
__gnu_cxx::array_allocator<T>
4.0.0
4.0.0
|
|
__gnu_cxx::throw_allocator<T>
__gnu_cxx::throw_allocator<T>
4.2.0
4.2.0
Debug mode first appears.
Debug mode first appears.
Precompiled header support PCH support.
Precompiled header support PCH support.
Macro guard for changed, from _GLIBCPP_ to _GLIBCXX_ .
Macro guard for changed, from _GLIBCPP_ to _GLIBCXX_ .
Extension added.
Extension added.
Extension added.
Extension added.
4.0
4.0
TR1 features first appear.
TR1 features first appear.
Extension allocator added.
Extension allocator added.
Extension codecvt
specializations moved to .
Extension codecvt
specializations moved to .
Removal of .
Removal of .
4.1
4.1
Removal of from all standard headers: now has to be explicitly included for std::assert
calls.
Removal of from all standard headers: now has to be explicitly included for std::assert
calls.
Extensions for policy-based data structures first added. New includes,
Extensions for policy-based data structures first added. New includes,
types, namespace pb_assoc
.
types, namespace pb_assoc
.
Extensions for typelists added in .
Extensions for typelists added in .
Extension for policy-based basic_string
first added: __gnu_cxx::__versa_string
in .
Extension for policy-based basic_string
first added: __gnu_cxx::__versa_string
in .
4.2
4.2
Default visibility attributes applied to namespace std
. Support for -fvisibility
.
Default visibility attributes applied to namespace std
. Support for -fvisibility
.
TR1 , , and C compatibility headers added.
TR1 , , and C compatibility headers added.
Extensions for concurrent programming consolidated
Extensions for concurrent programming consolidated
into and ,
into and ,
including change of namespace to __gnu_cxx
in some
including change of namespace to __gnu_cxx
in some
cases. Added types
cases. Added types
include _Lock_policy
, __concurrence_lock_error
, __concurrence_unlock_error
, __mutex
, __scoped_lock
.
include _Lock_policy
, __concurrence_lock_error
, __concurrence_unlock_error
, __mutex
, __scoped_lock
.
Extensions for type traits consolidated
Extensions for type traits consolidated
into . Additional traits are added
into . Additional traits are added
(__conditional_type
, __enable_if
, others.)
(__conditional_type
, __enable_if
, others.)
Extensions for policy-based data structures revised. New includes,
Extensions for policy-based data structures revised. New includes,
types, namespace moved to __pb_ds
.
types, namespace moved to __pb_ds
.
Extensions for debug mode modified: now nested in namespace
Extensions for debug mode modified: now nested in namespace
std::__debug
and extensions in namespace
std::__debug
and extensions in namespace
__gnu_cxx::__debug
.
__gnu_cxx::__debug
.
Extensions added:
Extensions added:
and .
and .
4.3
4.3
C++0X features first appear.
C++0X features first appear.
TR1 and 's mathematical special function added.
TR1 and 's mathematical special function added.
Backward include edit.
Backward include edit.
Removed
Removed
Added
Added
and
and
Added in C++0x
Added in C++0x
and
and
Header dependency streamlining.
Header dependency streamlining.
no longer includes , , or
no longer includes , , or
no longer includes or , adds
no longer includes or , adds
no longer includes
no longer includes
no longer includes , , or , adds
no longer includes , , or , adds
no longer includes
no longer includes
no longer includes or
no longer includes or
no longer includes or
no longer includes or
no longer includes or
no longer includes or
no longer includes
no longer includes
no longer includes or
no longer includes or
Debug mode for and .
Debug mode for and .
Parallel mode first appears.
Parallel mode first appears.
Variadic template implementations of items in and
Variadic template implementations of items in and
.
.
Default what
implementations give more elaborate
Default what
implementations give more elaborate
exception strings for bad_cast
,
exception strings for bad_cast
,
bad_typeid
, bad_exception
, and
bad_typeid
, bad_exception
, and
bad_alloc
.
bad_alloc
.
PCH binary files no longer installed. Instead, the source files are installed.
PCH binary files no longer installed. Instead, the source files are installed.
Namespace pb_ds moved to __gnu_pb_ds.
Namespace pb_ds moved to __gnu_pb_ds.
4.4
4.4
C++0X features.
C++0X features.
Added.
Added.
,
,
,
,
,
,
,
,
,
,
,
,
,
,
Updated and improved.
Updated and improved.
,
,
,
,
Use of the GNU extension namespace association converted to inline namespaces.
Use of the GNU extension namespace association converted to inline namespaces.
Preliminary support for initializer_list
Preliminary support for initializer_list
and defaulted and deleted constructors in container classes.
and defaulted and deleted constructors in container classes.
unique_ptr .
unique_ptr .
Support for new character types char16_t
Support for new character types char16_t
and char32_t added
and char32_t added
to char_traits , basic_string , numeric_limits ,
to char_traits , basic_string , numeric_limits ,
and assorted compile-time type traits.
and assorted compile-time type traits.
Support for string conversions to_string
Support for string conversions to_string
and to_wstring .
and to_wstring .
Member functions taking string arguments were added to iostreams
Member functions taking string arguments were added to iostreams
including basic_filebuf , basic_ofstream ,
including basic_filebuf , basic_ofstream ,
and basic_ifstream .
and basic_ifstream .
Exception propagation support,
Exception propagation support,
including exception_ptr , current_exception , copy_exception ,
including exception_ptr , current_exception , copy_exception ,
and rethrow_exception .
and rethrow_exception .
Uglification of try to __try
Uglification of try to __try
and catch to __catch .
and catch to __catch .
Audit of internal mutex usage, conversion to functions returning static
Audit of internal mutex usage, conversion to functions returning static
local mutex.
local mutex.
Extensions
Extensions
added:
added:
and . Support
and . Support
for non-standard pointer types has been added
for non-standard pointer types has been added
to vector
to vector
and forward_list .
and forward_list .
4.5
4.5
C++0X features.
C++0X features.
Added.
Added.
,
,
,
,
Updated and improved.
Updated and improved.
,
,
,
,
Add support for explicit operators and standard layout types.
Add support for explicit operators and standard layout types.
Profile mode first appears.
Profile mode first appears.
Support for decimal floating-point arithmetic, including decimal32 , decimal64 , and decimal128 .
Support for decimal floating-point arithmetic, including decimal32 , decimal64 , and decimal128 .
Python pretty-printers are added for use with appropriately-advanced versions of gdb .
Python pretty-printers are added for use with appropriately-advanced versions of gdb .
Audit for application of function attributes notrow, const, pure, and noreturn.
Audit for application of function attributes notrow, const, pure, and noreturn.
The default behavior for comparing typeinfo names changed, so
The default behavior for comparing typeinfo names changed, so
in , __GXX_MERGED_TYPEINFO_NAMES
in , __GXX_MERGED_TYPEINFO_NAMES
now defaults to zero.
now defaults to zero.
Extensions modified: .
Extensions modified: .