C++ Standard Library

In the C++ programming language, the C++ Standard Library is a collection of classes and functions, which are written in the core language and part of the C++ ISO Standard itself.The C++ Standard Library provides several generic containers, functions to utilize and manipulate these containers, function objects, generic strings and streams (including interactive and file I/O), support for some language features, and everyday functions for tasks such as finding the square root of a number. The C++ Standard Library also incorporates 18 headers of the ISO C90 C standard library ending with ".h", but their use is deprecated.No other headers in the C++ Standard Library end in ".h". Features of the C++ Standard Library are declared within the std namespace.
The C++ Standard Library is based upon conventions introduced by the Standard Template Library (STL), and has been influenced by research in generic programming and developers of the STL such as Alexander Stepanov and Meng Lee. Although the C++ Standard Library and the STL share many features, neither is a strict superset of the other.
A noteworthy feature of the C++ Standard Library is that it not only specifies the syntax and semantics of generic algorithms, but also places requirements on their performance.These performance requirements often correspond to a well-known algorithm, which is expected but not required to be used. In most cases this requires linear time O(n) or linearithmic time O(n log n), but in some cases higher bounds are allowed, such as quasilinear time O(n log2 n) for stable sort (to allow in-place merge sort). Previously sorting was only required to take O(n log n) on average, allowing the use of quicksort, which is fast in practice but has poor worst-case performance, but introsort was introduced to allow both fast average performance and optimal worst-case complexity, and as of C++11, sorting is guaranteed to be at worst linearithmic. In other cases requirements remain laxer, such as selection, which is only required to be linear on average (as in quicksort),not requiring worst-case linear as in introselect.
The C++ Standard Library underwent ISO standardization as part of the C++ ISO Standardization effort, and is undergoing further work regarding standardization of expanded functionality.
The C++ Standard Library can be categorized into two parts:
* The Standard Function Library: This library consists of general-purpose,stand-alone functions that are not part of any class. The function library is inherited from C.
* The Object Oriented Class Library: This is a collection of classes and associated functions.
The Standard Function Library:
The standard function library is divided into the following categories: -
* I/O
* String and character handling
* Mathematical
* Time, date, and localization
* Dynamic allocation
* Miscellaneous
* Wide-character functions
The Object Oriented Class Library:
Standard C++ Object Oriented Library defines an extensive set of classes that provide support for a number of common activities, including I/O, strings, and numeric processing. This library includes the following.
* The Standard C++ I/O Classes
* The String Class
* The Numeric Classes
* The STL Container Classes
* The STL Algorithms
* The STL Function Objects
* The STL Iterators
* The STL Allocators
* The Localization library
* Exception Handling Classes
* Miscellaneous Support Library
C++ Standard Library header files
The interface of C++ standard library is defined by the following collection of header files.
Utilities library: -
<csetjmp> Macro (and function) that saves (and jumps) to an execution context
<cstdarg> Handling of variable length argument lists
<typeinfo> Runtime type information utilities
<typeindex> (since C++11) std::type_index
<type_traits> (since C++11) Compile-time type information
<bitset> std::bitset class template
<functional> Function objects, designed for use with the standard algorithms
<utility> Various utility components
<ctime> C-style time/date utilites
<chrono> (since C++11) C++ time utilites
<cstddef> typedefs for types such as size_t, NULL and others
<initializer_list> (since C++11) std::initializer_list class template
<tuple> (since C++11) std::tuple class template
Dynamic memory management
<new>   Low-level memory management utilities<br>
<memory>   Higher level memory management utilities<br>
<scoped_allocator>(since C++11)    Nested allocator class <br>

Numeric limits
<climits>  limits of integral types
<cfloat>  limits of float types
<cstdint> (since C++11)  fixed-size types and limits of other types
<cinttypes> (since C++11)  formatting macros , intmax_t and uintmax_t math and conversions
<limits>  standardized way to query properties of fundamental types

Error handling
<exception>  Exception handling utilities
<stdexcept>  Standard exception objects
<cassert>  Conditionally compiled macro that compares its argument to zero
<system_error> (since C++11)  defines std::error_code, a platform-dependent error code
<cerrno>  Macro containing the last error number
Strings library
<cctype>  functions to determine the type contained in character data
<cwctype>  functions for determining the type of wide character data
<cstring>  various narrow character string handling functions
<cwchar>  various wide and multibyte string handling functions
<cuchar> (since C++11)  C-style Unicode character conversion functions
<string>  std::basic_string class template 
Containers library
<array> (since C++11)  std::array container
<vector>  std::vector container
<deque>  std::deque container
<list>  std::list container
<forward_list> (since C++11)  std::forward_list container
<set>  std::set and std::multiset associative containers
<map>  std::map and std::multimap associative containers
<unordered_set> (since C++11)  std::unordered_set and std::unordered_multiset unordered associative containers
<unordered_map> (since C++11)  std::unordered_map and std::unordered_multimap unordered associative containers
<stack>  std::stack container adaptor
<queue>  std::queue and std::priority_queue container adaptors 

Algorithms library
: - Algorithms that operate on containers
Iterators library
: - Container iterators
Numerics library
<cmath>  Common mathematics functions
<complex>  Complex number type
<valarray>  Class for representing and manipulating arrays of values
<random> (since C++11)  Random number generators and distributions
<numeric>  Numeric operations on values in containers
<ratio> (since C++11)  Compile-time rational arithmetic
<cfenv> (since C++11)  Floating-point environment access functions 

Input/output library
<iosfwd>  forward declarations of all classes in the input/output library
<ios>  std::ios_base class, std::basic_ios class template and several typedefs
<istream>  std::basic_istream class template and several typedefs
<ostream>  std::basic_ostream class template and several typedefs
<iostream>  std::basic_iostream class template and several typedefs
<fstream>  std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs
<sstream>  std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs
<strstream>  std::strstream, std::istrstream, std::ostrstream(deprecated)
<iomanip>  Helper functions to control the format or input and output
<streambuf>  std::basic_streambuf class template
<cstdio>  C-style input-output functions

Localization library
: - Localization utilities : - C localization utilities (since C++11): - Unicode conversion facilities Regular Expressions library
(since C++11): - Classes, algorithms and iterators to support regular expression processing
Atomic Operations library
(since C++11) Atomic operations library
Thread support library
<thread> (since C++11)  std::thread class and supporting functions
<mutex> (since C++11)  mutual exclusion primitives
<shared_mutex> (since C++14)  shared mutual exclusion primitives
<future> (since C++11)  primitives for asynchronous computations
<condition_variable> (since C++11)  thread waiting conditions

C compatibility headers
<ciso646>  empty header. The macros that appear in iso646.h in C are keywords in C++
<ccomplex> (since C++11)  simply includes the header <complex>
<ctgmath> (since C++11)  simply includes the headers <ccomplex> and <cmath>: the overloads equivalent to the contents of the C header tgmath.h are already provided by <cmath> and <complex>
<cstdalign> (since C++11)  defines one compatibility macro constant
<cstdbool> (since C++11)  defines one compatibility macro constant

Deprecated headers
<assert.h> (deprecated)  behaves as if each name from <cassert> is placed in global namespace
<complex.h> (deprecated)  behaves as if each name from <ccomplex> is placed in global namespace
<ctype.h> (deprecated)  behaves as if each name from <cctype> is placed in global namespace
<errno.h> (deprecated)  behaves as if each name from <cerrno> is placed in global namespace
<fenv.h> (deprecated)  behaves as if each name from <cfenv> is placed in global namespace
<float.h> (deprecated)  behaves as if each name from <cfloat> is placed in global namespace
<inttypes.h> (deprecated)  behaves as if each name from <cinttypes> is placed in global namespace
<iso646.h> (deprecated)  behaves as if each name from <ciso646> is placed in global namespace
<limits.h> (deprecated)  behaves as if each name from <climits> is placed in global namespace
<locale.h> (deprecated)  behaves as if each name from <clocale> is placed in global namespace
<math.h> (deprecated)  behaves as if each name from <cmath> is placed in global namespace
<setjmp.h> (deprecated)  behaves as if each name from <csetjmp> is placed in global namespace
<signal.h> (deprecated)  behaves as if each name from <csignal> is placed in global namespace
<stdalign.h> (deprecated)  behaves as if each name from <cstdalign> is placed in global namespace
<stdarg.h> (deprecated)  behaves as if each name from <cstdarg> is placed in global namespace
<stdbool.h> (deprecated)  behaves as if each name from <cstdbool> is placed in global namespace
<stddef.h> (deprecated)  behaves as if each name from <cstddef> is placed in global namespace
<stdint.h> (deprecated)  behaves as if each name from <cstdint> is placed in global namespace
<stdio.h> (deprecated)  behaves as if each name from <cstdio> is placed in global namespace
<stdlib.h> (deprecated)  behaves as if each name from <cstdlib> is placed in global namespace
<string.h> (deprecated)  behaves as if each name from <cstring> is placed in global namespace
<tgmath.h> (deprecated)  behaves as if each name from <ctgmath> is placed in global namespace
<time.h> (deprecated)  behaves as if each name from <ctime> is placed in global namespace
<uchar.h> (deprecated)  behaves as if each name from <cuchar> is placed in global namespace
<wchar.h> (deprecated)  behaves as if each name from <cwchar> is placed in global namespace
<wctype.h> (deprecated)  behaves as if each name from <cwctype> is placed in global namespace 


Free Web Hosting