ISO/IEC TS 19568:2015
(Main)Programming Languages — C++ Extensions for Library Fundamentals
Programming Languages — C++ Extensions for Library Fundamentals
ISO/IEC TS 19568:2015 describes extensions to the C++ Standard Library (1.2). These extensions are classes and functions that are likely to be used widely within a program and/or on the interface boundaries between libraries written by different organizations. ISO/IEC TS 19568:2015 is non-normative. Some of the library components in this technical specification may be considered for standardization in a future version of C++, but they are not currently part of any C++ standard. Some of the components in this technical specification may never be standardized, and others may be standardized in a substantially changed form. The goal of ISO/IEC TS 19568:2015 is to build more widespread existing practice for an expanded C++ standard library. It gives advice on extensions to those vendors who wish to provide them.
Langages de programmation — Extensions C++ pour les fondamentaux de bibliothèque
General Information
Relations
Standards Content (Sample)
TECHNICAL ISO/IEC TS
SPECIFICATION 19568
First edition
2015-10-01
Programming Languages — C++
Extensions for Library Fundamentals
Langages de programmation — Extensions C++ pour les
fondamentaux de bibliothèque
Reference number
ISO/IEC TS 19568:2015(E)
©
ISO/IEC 2015
---------------------- Page: 1 ----------------------
ISO/IEC TS 19568:2015(E)
COPYRIGHT PROTECTED DOCUMENT
© ISO/IEC 2015, Published in Switzerland
�ll ri�ht� re�erved. �nle�� otherwi�e ��e�i�ied, no �art o� thi� ���li�ation �a� �e re�rod��ed or �tilized otherwi�e in an� �or�
or �� an� �ean�, ele�troni� or �e�hani�al, in�l�din� �hoto�o��in�, or �o�tin� on the internet or an intranet, witho�t �rior
written �er�i��ion. Per�i��ion �an �e re��e�ted �ro� either �S� at the addre�� �elow or �S��� �e��er �od� in the �o�ntr� o�
the requester.
�S� �o��ri�ht o��i�e
Ch. de Blandonnet 8 • CP 401
CH-1214 Vernier, Geneva, Switzerland
Tel. +41 22 749 01 11
Fax +41 22 749 09 47
�o��ri�ht�i�o.or�
www.iso.org
ii © ISO/IEC 2015 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/IEC TS 19568:2015(E)
Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Normative references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Namespaces, headers, and modifications to standard classes . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Terms and definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Future plans (Informative) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 Feature-testing recommendations (Informative) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Modifications to the C++ Standard Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1 Uses-allocator construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 General utilities library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1 Utility components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.2 Class erased_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.2 Calling a function with a tuple of arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 Metaprogramming and type traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3.2 Other type transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4 Compile-time rational arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.5 Time utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.5.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6 System error support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4 Function objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2 Class template function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.1 function construct/copy/destroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2.2 function modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3 Searchers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.3.1 Class template default_searcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.3.1.1 default_searcher creation functions . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.3.2 Class template boyer_moore_searcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.3.2.1 boyer_moore_searcher creation functions . . . . . . . . . . . . . . . . . . . . . . . 24
4.3.3 Class template boyer_moore_horspool_searcher . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.3.3.1 boyer_moore_horspool_searcher creation functions . . . . . . . . . . . . . . . . . . 25
5 Optional objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.1 In general . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.3 optional for object types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.3.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.3.2 Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3.3 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.3.4 Swap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.3.5 Observers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.4 In-place construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
© ISO/IEC 2015 — All rights reserved 3
---------------------- Page: 3 ----------------------
ISO/IEC TS 19568:2015(E)
5.5 No-value state indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.6 Class bad_optional_access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.7 Relational operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.8 Comparison with nullopt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.9 Comparison with T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.10 Specialized algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.11 Hash support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6 Class any . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.2 Class bad_any_cast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.3 Class any . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.3.1 any construct/destruct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.3.2 any assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.3.3 any modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.3.4 any observers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.4 Non-member functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7 string_view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.2 Class template basic_string_view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.3 basic_string_view constructors and assignment operators . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.4 basic_string_view iterator support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.5 basic_string_view capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.6 basic_string_view element access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.7 basic_string_view modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.8 basic_string_view string operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.8.1 Searching basic_string_view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.9 basic_string_view non-member comparison functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.10 Inserters and extractors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.11 Hash support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.2 Shared-ownership pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
8.2.1 Class template shared_ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
8.2.1.1 shared_ptr constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.2.1.2 shared_ptr observers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
8.2.1.3 shared_ptr casts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.2.2 Class template weak_ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
8.2.2.1 weak_ptr constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
8.3 Type-erased allocator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
8.4 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
8.5 Class memory_resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
8.5.1 Class memory_resource overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
8.5.2 memory_resource public member functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.5.3 memory_resource protected virtual member functions . . . . . . . . . . . . . . . . . . . . . . 66
8.5.4 memory_resource equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
8.6 Class template polymorphic_allocator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
8.6.1 Class template polymorphic_allocator overview . . . . . . . . . . . . . . . . . . . . . . . . . . 67
8.6.2 polymorphic_allocator constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.6.3 polymorphic_allocator member functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.6.4 polymorphic_allocator equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
8.7 template alias resource_adaptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
8.7.1 resource_adaptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4 © ISO/IEC 2015 — All rights reserved
---------------------- Page: 4 ----------------------
ISO/IEC TS 19568:2015(E)
8.7.2 resource_adaptor_imp constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.7.3 resource_adaptor_imp member functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.8 Access to program-wide memory_resource objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.9 Pool resource classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.9.1 Classes synchronized_pool_resource and unsynchronized_pool_resource . . . . . . . . . . . . 72
8.9.2 pool_options data members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
8.9.3 pool resource constructors and destructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
8.9.4 pool resource members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
8.10 Class monotonic_buffer_resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
8.10.1 Class monotonic_buffer_resource overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
8.10.2 monotonic_buffer_resource constructor and destructor . . . . . . . . . . . . . . . . . . . . . . 77
8.10.3 monotonic_buffer_resource members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
8.11 Alias templates using polymorphic memory resources . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
8.11.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
8.11.2 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
8.11.3 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
8.11.4 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
8.11.5 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
8.11.6 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
8.11.7 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
8.11.8 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . 81
8.11.9 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . 82
8.11.10 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
9 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
9.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
9.2 Class template promise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
9.3 Class template packaged_task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10 Algorithms library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
10.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
10.2 Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
10.3 Shuffling and sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
© ISO/IEC 2015 — All rights reserved 5
---------------------- Page: 5 ----------------------
ISO/IEC TS 19568:2015(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are
members of ISO or IEC participate in the development of International Standards through technical
committees established by the respective organization to deal with particular fields of technical
activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other
international organizations, governmental and non‐governmental, in liaison with ISO and IEC, also
take part in the work. In the field of information technology, ISO and IEC have established a joint
technical committee, ISO/IEC JTC 1.
The procedures used to develop this document and those intended for its further maintenance are
described in the ISO/IEC Directives, Part 1. In particular the different approval criteria needed for
the different types of document should be noted. This document was drafted in accordance with the
editorial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives).
Attention is drawn to the possibility that some of the elements of this document may be the subject
of patent rights. ISO and IEC shall not be held responsible for identifying any or all such patent
rights. Details of any patent rights identified during the development of the document will be in the
Introduction and/or on the ISO list of patent declarations received (see www.iso.org/patents).
Any trade name used in this document is information given for the convenience of users and does
not constitute an endorsement.
For an explanation on the meaning of ISO specific terms and expressions related to conformity
assessment, as well as information about ISO's adherence to the WTO principles in the Technical
Barriers to Trade (TBT), see the following URL: Foreword — Supplementary information.
The committee responsible for this document is ISO/IEC JTC 1.
6 © ISO/IEC 2015 — All rights reserved
---------------------- Page: 6 ----------------------
ISO/IEC TS 19568:2015(E)
1 General [general]
1.1 Scope [general.scope]
1
This technical specification describes extensions to the C++ Standard Library (1.2). These extensions are classes and
functions that are likely to be used widely within a program and/or on the interface boundaries between libraries written
by different organizations.
2
This technical specification is non-normative. Some of the library components in this technical specification may be
considered for standardization in a future version of C++, but they are not currently part of any C++ standard. Some of
the components in this technical specification may never be standardized, and others may be standardized in a
substantially changed form.
3
The goal of this technical specification is to build more widespread existing practice for an expanded C++ standard
library. It gives advice on extensions to those vendors who wish to provide them.
1.2 Normative references [general.references]
1
The following referenced document is indispensable for the application of this document. For dated references, only the
edition cited applies. For undated references, the latest edition of the referenced document (including any amendments)
applies.
— ISO/IEC 14882:2014, Programming Languages — C++
2
ISO/IEC 14882:— is herein called the C++ Standard. References to clauses within the C++ Standard are written as
"C++14 §3.2". The library described in ISO/IEC 14882:— clauses 17–30 is herein called the C++ Standard Library.
3
Unless otherwise specified, the whole of the C++ Standard's Library introduction (C++14 §17) is included into this
Technical Specification by reference.
1.3 Namespaces, headers, and modifications to standard classes [general.namespaces]
1
Since the extensions described in this technical specification are experimental and not part of the C++ standard library,
they should not be declared directly within namespace std. Unless otherwise specified, all components described in this
technical specification either:
— modify an existing interface in the C++ Standard Library in-place,
— are declared in a namespace whose name appends ::experimental::fundamentals_v1 to a namespace defined
in the C++ Standard Library, such as std or std::chrono, or
— are declared in a subnamespace of a namespace described in the previous bullet, whose name is not the same as
an existing subnamespace of namespace std.
[ Example: This TS does not define std::experimental::fundamentals_v1::chrono because the C++ Standard Library
defines std::chrono. This TS does not define std::pmr::experimental::fundamentals_v1 because the C++ Standard
Library does not define std::pmr. — end example ]
2
Each header described in this technical specification shall import the contents of std::experimental::fundamentals_v1
into std::experimental as if by
namespace std {
namespace experimental {
inline namespace fundamentals_v1 {}
}
}
© ISO/IEC 2015 — All rights reserved 7
---------------------- Page: 7 ----------------------
ISO/IEC TS 19568:2015(E)
3
This technical specification also describes some experimental modifications to existing interfaces in the C++ Standard
Library. These modifications are described by quoting the affected parts of the standard and using underlining to represent
added text and strike-through to represent deleted text.
4
Unless otherwise specified, references to other entities described in this technical specification are assumed to be
qualified with std::experimental::fundamentals_v1::, and references to entities described in the standard are
assumed to be qualified with std::.
5
Extensions that are expected to eventually be added to an existing header are provided inside the
header, which shall include the standard contents of as if by
#include
6
New headers are also provided in the directory, but without such an #include.
Table 1 — C++ library headers
1.4 Terms and definitions [general.defns]
1
For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.
1.4.1 [general.defns.direct-non-list-init]
direct-non-list-initialization
A direct-initialization that is not list-initialization.
1.5 Future plans (Informative) [general.plans]
1
This section describes tentative plans for future versions of this technical specification and plans for moving content into
future versions of the C++ Standard.
2
The C++ committee intends to release a new version of this technical specification approximately every year, containing
the library extensions we hope to add to a near-future version of the C++ Standard. Future versions will define their
contents in std::experimental::fundamentals_v2, std::experimental::fundamentals_v3, etc., with the most recent
implemented version inlined into std::experimental.
3
When an extension defined in this or a future version of this technical specification represents enough existing practice, it
will be moved into the next version of the C++ Standard by removing the experimental::fundamentals_vN segment of
its namespace and by removing the experimental/ prefix from its header's path.
1.6 Feature-testing recommendations (Informative) [general.feature.test]
1
For the sake of improved portability between partial implementations of various C++ standards, WG21 (the ISO technical
committee for the C++ programming language) recommends that implementers and programmers follow the guidelines in
this section concerning feature-test macros. [ Note: WG21's SD-6 makes similar recommendations for the C++ Standard
itself. — end note ]
8 © ISO/IEC 2015 — All rights reserved
---------------------- Page: 8 ----------------------
ISO/IEC TS 19568:2015(E)
2
Implementers who provide a new standard feature should define a macro with the recommended name, in the same
circumstances under which the feature is available (for example, taking into account relevant command-line options), to
indicate the presence of support for that feature. Implementers should define that macro with the value specified in the
most recent version of this technical specification that they have implemented. The recommended macro name is
"__cpp_lib_experimental_" followed by the string in the "Macro Name Suffix" column.
3
Programmers who wish to determine whethe
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.