close
이름공간
변수

C++ standard libraries extensions, version 2

cppreference.com
 
 
Technical specifications
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals TS v2)
Library fundamentals 3 (library fundamentals TS v3)
Extensions for parallelism (parallelism TS)
Extensions for parallelism 2 (parallelism TS v2)
Extensions for concurrency (concurrency TS)
Extensions for concurrency 2 (concurrency TS v2)
Concepts (concepts TS)
Ranges 틀:mark since ranges ts
Reflection (reflection TS)
Mathematical special functions (special functions TR)
 
 

Version 2 of the C++ Extensions for Library Fundamentals, ISO/IEC TS 19568:2017, defines the following new components for the C++ standard library, in addition to those defined in version 1:


The C++ detection idiom

<experimental/type_traits> 헤더에 정의됨.
Alias templates that detect whether a template-id is well-formed
(alias template)
Class type returned by detected_t on failure
(class)

A const-propagating wrapper for pointer-like objects

<experimental/propagate_const> 헤더에 정의됨.
A const-propagating wrapper for pointer-like objects
(class template)

Non-owning pointers

<experimental/memory> 헤더에 정의됨.
A class representing a non-owning pointer
(class template)

std::array creation

<experimental/array> 헤더에 정의됨.
Creates a std::array object whose size and optionally element type are deduced from the arguments
(function template) [edit]

ostream_joiner

<experimental/iterator> 헤더에 정의됨.
An output iterator that writes successive elements into an output stream, separating adjacent elements with a delimiter
(class template)

Simple random number generation facilities

A per-thread engine of type std::default_random_engine, initialized to an unpredictable state, is maintained for each thread and used by the functions below.

<experimental/random> 헤더에 정의됨.
generates a random integer in the specified range
(function template) [edit]
reseeds the per-thread random engine
(function) [edit]
<experimental/algorithm> 헤더에 정의됨.
selects n random elements from a sequence
(function template)
randomly re-orders elements in a range
(function template)

Feature test macros

<experimental/type_traits> 헤더에 정의됨.
__cpp_lib_experimental_logical_traits
a value of at least 201511 indicates that the logical operator type traits are supported
(macro constant)
__cpp_lib_experimental_detect
a value of at least 201505 indicates that the detection idiom is supported
(macro constant)
<experimental/propagate_const> 헤더에 정의됨.
__cpp_lib_experimental_propagate_const
a value of at least 201505 indicates that propagate_const is supported
(macro constant)
<experimental/functional> 헤더에 정의됨.
__cpp_lib_experimental_not_fn
a value of at least 201406 indicates that not_fn is supported
(macro constant)
<experimental/memory> 헤더에 정의됨.
__cpp_lib_experimental_observer_ptr
a value of at least 201411 indicates that observer_ptr is supported
(macro constant)
<experimental/array> 헤더에 정의됨.
__cpp_lib_experimental_make_array
a value of at least 201505 indicates that make_array is supported
(macro constant)
<experimental/iterator> 헤더에 정의됨.
__cpp_lib_experimental_ostream_joiner
a value of at least 201411 indicates that ostream_joiner is supported
(macro constant)
<experimental/vector> 헤더에 정의됨.
__cpp_lib_experimental_erase_if
a value of at least 201411 indicates that uniform container erasure is supported
(macro constant)
<experimental/numeric> 헤더에 정의됨.
__cpp_lib_experimental_gcd_lcm
a value of at least 201411 indicates that gcd and lcm are supported
(macro constant)
<experimental/random> 헤더에 정의됨.
__cpp_lib_experimental_randint
a value of at least 201511 indicates that randint and related functions are supported
(macro constant)
<experimental/source_location> 헤더에 정의됨.
__cpp_lib_experimental_source_location
a value of at least 201505 indicates that source_location is supported
(macro constant)

Merged into C++17

The following components of the library fundamentals v2 have been adopted into the C++17 standard.

<experimental/type_traits> 헤더에 정의됨.
variadic alias template for void
(alias template)
<experimental/type_traits> 헤더에 정의됨.
variadic logical AND metafunction
(class template)
variadic logical OR metafunction
(class template)
logical NOT metafunction
(class template)
<experimental/functional> 헤더에 정의됨.
Creates a function object that returns the complement of the result of the function object it holds
(function template) [edit]
<experimental/numeric> 헤더에 정의됨.
constexpr function template returning the greatest common divisor of two integers
(function template) [edit]
constexpr function template returning the least common multiple of two integers
(function template) [edit]

Merged into C++20

The following components of the library fundamentals v2 have been adopted into the C++20 standard.

Uniform container erasure

<experimental/string> 헤더에 정의됨.
Erases all elements equal to a specific value from a std::basic_string
(function template)
Erases all elements satisfying a predicate from a std::basic_string
(function template)
<experimental/deque> 헤더에 정의됨.
Erases all elements equal to a specific value from a std::deque
(function template)
Erases all elements satisfying a predicate from a std::deque
(function template)
<experimental/vector> 헤더에 정의됨.
Erases all elements equal to a specific value from a std::vector
(function template)
Erases all elements satisfying a predicate from a std::vector
(function template)
<experimental/forward_list> 헤더에 정의됨.
Erases all elements equal to a specific value from a std::forward_list
(function template)
Erases all elements satisfying a predicate from a std::forward_list
(function template)
<experimental/list> 헤더에 정의됨.
Erases all elements equal to a specific value from a std::list
(function template)
Erases all elements satisfying a predicate from a std::list
(function template)
<experimental/map> 헤더에 정의됨.
Erases all elements satisfying a predicate from a std::map
(function template)
Erases all elements satisfying a predicate from a std::multimap
(function template)
<experimental/set> 헤더에 정의됨.
Erases all elements satisfying a predicate from a std::set
(function template)
Erases all elements satisfying a predicate from a std::multiset
(function template)
<experimental/unordered_map> 헤더에 정의됨.
Erases all elements satisfying a predicate from a std::unordered_map
(function template)
Erases all elements satisfying a predicate from a std::unordered_multimap
(function template)
<experimental/unordered_set> 헤더에 정의됨.
Erases all elements satisfying a predicate from a std::unordered_set
(function template)
Erases all elements satisfying a predicate from a std::unordered_multiset
(function template)

Source code information capture

<experimental/source_location> 헤더에 정의됨.
A class representing information about the source code, such as file names, line numbers, and function names
(class)

std::array conversion

<experimental/array> 헤더에 정의됨.
Creates a std::array object from a built-in array
(function template) [edit]