The GNU C++ Reference Library Manual (version 15.1)
The GNU C++ Reference Library Manual (version 15.1)
1 Deprecated List 2
2 Todo List 3
3 Topic Documentation 5
3.1 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.2 Generalized Numeric operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.3 Mutating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.1.4 Non-Mutating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.1.5 Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3.2 Atomics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
3.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
3.2.2 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
3.2.3 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
3.2.4 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
3.2.5 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
3.3 Concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
3.3.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
3.3.2 Condition Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
3.3.3 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
3.3.4 Mutexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
3.3.5 Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
3.4 Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
3.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
3.4.2 Associative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
3.4.3 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
3.4.4 Unordered Associative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
3.5 Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
3.5.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
3.5.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
3.5.3 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
3.6 Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
3.6.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
3.6.2 Dynamic Bitset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
3.6.3 Policy-Based Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
3.6.4 SGI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
3.7 Filesystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
3.7.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
3.7.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Generated by Doxygen
ii
Generated by Doxygen
iii
Generated by Doxygen
iv
Generated by Doxygen
v
Generated by Doxygen
vi
Generated by Doxygen
vii
Generated by Doxygen
viii
Generated by Doxygen
ix
Generated by Doxygen
x
5.67 std::__detail::_BracketMatcher< _TraitsT, __icase, __collate > Struct Template Reference . . . . . . . . 856
5.67.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856
5.68 __gnu_cxx::_Caster< _ToType > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . 856
5.68.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856
5.69 __gnu_cxx::_Char_types< _CharT > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . 857
5.69.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857
5.70 __gnu_pbds::detail::pat_trie_base::_CIter< Node, Leaf, Head, Inode, Is_Forward_Iterator > Class Tem-
plate Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857
5.70.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858
5.71 std::__detail::_Compiler< _TraitsT > Class Template Reference . . . . . . . . . . . . . . . . . . . . . . 859
5.71.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859
5.72 std::__parallel::_CRandNumber< _MustBeInt > Struct Template Reference . . . . . . . . . . . . . . . . 859
5.72.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859
5.73 std::_Deque_base< _Tp, _Alloc > Class Template Reference . . . . . . . . . . . . . . . . . . . . . . . 859
5.73.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
5.73.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
5.74 std::_Deque_iterator< _Tp, _Ref, _Ptr > Struct Template Reference . . . . . . . . . . . . . . . . . . . . 861
5.74.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862
5.74.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863
5.75 __gnu_parallel::_DRandomShufflingGlobalData< _RAIter > Struct Template Reference . . . . . . . . . 863
5.75.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863
5.75.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863
5.75.3 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864
5.76 __gnu_parallel::_DRSSorterPU< _RAIter, _RandomNumberGenerator > Struct Template Reference . . 865
5.76.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
5.76.2 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
5.77 __gnu_parallel::_DummyReduct Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866
5.77.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866
5.78 __gnu_debug::_Equal_to< _Type > Class Template Reference . . . . . . . . . . . . . . . . . . . . . . 866
5.78.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866
5.79 __gnu_parallel::_EqualFromLess< _T1, _T2, _Compare > Class Template Reference . . . . . . . . . . 866
5.79.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
5.79.2 Member Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
5.80 __gnu_parallel::_EqualTo< _T1, _T2 > Struct Template Reference . . . . . . . . . . . . . . . . . . . . 868
5.80.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868
5.80.2 Member Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868
5.81 std::__detail::_Executor< _BiIter, _Alloc, _TraitsT, __dfs_mode > Class Template Reference . . . . . . . 869
5.81.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869
5.82 __gnu_cxx::_ExtPtr_allocator< _Tp > Class Template Reference . . . . . . . . . . . . . . . . . . . . . 869
Generated by Doxygen
xi
Generated by Doxygen
xii
Generated by Doxygen
xiii
5.112 __gnu_parallel::_LoserTree< false, _Tp, _Compare > Class Template Reference . . . . . . . . . . . . 903
5.112.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903
5.112.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904
5.113 __gnu_parallel::_LoserTreeBase< _Tp, _Compare > Class Template Reference . . . . . . . . . . . . . 905
5.113.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905
5.113.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
5.113.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
5.113.4 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907
5.114 __gnu_parallel::_LoserTreePointer< __stable, _Tp, _Compare > Class Template Reference . . . . . . 907
5.114.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908
5.115 __gnu_parallel::_LoserTreePointer< false, _Tp, _Compare > Class Template Reference . . . . . . . . 908
5.115.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909
5.116 __gnu_parallel::_LoserTreePointerBase< _Tp, _Compare > Class Template Reference . . . . . . . . . 909
5.116.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910
5.117 __gnu_parallel::_LoserTreePointerUnguarded< __stable, _Tp, _Compare > Class Template Reference 910
5.117.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911
5.118 __gnu_parallel::_LoserTreePointerUnguarded< false, _Tp, _Compare > Class Template Reference . . 911
5.118.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912
5.119 __gnu_parallel::_LoserTreePointerUnguardedBase< _Tp, _Compare > Class Template Reference . . . 912
5.119.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913
5.120 __gnu_parallel::_LoserTreeTraits< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . 913
5.120.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 914
5.120.2 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 914
5.121 __gnu_parallel::_LoserTreeUnguarded< __stable, _Tp, _Compare > Class Template Reference . . . . 914
5.121.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915
5.122 __gnu_parallel::_LoserTreeUnguarded< false, _Tp, _Compare > Class Template Reference . . . . . . 915
5.122.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916
5.123 __gnu_parallel::_LoserTreeUnguardedBase< _Tp, _Compare > Class Template Reference . . . . . . . 916
5.123.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917
5.124 __gnu_pbds::detail::pat_trie_base::_Metadata< Metadata, _Alloc > Struct Template Reference . . . . . 917
5.124.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917
5.125 __gnu_pbds::detail::pat_trie_base::_Metadata< null_type, _Alloc > Struct Template Reference . . . . . 917
5.125.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 918
5.126 __gnu_parallel::_Multiplies< _Tp1, _Tp2, _Result > Struct Template Reference . . . . . . . . . . . . . 918
5.126.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 918
5.126.2 Member Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 918
5.127 std::__fwdlist::_Node< _ValPtr > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . 919
5.127.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920
5.128 __gnu_pbds::detail::pat_trie_base::_Node_base< _ATraits, Metadata > Struct Template Reference . . . 920
Generated by Doxygen
xiv
Generated by Doxygen
xv
Generated by Doxygen
xvi
Generated by Doxygen
xvii
Generated by Doxygen
xviii
Generated by Doxygen
xix
Generated by Doxygen
xx
Generated by Doxygen
xxi
Generated by Doxygen
xxii
Generated by Doxygen
xxiii
Generated by Doxygen
xxiv
Generated by Doxygen
xxv
Generated by Doxygen
xxvi
5.275 __gnu_pbds::detail::binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > Class Template Reference 1. 704
5.275.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 705
5.276 __gnu_pbds::binomial_heap_tag Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 706
5.276.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 706
5.277 __gnu_cxx::bitmap_allocator< _Tp > Class Template Reference . . . . . . . . . . . . . . . . . . . . 1. 706
5.277.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 707
5.277.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 707
5.278 std::__debug::bitset< _Nb > Class Template Reference . . . . . . . . . . . . . . . . . . . . . . . . 1. 708
5.278.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 709
5.279 std::bitset< _Nb > Class Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 709
5.279.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 711
5.279.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 712
5.279.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 714
5.280 std::tr2::bool_set Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 719
5.280.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 720
5.280.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 720
5.280.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 720
5.281 __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc > Struct Template Reference . . . . 1. 721
5.281.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 722
5.282 __gnu_pbds::detail::branch_policy< Node_CItr, Node_CItr, _Alloc > Struct Template Reference . . . 1. 722
5.282.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 722
5.283 std::cauchy_distribution< _RealType > Class Template Reference . . . . . . . . . . . . . . . . . . . 1. 722
5.283.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 723
5.283.2 Member Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 723
5.283.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 723
5.283.4 Friends And Related Symbol Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 724
5.284 __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >
Class Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 725
5.284.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 725
5.284.2 Member Enumeration Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 725
5.284.3 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 726
5.284.4 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 726
5.285 __gnu_pbds::cc_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Comb_Hash_Fn, Resize_Policy,
Store_Hash, _Alloc > Class Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 728
5.285.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 729
5.285.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 730
5.286 __gnu_pbds::cc_hash_tag Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 733
5.286.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 733
5.287 __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash←-
_Fn, Resize_Policy > Class Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. 733
Generated by Doxygen
xxvii
Generated by Doxygen
xxviii
Generated by Doxygen
xxix
Generated by Doxygen
xxx
Generated by Doxygen
xxxi
Generated by Doxygen
xxxii
Generated by Doxygen
xxxiii
Generated by Doxygen
xxxiv
Generated by Doxygen
xxxv
Generated by Doxygen
xxxvi
Generated by Doxygen
xxxvii
Generated by Doxygen
xxxviii
Generated by Doxygen
xxxix
Generated by Doxygen
xl
Generated by Doxygen
xli
Generated by Doxygen
xlii
Generated by Doxygen
xliii
Generated by Doxygen
xliv
Generated by Doxygen
xlv
Generated by Doxygen
xlvi
5.558 std::is_bind_expression< const volatile _Bind_result< _Result, _Signature > > Struct Template Refer-
ence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 140
5.558.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 140
5.559 std::is_bind_expression< volatile _Bind< _Signature > > Struct Template Reference . . . . . . . . . 2. 140
5.559.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 140
5.560 std::is_bind_expression< volatile _Bind_result< _Result, _Signature > > Struct Template Reference 2. 140
5.560.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 140
5.561 std::is_class< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 140
5.561.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 141
5.562 std::is_compound< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . 2. 141
5.562.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 141
5.563 std::is_const< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 141
5.563.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 141
5.564 std::is_constructible< _Tp, _Args > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . 2. 141
5.564.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 141
5.565 std::is_copy_assignable< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . 2. 141
5.565.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 142
5.566 std::is_copy_constructible< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . 2. 142
5.566.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 142
5.567 std::is_default_constructible< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . 2. 142
5.567.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 142
5.568 std::is_destructible< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . 2. 142
5.568.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 142
5.569 std::is_empty< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 142
5.569.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 143
5.570 std::is_enum< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 143
5.570.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 143
5.571 std::is_error_code_enum< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . 2. 143
5.571.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 143
5.572 std::is_error_code_enum< future_errc > Struct Reference . . . . . . . . . . . . . . . . . . . . . . . 2. 143
5.572.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 143
5.573 std::is_error_condition_enum< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . 2. 143
5.573.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 144
5.574 std::is_floating_point< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . . 2. 144
5.574.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 144
5.575 std::is_function< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 144
5.575.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 144
5.576 std::is_fundamental< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . . 2. 144
5.576.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 144
Generated by Doxygen
xlvii
Generated by Doxygen
xlviii
Generated by Doxygen
xlix
Generated by Doxygen
l
Generated by Doxygen
li
Generated by Doxygen
lii
Generated by Doxygen
liii
Generated by Doxygen
liv
Generated by Doxygen
lv
Generated by Doxygen
lvi
Generated by Doxygen
lvii
Generated by Doxygen
lviii
Generated by Doxygen
lix
Generated by Doxygen
lx
Generated by Doxygen
lxi
Generated by Doxygen
lxii
Generated by Doxygen
lxiii
Generated by Doxygen
lxiv
Generated by Doxygen
lxv
Generated by Doxygen
lxvi
5.846 __gnu_pbds::detail::rb_tree_map< Key, Mapped, Cmp_Fn, Node_And_It_Traits, _Alloc > Class Tem-
plate Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 580
5.846.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 583
5.846.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 583
5.847 __gnu_pbds::detail::rb_tree_node_< Value_Type, Metadata, _Alloc > Struct Template Reference . . . 2. 584
5.847.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 584
5.848 __gnu_pbds::rb_tree_tag Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 584
5.848.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 585
5.849 __gnu_pbds::detail::rc< _Node, _Alloc > Class Template Reference . . . . . . . . . . . . . . . . . . 2. 585
5.849.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 586
5.850 __gnu_pbds::detail::rc_binomial_heap< Value_Type, Cmp_Fn, _Alloc > Class Template Reference . 2. 586
5.850.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 588
5.851 __gnu_pbds::rc_binomial_heap_tag Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 588
5.851.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 588
5.852 __gnu_pbds::detail::rebind_traits< _Alloc, T > Struct Template Reference . . . . . . . . . . . . . . . 2. 588
5.852.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 589
5.853 std::filesystem::recursive_directory_iterator Class Reference . . . . . . . . . . . . . . . . . . . . . . 2. 589
5.853.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 590
5.854 __gnu_cxx::recursive_init_error Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 590
5.854.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 590
5.854.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 590
5.855 std::recursive_mutex Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 591
5.855.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 591
5.856 std::recursive_timed_mutex Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 591
5.856.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 592
5.857 std::bitset< _Nb >::reference Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 592
5.857.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 592
5.858 std::tr2::dynamic_bitset< _WordT, _Alloc >::reference Class Reference . . . . . . . . . . . . . . . . 2. 592
5.858.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 593
5.859 std::reference_wrapper< _Tp > Class Template Reference . . . . . . . . . . . . . . . . . . . . . . . 2. 593
5.859.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 593
5.859.2 Friends And Related Symbol Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 594
5.860 std::regex_error Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 594
5.860.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 595
5.860.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 595
5.860.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 595
5.861 std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > Class Template Reference . . . . . . . . . . . . 2. 596
5.861.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 596
5.861.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 597
Generated by Doxygen
lxvii
Generated by Doxygen
lxviii
Generated by Doxygen
lxix
Generated by Doxygen
lxx
Generated by Doxygen
lxxi
Generated by Doxygen
lxxii
Generated by Doxygen
lxxiii
Generated by Doxygen
lxxiv
Generated by Doxygen
lxxv
Generated by Doxygen
lxxvi
Generated by Doxygen
lxxvii
5.991 std::tuple_element< _Ind, array< _Tp, _Nm > > Struct Template Reference . . . . . . . . . . . . . 2. 846
5.991.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 846
5.992 std::tuple_size< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 846
5.992.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 846
5.993 std::tuple_size< array< _Tp, _Nm > > Struct Template Reference . . . . . . . . . . . . . . . . . . . 2. 846
5.993.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 847
5.994 std::tuple_size< pair< _Tp1, _Tp2 > > Struct Template Reference . . . . . . . . . . . . . . . . . . 2. 847
5.994.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 848
5.995 std::tuple_size< tuple< _Elements... > > Struct Template Reference . . . . . . . . . . . . . . . . . 2. 848
5.995.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 849
5.996 __gnu_pbds::detail::entry_cmp< _VTp, Cmp_Fn, _Alloc, false >::type Struct Reference . . . . . . . . 2. 849
5.996.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 850
5.997 std::type_index Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 850
5.997.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 850
5.998 std::type_info Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 850
5.998.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 851
5.998.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 851
5.998.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 851
5.999 __gnu_pbds::detail::types_traits< Key, Mapped, _Alloc, Store_Hash > Struct Template Reference . . 2. 851
5.999.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 852
5.1000 std::chrono::tzdb_list Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 852
5.1000.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 853
5.1000.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 853
5.1001 __gnu_cxx::unary_compose< _Operation1, _Operation2 > Class Template Reference . . . . . . . . 2. 854
5.1001.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 854
5.1001.2 Member Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 855
5.1002 std::unary_function< _Arg, _Result > Struct Template Reference . . . . . . . . . . . . . . . . . . . 2. 855
5.1002.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 855
5.1002.2 Member Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 856
5.1003 std::unary_negate< _Predicate > Class Template Reference . . . . . . . . . . . . . . . . . . . . . 2. 856
5.1003.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 857
5.1003.2 Member Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 857
5.1004 __gnu_parallel::unbalanced_tag Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 857
5.1004.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 857
5.1004.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 857
5.1005 std::underflow_error Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 858
5.1005.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 859
5.1005.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. 859
5.1006 std::underlying_type< _Tp > Struct Template Reference . . . . . . . . . . . . . . . . . . . . . . . 2. 859
Generated by Doxygen
lxxviii
Generated by Doxygen
lxxix
Generated by Doxygen
lxxx
Generated by Doxygen
lxxxi
Generated by Doxygen
lxxxii
Generated by Doxygen
lxxxiii
Generated by Doxygen
lxxxiv
Generated by Doxygen
lxxxv
Generated by Doxygen
lxxxvi
Generated by Doxygen
lxxxvii
Generated by Doxygen
lxxxviii
Generated by Doxygen
lxxxix
Generated by Doxygen
xc
Generated by Doxygen
xci
Generated by Doxygen
xcii
Generated by Doxygen
xciii
Generated by Doxygen
xciv
Generated by Doxygen
xcv
Generated by Doxygen
xcvi
Generated by Doxygen
xcvii
Generated by Doxygen
xcviii
Generated by Doxygen
xcix
Generated by Doxygen
c
Generated by Doxygen
ci
Generated by Doxygen
cii
Generated by Doxygen
ciii
Generated by Doxygen
civ
Generated by Doxygen
cv
Generated by Doxygen
cvi
Generated by Doxygen
cvii
Generated by Doxygen
cviii
Generated by Doxygen
cix
Generated by Doxygen
cx
Generated by Doxygen
cxi
Generated by Doxygen
cxii
Generated by Doxygen
cxiii
Generated by Doxygen
cxiv
Generated by Doxygen
cxv
Generated by Doxygen
cxvi
Generated by Doxygen
1
Index 3493
Generated by Doxygen
2
1 Deprecated List
Module negators
Deprecated in C++17, no longer in the standard since C++20. Use not_fn instead.
Module pointer_adaptors
Deprecated in C++11, no longer in the standard since C++17. Use mem_fn instead.
Struct std::aligned_storage< _Len, _Align >
Deprecated in C++23. Uses can be replaced by an array std::byte[_Len] declared with alignas(←-
_Align).
Struct std::aligned_union< _Len, _Types >
Deprecated in C++23.
Class std::auto_ptr< _Tp >
Deprecated in C++11, no longer in the standard since C++17. Use unique_ptr instead.
Struct std::binary_function< _Arg1, _Arg2, _Result >
Deprecated in C++17, removed in C++20. The idea of a literal type isn't useful.
Struct std::is_pod< _Tp >
Deprecated in C++26. Use a combination of one or more more specialized type traits instead, such
as is_trivially_default_constructible, is_trivially_copy_constructible, is_←-
trivially_copy_assignable, etc., depending on the exact check(s) needed.
Member std::random_shuffle (_RandomAccessIterator __first, _RandomAccessIterator __last)
Since C++17, std::random_shuffle is not part of the C++ standard. Use std::shuffle instead,
which was introduced in C++11.
Member std::random_shuffle (_RandomAccessIterator __first, _RandomAccessIterator __last, _Random←-
NumberGenerator &&__rand)
Since C++17, std::random_shuffle is not part of the C++ standard. Use std::shuffle instead,
which was introduced in C++11.
Generated by Doxygen
2 Todo List 3
2 Todo List
Generated by Doxygen
4
Generated by Doxygen
3 Topic Documentation 5
3 Topic Documentation
3.1 Algorithms
Mutating
Non-Mutating
Algorithms
Generalized Numeric
operations
Sorting
Topics
Components for performing algorithmic operations. Includes non-modifying sequence, modifying (mutating) sequence,
sorting, searching, merge, partition, heap, set, minima, maxima, and permutation operations.
Generated by Doxygen
6
Generalized Numeric
Algorithms
operations
Functions
Generated by Doxygen
3.1 Algorithms 7
accumulate() [1/2]
Accumulates the values in the range [first,last) using operator+(). The initial value is init. The values are processed in
order.
Generated by Doxygen
8
Parameters
Returns
accumulate() [2/2]
Accumulates the values in the range [first,last) using the function object __binary_op. The initial value is
__init. The values are processed in order.
Parameters
Returns
adjacent_difference() [1/2]
Computes the difference between adjacent values in the range [first,last) using operator-() and writes the result to
__result.
Generated by Doxygen
3.1 Algorithms 9
Parameters
Returns
adjacent_difference() [2/2]
Computes the difference between adjacent values in the range [__first,__last) using the function object __binary_op
and writes the result to __result.
Parameters
Returns
exclusive_scan() [1/2]
Generated by Doxygen
10
Parameters
Returns
Write the cumulative sum (aka prefix sum, aka scan) of the input range to the output range. Each element of the output
range contains the running total of all earlier elements (and the initial value), using std::plus<> for summation.
This function generates an "exclusive" scan, meaning the Nth element of the output range is the sum of the first N-1
input elements, so the Nth input element is not included.
exclusive_scan() [2/2]
Parameters
Returns
Write the cumulative sum (aka prefix sum, aka scan) of the input range to the output range. Each element of the output
range contains the running total of all earlier elements (and the initial value), using binary_op for summation.
This function generates an "exclusive" scan, meaning the Nth element of the output range is the sum of the first N-1
input elements, so the Nth input element is not included.
Generated by Doxygen
3.1 Algorithms 11
inclusive_scan() [1/3]
Parameters
Returns
Write the cumulative sum (aka prefix sum, aka scan) of the input range to the output range. Each element of the output
range contains the running total of all earlier elements, using std::plus<> for summation.
This function generates an "inclusive" scan, meaning the Nth element of the output range is the sum of the first N input
elements, so the Nth input element is included.
inclusive_scan() [2/3]
Parameters
Returns
Write the cumulative sum (aka prefix sum, aka scan) of the input range to the output range. Each element of the output
range contains the running total of all earlier elements, using binary_op for summation.
This function generates an "inclusive" scan, meaning the Nth element of the output range is the sum of the first N input
elements, so the Nth input element is included.
Generated by Doxygen
12
inclusive_scan() [3/3]
Parameters
Returns
Write the cumulative sum (aka prefix sum, aka scan) of the input range to the output range. Each element of the output
range contains the running total of all earlier elements (and the initial value), using binary_op for summation.
This function generates an "inclusive" scan, meaning the Nth element of the output range is the sum of the first N input
elements, so the Nth input element is included.
inner_product() [1/2]
Parameters
Returns
Generated by Doxygen
3.1 Algorithms 13
inner_product() [2/2]
Starting with an initial value of __init, applies __binary_op2 to successive elements from the two ranges and
accumulates each result into the accumulated value using __binary_op1. The values in the ranges are processed
in order.
Parameters
Returns
iota()
For each element in the range [first,last) assigns value and increments value as if by ++value.
Parameters
Returns
Nothing.
Generated by Doxygen
14
partial_sum() [1/2]
Accumulates the values in the range [first,last) using the + operator. As each successive input value is added into the
total, that partial sum is written to __result. Therefore, the first value in __result is the first value of the input, the
second value in __result is the sum of the first and second input values, and so on.
Parameters
Returns
partial_sum() [2/2]
Accumulates the values in the range [first,last) using __binary_op. As each successive input value is added into the
total, that partial sum is written to __result. Therefore, the first value in __result is the first value of the input, the
second value in __result is the sum of the first and second input values, and so on.
Parameters
Returns
Generated by Doxygen
3.1 Algorithms 15
reduce() [1/3]
Parameters
Returns
Reduce the values in the range [first,last) using addition, with an initial value of T{}, where T is the iterator's
value type. Equivalent to calling std::reduce(first, last, T{}, std::plus<>()).
reduce() [2/3]
Parameters
Returns
Reduce the values in the range [first,last) using addition. Equivalent to calling std::reduce(first,
last, init, std::plus<>()).
reduce() [3/3]
Generated by Doxygen
16
Parameters
Returns
Reduce the values in the range [first,last) using a binary operation. The initial value is init. The values are
not necessarily processed in order.
This algorithm is similar to std::accumulate but is not required to perform the operations in order from first to last.
For operations that are commutative and associative the result will be the same as for std::accumulate, but for
other operations (such as floating point arithmetic) the result can be different.
transform_exclusive_scan()
Parameters
Returns
Write the cumulative sum (aka prefix sum, aka scan) of the input range to the output range. Each element of the output
range contains the running total of all earlier elements (and the initial value), using __unary_op to transform the input
elements and using __binary_op for summation.
This function generates an "exclusive" scan, meaning the Nth element of the output range is the sum of the first N-1
input elements, so the Nth input element is not included.
Generated by Doxygen
3.1 Algorithms 17
transform_inclusive_scan() [1/2]
Parameters
Returns
Write the cumulative sum (aka prefix sum, aka scan) of the input range to the output range. Each element of the output
range contains the running total of all earlier elements, using __unary_op to transform the input elements and using
__binary_op for summation.
This function generates an "inclusive" scan, meaning the Nth element of the output range is the sum of the first N input
elements, so the Nth input element is included.
transform_inclusive_scan() [2/2]
Parameters
Generated by Doxygen
18
Returns
Write the cumulative sum (aka prefix sum, aka scan) of the input range to the output range. Each element of the output
range contains the running total of all earlier elements (and the initial value), using __unary_op to transform the input
elements and using __binary_op for summation.
This function generates an "inclusive" scan, meaning the Nth element of the output range is the sum of the first N input
elements, so the Nth input element is included.
transform_reduce() [1/3]
Parameters
Returns
Call unary_op(first[n]) for each n in [0,last-first) and then use binary_op to reduce the values
returned by unary_op to a single value of type T.
Generated by Doxygen
3.1 Algorithms 19
transform_reduce() [2/3]
Parameters
Returns
Call first1[n]∗first2[n] for each n in [0,last1-first1) and then use addition to sum those products to
a single value of type T.
transform_reduce() [3/3]
Parameters
Generated by Doxygen
20
Returns
3.1.3 Mutating
Algorithms Mutating
Functions
Generated by Doxygen
3.1 Algorithms 21
Generated by Doxygen
22
copy()
Parameters
Returns
This inline function will boil down to a call to memmove whenever possible. Failing that, if random access iterators
are passed, then the loop count will be known (and therefore a candidate for compiler optimizations such as unrolling).
Result may not be contained within [first,last); the copy_backward function should be used instead.
Note that the end of the output range is permitted to be contained within [first,last).
copy_backward()
Generated by Doxygen
3.1 Algorithms 23
Parameters
Returns
The function has the same effect as copy, but starts at the end of the range and works its way to the start, returning the
start of the result. This inline function will boil down to a call to memmove whenever possible. Failing that, if random
access iterators are passed, then the loop count will be known (and therefore a candidate for compiler optimizations
such as unrolling).
Result may not be in the range (first,last]. Use copy instead. Note that the start of the output range may overlap
[first,last).
copy_if()
Parameters
Returns
Copies each element in the range [__first,__last) for which __pred returns true to the range beginning at __result.
copy_if() is stable, so the relative order of elements that are copied is unchanged.
copy_n()
Generated by Doxygen
24
Parameters
Returns
result+n.
This inline function will boil down to a call to memmove whenever possible. Failing that, if random access iterators are
passed, then the loop count will be known (and therefore a candidate for compiler optimizations such as unrolling).
References std::move().
fill()
Parameters
Returns
Nothing.
This function fills a range with copies of the same value. For char types filling contiguous areas of memory, this becomes
an inline call to memset or wmemset.
fill_n()
Generated by Doxygen
3.1 Algorithms 25
Parameters
Returns
This function fills a range with copies of the same value. For char types filling contiguous areas of memory, this becomes
an inline call to memset or wmemset.
References std::__iterator_category().
generate()
Parameters
Returns
Performs the assignment ∗i = __gen() for each i in the range [__first, __last).
generate_n()
Generated by Doxygen
26
Parameters
Returns
Performs the assignment ∗i = __gen() for each i in the range [__first, __first + __n).
is_partitioned()
Parameters
Returns
True if the range [__first,__last) is partioned by __pred, i.e. if all elements that satisfy __pred appear before
those that do not.
iter_swap()
Generated by Doxygen
3.1 Algorithms 27
Parameters
_←- An iterator.
_a
_←- Another iterator.
_b
Returns
Nothing.
This function swaps the values pointed to by two iterators, not the iterators themselves.
move()
Parameters
Returns
This inline function will boil down to a call to memmove whenever possible. Failing that, if random access iterators
are passed, then the loop count will be known (and therefore a candidate for compiler optimizations such as unrolling).
Result may not be contained within [first,last); the move_backward function should be used instead.
Note that the end of the output range is permitted to be contained within [first,last).
move_backward()
Generated by Doxygen
28
Parameters
Returns
The function has the same effect as move, but starts at the end of the range and works its way to the start, returning
the start of the result. This inline function will boil down to a call to memmove whenever possible. Failing that, if random
access iterators are passed, then the loop count will be known (and therefore a candidate for compiler optimizations
such as unrolling).
Result may not be in the range (first,last]. Use move instead. Note that the start of the output range may overlap
[first,last).
partition()
Parameters
Returns
An iterator middle such that __pred(i) is true for each iterator i in the range [__first, middle) and
false for each i in the range [middle, __last).
__pred must not modify its operand. partition() does not preserve the relative ordering of elements in each
group, use stable_partition() if this is needed.
Generated by Doxygen
3.1 Algorithms 29
partition_copy()
Copy the elements of a sequence to separate output sequences depending on the truth value of a predicate.
Generated by Doxygen
30
Parameters
Returns
Copies each element in the range [__first,__last) for which __pred returns true to the range beginning at out_true
and each element for which __pred returns false to __out_false.
partition_point()
Parameters
__first An iterator.
__last Another iterator.
__pred A predicate.
Returns
An iterator mid such that all_of(__first, mid, __pred) and none_of(mid, __last, __←-
pred) are both true.
random_shuffle() [1/2]
Generated by Doxygen
3.1 Algorithms 31
Parameters
Returns
Nothing.
Reorder the elements in the range [__first, __last) using a random distribution, so that every possible ordering
of the sequence is equally likely.
Deprecated Since C++17, std::random_shuffle is not part of the C++ standard. Use std::shuffle in-
stead, which was introduced in C++11.
random_shuffle() [2/2]
Parameters
Returns
Nothing.
Reorders the elements in the range [__first, __last) using __rand to provide a random distribution. Calling
__rand(N) for a positive integer N should return a randomly chosen integer from the range [0, N).
Deprecated Since C++17, std::random_shuffle is not part of the C++ standard. Use std::shuffle in-
stead, which was introduced in C++11.
remove()
Generated by Doxygen
32
Parameters
Returns
All elements equal to __value are removed from the range [__first,__last).
remove() is stable, so the relative order of elements that are not removed is unchanged.
Elements between the end of the resulting sequence and __last are still present, but their value is unspecified.
remove_copy()
Parameters
Returns
Copies each element in the range [__first,__last) not equal to __value to the range beginning at __result.
remove_copy() is stable, so the relative order of elements that are copied is unchanged.
remove_copy_if()
Generated by Doxygen
3.1 Algorithms 33
Parameters
Returns
Copies each element in the range [__first,__last) for which __pred returns false to the range beginning at __result.
remove_copy_if() is stable, so the relative order of elements that are copied is unchanged.
remove_if()
Parameters
Returns
All elements for which __pred returns true are removed from the range [__first,__last).
remove_if() is stable, so the relative order of elements that are not removed is unchanged.
Elements between the end of the resulting sequence and __last are still present, but their value is unspecified.
replace()
Generated by Doxygen
34
Parameters
Returns
For each iterator i in the range [__first,__last) if ∗i == __old_value then the assignment ∗i = __←-
new_value is performed.
replace_copy_if()
Copy a sequence, replacing each value for which a predicate returns true with another value.
Parameters
Returns
Copies each element in the range [__first,__last) to the range [__result,__result+(__last-__first)) replacing elements for
which __pred returns true with __new_value.
replace_if()
Replace each value in a sequence for which a predicate returns true with another value.
Generated by Doxygen
3.1 Algorithms 35
Parameters
Returns
For each iterator i in the range [__first,__last) if __pred(∗i) is true then the assignment ∗i = __new←-
_value is performed.
reverse()
Reverse a sequence.
Parameters
Returns
Reverses the order of the elements in the range [__first,__last), so that the first element becomes the last etc. For every
i such that 0<=i<=(__last-__first)/2), reverse() swaps ∗(__first+i) and ∗(__last-(i+1))
reverse_copy()
Generated by Doxygen
36
Parameters
Returns
Copies the elements in the range [__first,__last) to the range [__result,__result+(__last-__first)) such that the order of
the elements is reversed. For every i such that 0<=i<=(__last-__first), reverse_copy() performs the assignment
∗(__result+(__last-__first)-1-i) = ∗(__first+i). The ranges [__first,__last) and [__result,__result+(__last-__first)) must not
overlap.
rotate()
Parameters
Returns
Rotates the elements of the range [__first,__last) by (__middle - __first) positions so that the element at __middle is
moved to __first, the element at __middle+1 is moved to __first+1 and so on for each element in the range
[__first,__last).
This effectively swaps the ranges [__first,__middle) and [__middle,__last).
Performs ∗(__first+(n+(__last-__middle))%(__last-__first))=∗(__first+n) for each n in the range [0,__last-__first).
References std::__iterator_category(), and std::__rotate().
rotate_copy()
Generated by Doxygen
3.1 Algorithms 37
Parameters
Returns
Returns
, rotating the copied elements by (__middle-__first) positions so that the element at __middle is moved to ←-
__result, the element at __middle+1 is moved to __result+1 and so on for each element in the range
[__first,__last).
shuffle()
Parameters
Returns
Nothing.
Reorders the elements in the range [__first,__last) using __g to provide random numbers.
References std::__gen_two_uniform_ints(), std::pair< _T1, _T2 >::first, and std::pair< _T1, _T2 >::second.
stable_partition()
Move elements for which a predicate is true to the beginning of a sequence, preserving relative ordering.
Generated by Doxygen
38
Parameters
Returns
An iterator middle such that __pred(i) is true for each iterator i in the range [first,middle) and false for each
i in the range [middle,last).
Performs the same function as partition() with the additional guarantee that the relative ordering of elements in
each group is preserved, so any two elements x and y in the range [__first,__last) such that __pred(x)==__←-
pred(y) will have the same relative ordering after calling stable_partition().
swap_ranges()
Parameters
Returns
Swaps each element in the range [first1,last1) with the corresponding element in the range [first2,(last1-first1)). The
ranges must not overlap.
transform() [1/2]
Generated by Doxygen
3.1 Algorithms 39
Parameters
Returns
Applies the operator to each element in the input range and assigns the results to successive elements of the output
sequence. Evaluates ∗(__result+N)=unary_op(∗(__first+N)) for each N in the range [0,__last-__first).
transform() [2/2]
Parameters
Returns
Applies the operator to the corresponding elements in the two input ranges and assigns the results to successive
elements of the output sequence. Evaluates (__result+N)=__binary_op(∗(__first1+N),(__first2+N)) for
each N in the range [0,__last1-__first1).
Generated by Doxygen
40
unique() [1/2]
Generated by Doxygen
3.1 Algorithms 41
Parameters
Returns
Removes all but the first element from each group of consecutive values that compare equal. unique() is stable, so the
relative order of elements that are not removed is unchanged. Elements between the end of the resulting sequence and
__last are still present, but their value is unspecified.
unique() [2/2]
Parameters
Returns
Removes all but the first element from each group of consecutive values for which __binary_pred returns true.
unique() is stable, so the relative order of elements that are not removed is unchanged. Elements between the end of
the resulting sequence and __last are still present, but their value is unspecified.
unique_copy() [1/2]
Generated by Doxygen
42
Parameters
Returns
Copies each element in the range [__first, __last) to the range beginning at __result, except that only the
first element is copied from groups of consecutive elements that compare equal. unique_copy() is stable, so the
relative order of elements that are copied is unchanged.
unique_copy() [2/2]
Parameters
Returns
Copies each element in the range [__first, __last) to the range beginning at __result, except that only the
first element is copied from groups of consecutive elements for which __binary_pred returns true. unique_←-
copy() is stable, so the relative order of elements that are copied is unchanged.
Generated by Doxygen
3.1 Algorithms 43
3.1.4 Non-Mutating
Algorithms Non-Mutating
Functions
Generated by Doxygen
44
Generated by Doxygen
3.1 Algorithms 45
adjacent_find() [1/2]
Parameters
Returns
The first iterator i such that i and i+1 are both valid iterators in [__first,__last) and such that ∗i == ∗(i+1), or
__last if no such iterator exists.
adjacent_find() [2/2]
Parameters
Returns
The first iterator i such that i and i+1 are both valid iterators in [__first,__last) and such that __binary_←-
pred(∗i,∗(i+1)) is true, or __last if no such iterator exists.
all_of()
Generated by Doxygen
46
Parameters
Returns
Returns true if __pred is true for each element in the range [__first,__last), and false otherwise.
any_of()
Parameters
Returns
Returns true if an element exists in the range [__first,__last) such that __pred is true, and false otherwise.
count()
Generated by Doxygen
3.1 Algorithms 47
Parameters
Returns
count_if()
Parameters
Returns
The number of iterators i in the range [__first,__last) for which __pred(∗i) is true.
equal() [1/4]
Parameters
Returns
This compares the elements of two ranges using == and returns true or false depending on whether all of the corre-
sponding elements of the ranges are equal.
Generated by Doxygen
48
equal() [2/4]
Parameters
Returns
This compares the elements of two ranges using == and returns true or false depending on whether all of the corre-
sponding elements of the ranges are equal.
equal() [3/4]
Parameters
Returns
This compares the elements of two ranges using the binary_pred parameter, and returns true or false depending on
whether all of the corresponding elements of the ranges are equal.
Generated by Doxygen
3.1 Algorithms 49
equal() [4/4]
Parameters
Returns
This compares the elements of two ranges using the binary_pred parameter, and returns true or false depending on
whether all of the corresponding elements of the ranges are equal.
find()
Parameters
Returns
The first iterator i in the range [__first,__last) such that ∗i == __val, or __last if no such iterator exists.
References std::to_address().
Generated by Doxygen
50
find_end() [1/2]
Parameters
Returns
The last iterator i in the range [__first1,__last1-(__last2-__first2)) such that ∗(i+N) == ∗(__first2+N) for each N in
the range [0,__last2-__first2), or __last1 if no such iterator exists.
Searches the range [__first1,__last1) for a sub-sequence that compares equal value-by-value with the sequence given
by [__first2,__last2) and returns an iterator to the __first element of the sub-sequence, or __last1 if the sub-sequence
is not found. The sub-sequence will be the last such subsequence contained in [__first1,__last1).
Because the sub-sequence must lie completely within the range [__first1,__last1) it must start at a position less than
__last1-(__last2-__first2) where __last2-__first2 is the length of the sub-sequence. This means that the
returned iterator i will be in the range [__first1,__last1-(__last2-__first2))
References std::__iterator_category().
find_end() [2/2]
Parameters
Generated by Doxygen
3.1 Algorithms 51
Returns
The last iterator i in the range [__first1,__last1-(__last2-__first2)) such that predicate(∗(i+N), (__first2+N)) is
true for each N in the range [0,__last2-__first2), or __last1 if no such iterator exists.
Searches the range [__first1,__last1) for a sub-sequence that compares equal value-by-value with the sequence given
by [__first2,__last2) using comp as a predicate and returns an iterator to the first element of the sub-sequence, or
__last1 if the sub-sequence is not found. The sub-sequence will be the last such subsequence contained in [__←-
first,__last1).
Because the sub-sequence must lie completely within the range [__first1,__last1) it must start at a position less than
__last1-(__last2-__first2) where __last2-__first2 is the length of the sub-sequence. This means that the
returned iterator i will be in the range [__first1,__last1-(__last2-__first2))
References std::__iterator_category().
find_first_of() [1/2]
Parameters
Returns
The first iterator i in the range [__first1,__last1) such that ∗i == ∗(i2) such that i2 is an iterator in [__first2,__last2),
or __last1 if no such iterator exists.
Searches the range [__first1,__last1) for an element that is equal to some element in the range [__first2,__last2). If
found, returns an iterator in the range [__first1,__last1), otherwise returns __last1.
find_first_of() [2/2]
Generated by Doxygen
52
Parameters
Returns
The first iterator i in the range [__first1,__last1) such that comp(∗i, ∗(i2)) is true and i2 is an iterator in [__first2,←-
__last2), or __last1 if no such iterator exists.
Searches the range [__first1,__last1) for an element that is equal to some element in the range [__first2,__last2). If
found, returns an iterator in the range [__first1,__last1), otherwise returns __last1.
find_if()
Parameters
Returns
The first iterator i in the range [__first,__last) such that __pred(∗i) is true, or __last if no such iterator
exists.
find_if_not()
Generated by Doxygen
3.1 Algorithms 53
Parameters
Returns
The first iterator i in the range [__first,__last) such that __pred(∗i) is false, or __last if no such iterator
exists.
References std::__find_if_not().
for_each()
Parameters
Returns
__f
Applies the function object __f to each element in the range [first,last). __f must not modify the order of the sequence.
If __f has a return value it is ignored.
for_each_n()
Generated by Doxygen
54
Parameters
Returns
__first+__n
Applies the function object __f to each element in the range [first, first+n). __f must not modify the order
of the sequence. If __f has a return value it is ignored.
References std::move().
is_permutation() [1/4]
Checks whether a permutation of the second sequence is equal to the first sequence.
Parameters
Returns
true if there exists a permutation of the elements in the range [__first2, __first2 + (__last1 - __first1)), beginning
with ForwardIterator2 begin, such that equal(__first1, __last1, begin) returns true; otherwise, returns false.
is_permutation() [2/4]
Checks whether a permutation of the second sequence is equal to the first sequence.
Generated by Doxygen
3.1 Algorithms 55
Parameters
Returns
true if there exists a permutation of the elements in the range [__first2, __first2 + (__last1 - __first1)), beginning
with ForwardIterator2 begin, such that equal(__first1, __last1, __begin, __pred) returns true; otherwise, returns
false.
is_permutation() [3/4]
Checks whether a permutaion of the second sequence is equal to the first sequence.
Parameters
Returns
true if there exists a permutation of the elements in the range [__first2, __last2), beginning with ForwardIterator2
begin, such that equal(__first1, __last1, begin) returns true; otherwise, returns false.
is_permutation() [4/4]
Checks whether a permutation of the second sequence is equal to the first sequence.
Generated by Doxygen
56
Parameters
Returns
true if there exists a permutation of the elements in the range [__first2, __last2), beginning with ForwardIterator2
begin, such that equal(__first1, __last1, __begin, __pred) returns true; otherwise, returns false.
mismatch() [1/4]
Parameters
Returns
This compares the elements of two ranges using == and returns a pair of iterators. The first iterator points into the first
range, the second iterator points into the second range, and the elements pointed to by the iterators are not equal.
mismatch() [2/4]
Generated by Doxygen
3.1 Algorithms 57
Parameters
Returns
This compares the elements of two ranges using the binary_pred parameter, and returns a pair of iterators. The first
iterator points into the first range, the second iterator points into the second range, and the elements pointed to by the
iterators are not equal.
mismatch() [3/4]
Parameters
Returns
This compares the elements of two ranges using == and returns a pair of iterators. The first iterator points into the first
range, the second iterator points into the second range, and the elements pointed to by the iterators are not equal.
mismatch() [4/4]
Generated by Doxygen
58
Parameters
Returns
This compares the elements of two ranges using the binary_pred parameter, and returns a pair of iterators. The first
iterator points into the first range, the second iterator points into the second range, and the elements pointed to by the
iterators are not equal.
none_of()
Parameters
Returns
Returns true if __pred is false for each element in the range [__first,__last), and false otherwise.
search() [1/2]
Generated by Doxygen
3.1 Algorithms 59
Parameters
Returns
The first iterator i in the range [__first1,__last1-(__last2-__first2)) such that ∗(i+N) == ∗(__first2+N) for each N in
the range [0,__last2-__first2), or __last1 if no such iterator exists.
Searches the range [__first1,__last1) for a sub-sequence that compares equal value-by-value with the sequence given
by [__first2,__last2) and returns an iterator to the first element of the sub-sequence, or __last1 if the sub-sequence
is not found.
Because the sub-sequence must lie completely within the range [__first1,__last1) it must start at a position less than
__last1-(__last2-__first2) where __last2-__first2 is the length of the sub-sequence.
This means that the returned iterator i will be in the range [__first1,__last1-(__last2-__first2))
search() [2/2]
Parameters
Returns
Searches the range [__first1,__last1) for a sub-sequence that compares equal value-by-value with the sequence given
by [__first2,__last2), using __predicate to determine equality, and returns an iterator to the first element of the
sub-sequence, or __last1 if no such iterator exists.
See also
Generated by Doxygen
60
search_n() [1/2]
Parameters
Returns
The first iterator i in the range [__first,__last-__count) such that ∗(i+N) == __val for each N in the range [0,_←-
_count), or __last if no such iterator exists.
Searches the range [__first,__last) for count consecutive elements equal to __val.
search_n() [2/2]
Parameters
Returns
The first iterator i in the range [__first,__last-__count) such that __binary_pred(∗(i+N),__val) is true for each
N in the range [0,__count), or __last if no such iterator exists.
Searches the range [__first,__last) for __count consecutive elements for which the predicate returns true.
Generated by Doxygen
3.1 Algorithms 61
3.1.5 Sorting
Binary Search
Set Operations
Topics
• Binary Search
• Heap
• Set Operations
Functions
Generated by Doxygen
62
Generated by Doxygen
3.1 Algorithms 63
clamp() [1/2]
Parameters
Return values
Generated by Doxygen
64
Precondition
clamp() [2/2]
Parameters
Return values
Precondition
inplace_merge() [1/2]
Generated by Doxygen
3.1 Algorithms 65
Parameters
__first An iterator.
__middle Another iterator.
__last Another iterator.
Returns
Nothing.
Merges two sorted and consecutive ranges, [__first,__middle) and [__middle,__last), and puts the result in [__first,__←-
last). The output will be sorted. The sort is stable, that is, for equivalent elements in the two ranges, elements from the
first range will always come before elements from the second.
If enough additional memory is available, this takes (__last-__first)-1 comparisons. Otherwise an NlogN algorithm is
used, where N is distance(__first,__last).
inplace_merge() [2/2]
Parameters
__first An iterator.
__middle Another iterator.
__last Another iterator.
__comp A functor to use for comparisons.
Returns
Nothing.
Merges two sorted and consecutive ranges, [__first,__middle) and [middle,last), and puts the result in [__first,__last).
The output will be sorted. The sort is stable, that is, for equivalent elements in the two ranges, elements from the first
range will always come before elements from the second.
If enough additional memory is available, this takes (__last-__first)-1 comparisons. Otherwise an NlogN algorithm is
used, where N is distance(__first,__last).
The comparison function should have the same effects on ordering as the function used for the initial sort.
is_sorted() [1/2]
Generated by Doxygen
66
Parameters
__first An iterator.
__last Another iterator.
Returns
is_sorted() [2/2]
Determines whether the elements of a sequence are sorted according to a comparison functor.
Parameters
__first An iterator.
__last Another iterator.
__comp A comparison functor.
Returns
is_sorted_until() [1/2]
Parameters
__first An iterator.
__last Another iterator.
Returns
An iterator pointing to the last iterator i in [__first, __last) for which the range [__first, i) is sorted.
Generated by Doxygen
3.1 Algorithms 67
is_sorted_until() [2/2]
Parameters
__first An iterator.
__last Another iterator.
__comp A comparison functor.
Returns
An iterator pointing to the last iterator i in [__first, __last) for which the range [__first, i) is sorted.
lexicographical_compare() [1/2]
Parameters
Returns
Returns true if the sequence of elements defined by the range [first1,last1) is lexicographically less than the sequence
of elements defined by the range [first2,last2). Returns false otherwise. (Quoted from [25.3.8]/1.) If the iterators are all
character pointers, then this is an inline call to memcmp.
Generated by Doxygen
68
lexicographical_compare() [2/2]
Parameters
Returns
The same as the four-parameter lexicographical_compare, but uses the comp parameter instead of <.
lexicographical_compare_three_way()
Parameters
Returns
Referenced by std::operator<=>().
Generated by Doxygen
3.1 Algorithms 69
max() [1/2]
Parameters
Returns
This is the simple classic generic implementation. It will work on temporary expressions, since they are only evaluated
once, unlike a preprocessor macro.
max() [2/2]
Parameters
Returns
This will work on temporary expressions, since they are only evaluated once, unlike a preprocessor macro.
Generated by Doxygen
70
max_element() [1/2]
Parameters
Returns
max_element() [2/2]
Parameters
Returns
Iterator referencing the first instance of the largest value according to __comp.
merge() [1/2]
Generated by Doxygen
3.1 Algorithms 71
Parameters
__first1 An iterator.
__first2 Another iterator.
__last1 Another iterator.
__last2 Another iterator.
__result An iterator pointing to the end of the merged range.
Returns
• (__last2 - __first2).
Merges the ranges [__first1,__last1) and [__first2,__last2) into the sorted range [__result, __result + (__last1-__first1)
+ (__last2-__first2)). Both input ranges must be sorted, and the output range must not overlap with either of the input
ranges. The sort is stable, that is, for equivalent elements in the two ranges, elements from the first range will always
come before elements from the second.
merge() [2/2]
Parameters
__first1 An iterator.
__first2 Another iterator.
__last1 Another iterator.
__last2 Another iterator.
__result An iterator pointing to the end of the merged range.
__comp A functor to use for comparisons.
Returns
• (__last2 - __first2).
Merges the ranges [__first1,__last1) and [__first2,__last2) into the sorted range [__result, __result + (__last1-__first1)
+ (__last2-__first2)). Both input ranges must be sorted, and the output range must not overlap with either of the input
ranges. The sort is stable, that is, for equivalent elements in the two ranges, elements from the first range will always
come before elements from the second.
The comparison function should have the same effects on ordering as the function used for the initial sort.
Generated by Doxygen
72
min() [1/2]
Parameters
Returns
This is the simple classic generic implementation. It will work on temporary expressions, since they are only evaluated
once, unlike a preprocessor macro.
min() [2/2]
Generated by Doxygen
3.1 Algorithms 73
Parameters
Returns
This will work on temporary expressions, since they are only evaluated once, unlike a preprocessor macro.
min_element() [1/2]
Parameters
Returns
min_element() [2/2]
Parameters
Returns
Iterator referencing the first instance of the smallest value according to __comp.
Generated by Doxygen
74
minmax() [1/2]
Parameters
Returns
minmax() [2/2]
Parameters
Returns
minmax_element() [1/2]
Return a pair of iterators pointing to the minimum and maximum elements in a range.
Generated by Doxygen
3.1 Algorithms 75
Parameters
Returns
make_pair(m, M), where m is the first iterator i in [__first, __last) such that no other element in the range is smaller,
and where M is the last iterator i in [__first, __last) such that no other element in the range is larger.
minmax_element() [2/2]
Return a pair of iterators pointing to the minimum and maximum elements in a range.
Parameters
Returns
make_pair(m, M), where m is the first iterator i in [__first, __last) such that no other element in the range is smaller,
and where M is the last iterator i in [__first, __last) such that no other element in the range is larger.
next_permutation() [1/2]
Parameters
Returns
Treats all permutations of the range as a set of dictionary sorted sequences. Permutes the current sequence into the
next one of this set. Returns true if there are more sequences to generate. If the sequence is the largest of the set, the
smallest is generated and false returned.
Generated by Doxygen
76
next_permutation() [2/2]
Permute range into the next dictionary ordering using comparison functor.
Parameters
Returns
Treats all permutations of the range [__first,__last) as a set of dictionary sorted sequences ordered by __comp. Per-
mutes the current sequence into the next one of this set. Returns true if there are more sequences to generate. If the
sequence is the largest of the set, the smallest is generated and false returned.
nth_element() [1/2]
Parameters
__first An iterator.
__nth Another iterator.
__last Another iterator.
Returns
Nothing.
Rearranges the elements in the range [__first, __last) so that ∗__nth is the same element that would have
been in that position had the whole sequence been sorted. The elements either side of ∗__nth are not completely
sorted, but for any iterator i in the range [__first, __nth) and any iterator j in the range [__nth, __last)
it holds that ∗j < ∗i is false.
References std::__lg().
Generated by Doxygen
3.1 Algorithms 77
nth_element() [2/2]
Sort a sequence just enough to find a particular position using a predicate for comparison.
Parameters
__first An iterator.
__nth Another iterator.
__last Another iterator.
__comp A comparison functor.
Returns
Nothing.
Rearranges the elements in the range [__first, __last) so that ∗__nth is the same element that would have
been in that position had the whole sequence been sorted. The elements either side of ∗__nth are not completely
sorted, but for any iterator i in the range [__first, __nth) and any iterator j in the range [__nth, __last)
it holds that __comp(∗j, ∗i) is false.
References std::__lg().
partial_sort() [1/2]
Parameters
__first An iterator.
__middle Another iterator.
__last Another iterator.
Returns
Nothing.
Sorts the smallest (__middle - __first) elements in the range [first, last) and moves them to the
range [__first, __middle). The order of the remaining elements in the range [__middle, __last) is
unspecified. After the sort if i and j are iterators in the range [__first, __middle) such that i precedes j and
k is an iterator in the range [__middle, __last) then ∗j < ∗i and ∗k < ∗i are both false.
Generated by Doxygen
78
partial_sort() [2/2]
Parameters
__first An iterator.
__middle Another iterator.
__last Another iterator.
__comp A comparison functor.
Returns
Nothing.
Sorts the smallest (__middle - __first) elements in the range [__first, __last) and moves them to
the range [__first, __middle). The order of the remaining elements in the range [__middle, __last)
is unspecified. After the sort if i and j are iterators in the range [__first, __middle) such that i precedes
j and k is an iterator in the range [__middle, __last) then ∗__comp(j, ∗i) and __comp(∗k, ∗i) are
both false.
partial_sort_copy() [1/2]
Parameters
__first An iterator.
__last Another iterator.
__result_first A random-access iterator.
__result_last Another random-access iterator.
Returns
Copies and sorts the smallest N values from the range [__first, __last) to the range beginning at __←-
result_first, where the number of elements to be copied, N, is the smaller of (__last - __first) and
(__result_last - __result_first). After the sort if i and j are iterators in the range [__result←-
_first,__result_first + N) such that i precedes j then ∗j < ∗i is false. The value returned is __←-
result_first + N.
Generated by Doxygen
3.1 Algorithms 79
partial_sort_copy() [2/2]
Parameters
Returns
Copies and sorts the smallest N values from the range [__first, __last) to the range beginning at result←-
_first, where the number of elements to be copied, N, is the smaller of (__last - __first) and (__←-
result_last - __result_first). After the sort if i and j are iterators in the range [__result_first,
__result_first + N) such that i precedes j then __comp(∗j, ∗i) is false. The value returned is __←-
result_first + N.
prev_permutation() [1/2]
Parameters
Returns
Treats all permutations of the range as a set of dictionary sorted sequences. Permutes the current sequence into the
previous one of this set. Returns true if there are more sequences to generate. If the sequence is the smallest of the
set, the largest is generated and false returned.
Generated by Doxygen
80
prev_permutation() [2/2]
Permute range into the previous dictionary ordering using comparison functor.
Parameters
Returns
Treats all permutations of the range [__first,__last) as a set of dictionary sorted sequences ordered by __comp. Per-
mutes the current sequence into the previous one of this set. Returns true if there are more sequences to generate. If
the sequence is the smallest of the set, the largest is generated and false returned.
sort() [1/2]
Parameters
__first An iterator.
__last Another iterator.
Returns
Nothing.
Sorts the elements in the range [__first, __last) in ascending order, such that for each iterator i in the range
[__first, __last - 1), ∗(i+1) < ∗i is false.
The relative ordering of equivalent elements is not preserved, use stable_sort() if this is needed.
sort() [2/2]
Generated by Doxygen
3.1 Algorithms 81
Parameters
__first An iterator.
__last Another iterator.
__comp A comparison functor.
Returns
Nothing.
Sorts the elements in the range [__first, __last) in ascending order, such that __comp(∗(i+1), ∗i) is
false for every iterator i in the range [__first, __last - 1).
The relative ordering of equivalent elements is not preserved, use stable_sort() if this is needed.
stable_sort() [1/2]
Sort the elements of a sequence, preserving the relative order of equivalent elements.
Parameters
__first An iterator.
__last Another iterator.
Returns
Nothing.
Sorts the elements in the range [__first,__last) in ascending order, such that for each iterator i in the range [__first,_←-
_last-1), ∗(i+1)<∗i is false.
The relative ordering of equivalent elements is preserved, so any two elements x and y in the range [__first,__last) such
that x<y is false and y<x is false will have the same relative ordering after calling stable_sort().
stable_sort() [2/2]
Sort the elements of a sequence using a predicate for comparison, preserving the relative order of equivalent elements.
Generated by Doxygen
82
Parameters
__first An iterator.
__last Another iterator.
__comp A comparison functor.
Returns
Nothing.
Sorts the elements in the range [__first,__last) in ascending order, such that for each iterator i in the range [__first,_←-
_last-1), __comp(∗(i+1),∗i) is false.
The relative ordering of equivalent elements is preserved, so any two elements x and y in the range [__first,__←-
last) such that __comp(x,y) is false and __comp(y,x) is false will have the same relative ordering after calling
stable_sort().
Functions
Generated by Doxygen
3.1 Algorithms 83
These algorithms are variations of a classic binary search, and all assume that the sequence being searched is already
sorted.
The number of comparisons will be logarithmic (and as few as possible). The number of steps through the sequence
will be logarithmic for random-access iterators (e.g., pointers), and linear otherwise.
The LWG has passed Defect Report 270, which notes: The proposed resolution reinterprets binary search. Instead of
thinking about searching for a value in a sorted range, we view that as an important special case of a more general
algorithm: searching for the partition point in a partitioned range. We also add a guarantee that the old wording did
not: we ensure that the upper bound is no earlier than the lower bound, that the pair returned by equal_range is a valid
range, and that the first part of that pair is the lower bound.
The actual effect of the first sentence is that a comparison functor passed by the user doesn't necessarily need to induce
a strict weak ordering relation. Rather, it partitions the range.
binary_search() [1/2]
Parameters
__first An iterator.
__last Another iterator.
__val The search term.
Returns
Note that this does not actually return an iterator to __val. For that, use std::find or a container's specialized find
member functions.
Generated by Doxygen
84
binary_search() [2/2]
Parameters
__first An iterator.
__last Another iterator.
__val The search term.
__comp A functor to use for comparisons.
Returns
Note that this does not actually return an iterator to __val. For that, use std::find or a container's specialized find
member functions.
The comparison function should have the same effects on ordering as the function used for the initial sort.
equal_range() [1/2]
Finds the largest subrange in which __val could be inserted at any place in it without changing the ordering.
Parameters
__first An iterator.
__last Another iterator.
__val The search term.
Returns
This is equivalent to
std::make_pair(lower_bound(__first, __last, __val),
upper_bound(__first, __last, __val))
Generated by Doxygen
3.1 Algorithms 85
equal_range() [2/2]
Finds the largest subrange in which __val could be inserted at any place in it without changing the ordering.
Parameters
__first An iterator.
__last Another iterator.
__val The search term.
__comp A functor to use for comparisons.
Returns
This is equivalent to
std::make_pair(lower_bound(__first, __last, __val, __comp),
upper_bound(__first, __last, __val, __comp))
lower_bound() [1/2]
Finds the first position in which val could be inserted without changing the ordering.
Parameters
__first An iterator.
__last Another iterator.
__val The search term.
Returns
An iterator pointing to the first element not less than val, or end() if every element is less than val.
Generated by Doxygen
86
lower_bound() [2/2]
Finds the first position in which __val could be inserted without changing the ordering.
Parameters
Returns
An iterator pointing to the first element not less than __val, or end() if every element is less than __val.
The comparison function should have the same effects on ordering as the function used for the initial sort.
upper_bound() [1/2]
Finds the last position in which __val could be inserted without changing the ordering.
Parameters
__first An iterator.
__last Another iterator.
__val The search term.
Returns
An iterator pointing to the first element greater than __val, or end() if no elements are greater than __val.
upper_bound() [2/2]
Finds the last position in which __val could be inserted without changing the ordering.
Generated by Doxygen
3.1 Algorithms 87
Parameters
__first An iterator.
__last Another iterator.
__val The search term.
__comp A functor to use for comparisons.
Returns
An iterator pointing to the first element greater than __val, or end() if no elements are greater than __val.
The comparison function should have the same effects on ordering as the function used for the initial sort.
3.1.5.4 Heap
Sorting Heap
Functions
Generated by Doxygen
88
is_heap() [1/2]
Parameters
Returns
is_heap() [2/2]
Generated by Doxygen
3.1 Algorithms 89
Parameters
Returns
References std::distance().
is_heap_until() [1/2]
Parameters
Returns
This operation returns the last iterator i in [__first, __last) for which the range [__first, i) is a heap.
References std::distance().
is_heap_until() [2/2]
Generated by Doxygen
90
Parameters
Returns
This operation returns the last iterator i in [__first, __last) for which the range [__first, i) is a heap. Comparisons are
made using __comp.
References std::distance().
make_heap() [1/2]
Parameters
make_heap() [2/2]
Parameters
This operation makes the elements in [__first,__last) into a heap. Comparisons are made using __comp.
Generated by Doxygen
3.1 Algorithms 91
pop_heap() [1/2]
Parameters
Precondition
This operation pops the top of the heap. The elements __first and __last-1 are swapped and [__first,__last-1) is made
into a heap.
pop_heap() [2/2]
Parameters
This operation pops the top of the heap. The elements __first and __last-1 are swapped and [__first,__last-1) is made
into a heap. Comparisons are made using comp.
push_heap() [1/2]
Generated by Doxygen
92
Parameters
This operation pushes the element at last-1 onto the valid heap over the range [__first,__last-1). After completion,
[__first,__last) is a valid heap.
push_heap() [2/2]
Parameters
This operation pushes the element at __last-1 onto the valid heap over the range [__first,__last-1). After completion,
[__first,__last) is a valid heap. Compare operations are performed using comp.
sort_heap() [1/2]
Sort a heap.
Parameters
sort_heap() [2/2]
Generated by Doxygen
3.1 Algorithms 93
Parameters
This operation sorts the valid heap in the range [__first,__last). Comparisons are made using __comp.
Functions
Generated by Doxygen
94
These algorithms are common set operations performed on sequences that are already sorted. The number of compar-
isons will be linear.
includes() [1/2]
Parameters
Returns
True if each element in [__first2,__last2) is contained in order within [__first1,__last1). False otherwise.
This operation expects both [__first1,__last1) and [__first2,__last2) to be sorted. Searches for the presence of each
element in [__first2,__last2) within [__first1,__last1). The iterators over each range only move forward, so this is a linear
algorithm. If an element in [__first2,__last2) is not found before the search iterator reaches __last2, false is returned.
includes() [2/2]
Generated by Doxygen
3.1 Algorithms 95
Parameters
Returns
True if each element in [__first2,__last2) is contained in order within [__first1,__last1) according to comp. False
otherwise.
This operation expects both [__first1,__last1) and [__first2,__last2) to be sorted. Searches for the presence of each
element in [__first2,__last2) within [__first1,__last1), using comp to decide. The iterators over each range only move
forward, so this is a linear algorithm. If an element in [__first2,__last2) is not found before the search iterator reaches
__last2, false is returned.
set_difference() [1/2]
Parameters
Returns
This operation iterates over both ranges, copying elements present in the first range but not the second in order to
the output range. Iterators increment for each range. When the current element of the first range is less than the
second, that element is copied and the iterator advances. If the current element of the second range is less, the iterator
advances, but no element is copied. If an element is contained in both ranges, no elements are copied and both ranges
advance. The output range may not overlap either input range.
Generated by Doxygen
96
set_difference() [2/2]
Parameters
Returns
This operation iterates over both ranges, copying elements present in the first range but not the second in order to the
output range. Iterators increment for each range. When the current element of the first range is less than the second
according to __comp, that element is copied and the iterator advances. If the current element of the second range is
less, no element is copied and the iterator advances. If an element is contained in both ranges according to __comp,
no elements are copied and both ranges advance. The output range may not overlap either input range.
set_intersection() [1/2]
Parameters
Generated by Doxygen
3.1 Algorithms 97
Returns
This operation iterates over both ranges, copying elements present in both ranges in order to the output range. Iterators
increment for each range. When the current element of one range is less than the other, that iterator advances. If an
element is contained in both ranges, the element from the first range is copied and both ranges advance. The output
range may not overlap either input range.
set_intersection() [2/2]
Parameters
Returns
This operation iterates over both ranges, copying elements present in both ranges in order to the output range. Iterators
increment for each range. When the current element of one range is less than the other according to __comp, that
iterator advances. If an element is contained in both ranges according to __comp, the element from the first range is
copied and both ranges advance. The output range may not overlap either input range.
Generated by Doxygen
98
set_symmetric_difference() [1/2]
Parameters
Returns
This operation iterates over both ranges, copying elements present in one range but not the other in order to the output
range. Iterators increment for each range. When the current element of one range is less than the other, that element
is copied and the iterator advances. If an element is contained in both ranges, no elements are copied and both ranges
advance. The output range may not overlap either input range.
set_symmetric_difference() [2/2]
Return the symmetric difference of two sorted ranges using comparison functor.
Parameters
Generated by Doxygen
3.1 Algorithms 99
Returns
This operation iterates over both ranges, copying elements present in one range but not the other in order to the output
range. Iterators increment for each range. When the current element of one range is less than the other according
to comp, that element is copied and the iterator advances. If an element is contained in both ranges according to
__comp, no elements are copied and both ranges advance. The output range may not overlap either input range.
set_union() [1/2]
Parameters
Returns
This operation iterates over both ranges, copying elements present in each range in order to the output range. Iterators
increment for each range. When the current element of one range is less than the other, that element is copied and the
iterator advanced. If an element is contained in both ranges, the element from the first range is copied and both ranges
advance. The output range may not overlap either input range.
set_union() [2/2]
Generated by Doxygen
100
Parameters
Returns
This operation iterates over both ranges, copying elements present in each range in order to the output range. Iterators
increment for each range. When the current element of one range is less than the other according to __comp, that
element is copied and the iterator advanced. If an equivalent element according to __comp is contained in both
ranges, the element from the first range is copied and both ranges advance. The output range may not overlap either
input range.
3.2 Atomics
Classes
Generated by Doxygen
3.2 Atomics 101
Macros
• #define ATOMIC_BOOL_LOCK_FREE
• #define ATOMIC_CHAR16_T_LOCK_FREE
• #define ATOMIC_CHAR32_T_LOCK_FREE
• #define ATOMIC_CHAR_LOCK_FREE
• #define ATOMIC_FLAG_INIT
• #define ATOMIC_INT_LOCK_FREE
• #define ATOMIC_LLONG_LOCK_FREE
• #define ATOMIC_LONG_LOCK_FREE
• #define ATOMIC_POINTER_LOCK_FREE
• #define ATOMIC_SHORT_LOCK_FREE
• #define ATOMIC_VAR_INIT(_VI)
• #define ATOMIC_WCHAR_T_LOCK_FREE
Typedefs
Generated by Doxygen
102
Enumerations
Functions
Generated by Doxygen
3.2 Atomics 103
Generated by Doxygen
104
Variables
Generated by Doxygen
3.2 Atomics 105
ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_BOOL_LOCK_FREE
Lock-free property.
0 indicates that the types are never lock-free. 1 indicates that the types are sometimes lock-free. 2 indicates that the
types are always lock-free.
atomic_bool
atomic_bool
atomic_char
atomic_char
atomic_char16_t
atomic_char16_t
atomic_char32_t
atomic_char32_t
Generated by Doxygen
106
atomic_int
atomic_int
atomic_int16_t
atomic_int16_t
atomic_int32_t
atomic_int32_t
atomic_int64_t
atomic_int64_t
atomic_int8_t
atomic_int8_t
atomic_int_fast16_t
atomic_int_fast16_t
atomic_int_fast32_t
atomic_int_fast32_t
Generated by Doxygen
3.2 Atomics 107
atomic_int_fast64_t
atomic_int_fast64_t
atomic_int_fast8_t
atomic_int_fast8_t
atomic_int_least16_t
atomic_int_least16_t
atomic_int_least32_t
atomic_int_least32_t
atomic_int_least64_t
atomic_int_least64_t
atomic_int_least8_t
atomic_int_least8_t
atomic_intmax_t
atomic_intmax_t
Generated by Doxygen
108
atomic_intptr_t
atomic_intptr_t
atomic_llong
atomic_llong
atomic_long
atomic_long
atomic_ptrdiff_t
atomic_ptrdiff_t
atomic_schar
atomic_schar
atomic_short
atomic_short
atomic_size_t
atomic_size_t
Generated by Doxygen
3.2 Atomics 109
atomic_uchar
atomic_uchar
atomic_uint
atomic_uint
atomic_uint16_t
atomic_uint16_t
atomic_uint32_t
atomic_uint32_t
atomic_uint64_t
atomic_uint64_t
atomic_uint8_t
atomic_uint8_t
atomic_uint_fast16_t
atomic_uint_fast16_t
Generated by Doxygen
110
atomic_uint_fast32_t
atomic_uint_fast32_t
atomic_uint_fast64_t
atomic_uint_fast64_t
atomic_uint_fast8_t
atomic_uint_fast8_t
atomic_uint_least16_t
atomic_uint_least16_t
atomic_uint_least32_t
atomic_uint_least32_t
atomic_uint_least64_t
atomic_uint_least64_t
atomic_uint_least8_t
atomic_uint_least8_t
Generated by Doxygen
3.2 Atomics 111
atomic_uintmax_t
atomic_uintmax_t
atomic_uintptr_t
atomic_uintptr_t
atomic_ullong
atomic_ullong
atomic_ulong
atomic_ulong
atomic_ushort
atomic_ushort
atomic_wchar_t
atomic_wchar_t
memory_order
Generated by Doxygen
112
kill_dependency()
kill_dependency
3.3 Concurrency
Condition Variables
Futures
Concurrency
Mutexes
Threads
Topics
• Condition Variables
• Futures
• Mutexes
• Threads
Components for concurrent operations, including threads, mutexes, and condition variables.
Generated by Doxygen
3.3 Concurrency 113
Classes
• class std::condition_variable
Enumerations
Functions
cv_status
cv_status
Generated by Doxygen
114
3.3.3 Futures
std::future_error
Concurrency Futures Exceptions
Classes
Enumerations
Functions
Generated by Doxygen
3.3 Concurrency 115
Futures and promises provide support for retrieving the result from an asynchronous function, e.g. one that is running
in another thread. A std::future represents an asynchronous result that will become ready at some later time. A
consumer can wait on a future until the result is ready to be accessed.
Since
C++11
future_errc
future_status
Generated by Doxygen
116
launch
async() [1/2]
async() [2/2]
async
future_category()
make_error_code()
error_code std::make_error_code (
future_errc __errc) [inline], [noexcept]
Referenced by std::filesystem::filesystem_error::what().
Generated by Doxygen
3.3 Concurrency 117
make_error_condition()
error_condition std::make_error_condition (
future_errc __errc) [inline], [noexcept]
swap()
swap
3.3.4 Mutexes
Concurrency Mutexes
Classes
• struct std::adopt_lock_t
• struct std::defer_lock_t
• class std::lock_guard< _Mutex >
• class std::mutex
• struct std::once_flag
• class std::recursive_mutex
• class std::recursive_timed_mutex
• class std::shared_lock< _Mutex >
• class std::shared_timed_mutex
• class std::timed_mutex
• struct std::try_to_lock_t
• class std::unique_lock< _Mutex >
Generated by Doxygen
118
Functions
Variables
call_once()
Invoke a callable and synchronize with other calls using the same flag.
lock()
Generic lock.
Parameters
Generated by Doxygen
3.3 Concurrency 119
Exceptions
Postcondition
All arguments are locked via a sequence of calls to lock(), try_lock() and unlock(). If this function exits via an exception
any locks that were obtained will be released.
try_lock()
Generic try_lock.
Parameters
Returns
Returns -1 if all try_lock() calls return true. Otherwise returns a 0-based index corresponding to the argument that
returned false.
Postcondition
adopt_lock
Generated by Doxygen
120
defer_lock
try_to_lock
3.3.5 Threads
Concurrency Threads
Namespaces
• namespace std::this_thread
Classes
Functions
Generated by Doxygen
3.4 Containers 121
Since
C++11
3.4 Containers
Associative
Containers Sequences
Unordered Associative
Topics
• Associative
• Sequences
• Unordered Associative
A container may hold any type which meets certain requirements, but the type of contained object is chosen at compile
time, and all objects in a given container must be of the same type. (Polymorphism is possible by declaring a container
of pointers to a base class and then populating it with pointers to instances of derived classes. Variant value types such
as the any class from Boost can also be used.
All contained types must be Assignable and CopyConstructible. Specific containers may place additional
requirements on the types of their contained objects.
Containers manage memory allocation and deallocation themselves when storing your objects. The objects are de-
stroyed when the container is itself destroyed. Note that if you are storing pointers in a container, delete is not
automatically called on the pointers before destroying them.
The standard containers are further refined into Sequences and Associative Containers. Unordered Associative Containers.
Generated by Doxygen
122
3.4.2 Associative
Topics
• Node handles
Classes
Each container type is parameterized on a Key type, and an ordering relation used to sort the elements of the container.
Generated by Doxygen
3.4 Containers 123
Classes
Since
C++17
The associative containers (map, set, multimap and multiset) support extracting and re-inserting nodes from the
container. Those operations use the container's node_handle type, which is an alias for a _Node_handle<...>
type. You should always use the container's node_handle type (e.g. std::set<int>::node_handle) to
refer to these types, not the non-standard internal _Node_handle names.
3.4.3 Sequences
std::experimental::
fundamentals_v1::basic
_string_view Library Fundamentals TS
std::basic_string
Containers Sequences std::basic_string_view
std::experimental::
fundamentals_v1::basic
_string_view
Strings
Classes
Generated by Doxygen
124
The differences between sequences are usually due to one or both of the following:
• memory management
• algorithmic complexity
As an example of the first case, vector is required to use a contiguous memory layout, while other sequences such
as deque are not.
The prime reason for choosing one sequence over another should be based on the second category of differences,
algorithmic complexity. For example, if you need to perform many inserts and removals from the middle of a sequence,
list would be ideal. But if you need to perform constant-time access to random elements of the sequence, then list
should not be used.
Classes
Each container type is parameterized on a Key type, a Hash type providing a hashing functor, and an ordering relation
used to sort the elements of the container.
All unordered associative containers must meet certain requirements, summarized in tables.
Generated by Doxygen
3.5 Diagnostics 125
3.5 Diagnostics
Diagnostics Exceptions
Topics
• Exceptions
Classes
• class std::_V2::error_category
• class std::error_code
• class std::error_condition
• struct std::is_error_code_enum< _Tp >
• struct std::is_error_condition_enum< _Tp >
Functions
Variables
Generated by Doxygen
126
generic_category()
make_error_code()
error_code make_error_code (
errc __e) [related]
The std::errc constants correspond to errno macros and so use the generic category.
Since
C++11
make_error_condition()
error_condition make_error_condition (
errc __e) [related]
The std::errc constants correspond to errno macros and so use the generic category.
Since
C++11
operator() [1/2]
strong_ordering operator<=> (
const error_code & __lhs,
const error_code & __rhs) [related]
This defines a total order by comparing the categories, and then if they are equal comparing the values.
Since
C++11
Generated by Doxygen
3.5 Diagnostics 127
operator() [2/2]
strong_ordering operator<=> (
const error_condition & __lhs,
const error_condition & __rhs) [related]
This defines a total order by comparing the categories, and then if they are equal comparing the values.
Since
C++11
operator<<()
Since
C++11
operator==() [1/3]
bool operator== (
const error_code & __lhs,
const error_code & __rhs) [related]
Returns true only if they have the same category and the same value.
Since
C++11
Generated by Doxygen
128
operator==() [2/3]
bool operator== (
const error_code & __lhs,
const error_condition & __rhs) [related]
Uses each category's equivalent member function to check whether the values correspond to an equivalent error
in that category.
Since
C++11
operator==() [3/3]
bool operator== (
const error_condition & __lhs,
const error_condition & __rhs) [related]
Returns true only if they have the same category and the same value.
Since
C++11
system_category()
3.5.3 Exceptions
std::experimental::
fundamentals_v1::bad
Type-safe container
_any_cast
of any type
std::future_error Futures
Generated by Doxygen
3.5 Diagnostics 129
Classes
• class __cxxabiv1::__forced_unwind
• class std::bad_alloc
• class std::experimental::fundamentals_v1::bad_any_cast
• class std::bad_cast
• class std::bad_exception
• class std::bad_function_call
• class std::experimental::fundamentals_v1::bad_optional_access
• class std::bad_typeid
• class std::bad_weak_ptr
• class std::domain_error
• class std::exception
• class std::__unspecified__::exception_ptr
• struct __gnu_cxx::forced_error
• class std::future_error
• class std::invalid_argument
• class std::length_error
• class std::logic_error
• class std::nested_exception
• class std::out_of_range
• class std::overflow_error
• class std::range_error
• class __gnu_cxx::recursive_init_error
• class std::regex_error
• class std::runtime_error
• class std::system_error
• class std::underflow_error
Typedefs
Functions
• void __gnu_cxx::__verbose_terminate_handler ()
• exception_ptr std::current_exception () noexcept
• terminate_handler std::get_terminate () noexcept
• unexpected_handler std::get_unexpected () noexcept
• template<typename _Ex >
exception_ptr std::make_exception_ptr (_Ex __ex) noexcept
• void std::rethrow_exception (exception_ptr)
• template<typename _Ex >
void std::rethrow_if_nested (const _Ex &__ex)
• terminate_handler std::set_terminate (terminate_handler) noexcept
• unexpected_handler std::set_unexpected (unexpected_handler) noexcept
• void std::terminate () noexcept
• template<typename _Tp >
void std::throw_with_nested (_Tp &&__t)
• bool std::uncaught_exception () noexcept
• void std::unexpected ()
Generated by Doxygen
130
Since
C++98
fmtflags
_Ios_Fmtflags is implementation-defined, but it is valid to perform bitwise operations on these values and expect
the Right Thing to happen. Defined objects of type fmtflags are:
• boolalpha
• dec
• fixed
• hex
• internal
• left
• oct
• right
• scientific
• showbase
• showpoint
• showpos
• skipws
• unitbuf
• uppercase
• adjustfield
• basefield
• floatfield
Generated by Doxygen
3.5 Diagnostics 131
terminate_handler
unexpected_handler
__verbose_terminate_handler()
void __gnu_cxx::__verbose_terminate_handler ()
A replacement for the standard terminate_handler which prints more information about the terminating exception (if any)
on stderr.
Call
std::set_terminate(__gnu_cxx::__verbose_terminate_handler)
References __gnu_cxx::__verbose_terminate_handler().
Referenced by __gnu_cxx::__verbose_terminate_handler().
current_exception()
If there is none, or the currently handled exception is foreign, return the null value.
Since
C++11
Referenced by std::make_exception_ptr().
Generated by Doxygen
132
get_terminate()
get_unexpected()
Since
C++11
make_exception_ptr()
References std::current_exception().
rethrow_exception()
void std::rethrow_exception (
exception_ptr )
References std::rethrow_exception().
Generated by Doxygen
3.5 Diagnostics 133
rethrow_if_nested()
If __ex contains a std::nested_exception object, call its rethrow_nested() member to rethrow the stored
exception.
After catching an exception thrown by a call to std::throw_with_nested this function can be used to rethrow
the exception that was active when std::throw_with_nested was called.
Since
C++11
set_terminate()
terminate_handler std::set_terminate (
terminate_handler ) [noexcept]
set_unexpected()
unexpected_handler std::set_unexpected (
unexpected_handler ) [noexcept]
terminate()
The runtime will call this function if exception handling must be abandoned for any reason. It can also be called by the
user.
Referenced by std::nested_exception::rethrow_nested().
Generated by Doxygen
134
throw_with_nested()
If _Tp is derived from std::nested_exception or is not usable as a base-class, throws a copy of __t. Other-
wise, throws an object of an implementation-defined type derived from both _Tp and std::nested_exception,
containing a copy of __t and the result of std::current_exception().
In other words, throws the argument as a new exception that contains the currently active exception nested within it.
This is intended for use in a catch handler to replace the caught exception with a different type, while still preserving
the original exception. When the new exception is caught, the nested exception can be rethrown by using std←-
::rethrow_if_nested.
This can be used at API boundaries, for example to catch a library's internal exception type and rethrow it nested with a
std::runtime_error, or vice versa.
Since
C++11
References std::forward().
uncaught_exception()
[18.6.4]/1: 'Returns true after completing evaluation of a throw-expression until either completing initialization of
the exception-declaration in the matching handler or entering unexpected() due to the throw; or after entering
terminate() for any reason other than an explicit call to terminate(). [Note: This includes stack unwinding
[15.2]. end note]'
2: 'When uncaught_exception() is true, throwing an exception can result in a call of 1terminate()‘ (15.5.1).’
unexpected()
void std::unexpected ()
The runtime will call this function if an exception is thrown which violates the function's exception specification.
Generated by Doxygen
3.6 Extensions 135
3.6 Extensions
SGI
Topics
• Dynamic Bitset.
• Policy-Based Data Structures
• SGI
Namespaces
• namespace __gnu_cxx
• namespace std::tr2
Classes
• class __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >
Generated by Doxygen
136
Classes
• struct std::tr2::__dynamic_bitset_base< _WordT, _Alloc >
• class std::tr2::dynamic_bitset< _WordT, _Alloc >
Functions
• template<typename _CharT , typename _Traits , typename _Alloc1 >
void std::tr2::dynamic_bitset< _WordT, _Alloc >::_M_copy_to_string (std::basic_string< _CharT, _Traits, ←-
_Alloc1 > &__str, _CharT __zero=_CharT('0'), _CharT __one=_CharT('1')) const
• template<typename _CharT , typename _Traits , typename _WordT , typename _Alloc >
std::basic_ostream< _CharT, _Traits > & std::tr2::operator<< (std::basic_ostream< _CharT, _Traits > &__os,
const dynamic_bitset< _WordT, _Alloc > &__x)
• template<typename _CharT , typename _Traits , typename _WordT , typename _Alloc >
std::basic_istream< _CharT, _Traits > & std::tr2::operator>> (std::basic_istream< _CharT, _Traits > &__←-
is, dynamic_bitset< _WordT, _Alloc > &__x)
operator"!=()
Generated by Doxygen
3.6 Extensions 137
operator&()
Parameters
_←- A bitset.
_x
_←- A bitset of the same size as __x.
_y
Returns
A new bitset.
operator-()
Parameters
_←- A bitset.
_x
_←- A bitset of the same size as __x.
_y
Returns
A new bitset.
Generated by Doxygen
138
operator<<()
operator<=()
operator>()
operator>=()
operator>>()
Input will skip whitespace and only accept '0' and '1' characters. The dynamic_bitset will grow as necessary to hold the
string of bits.
References std::basic_string< _CharT, _Traits, _Alloc >::empty(), std::basic_string< _CharT, _Traits, _Alloc >::push_back(),
std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_string< _CharT, _Traits, _Alloc >::reserve(), std::tr2::dynamic_bitset< _WordT, _Al
std::basic_ios< _CharT, _Traits >::setstate(), std::basic_string< _CharT, _Traits, _Alloc >::size(), std::tr2::dynamic_bitset< _WordT, _Allo
and std::basic_ios< _CharT, _Traits >::widen().
Generated by Doxygen
3.6 Extensions 139
operator∧ ()
Parameters
_←- A bitset.
_x
_←- A bitset of the same size as __x.
_y
Returns
A new bitset.
operator"|()
Parameters
_←- A bitset.
_x
_←- A bitset of the same size as __x.
_y
Returns
A new bitset.
Generated by Doxygen
140
Containers
Exceptions
Traits
Topics
• Containers
• Exceptions
• Tags
• Traits
Classes
This is a library of policy-based elementary data structures: associative containers and priority queues. It is designed for
high-performance, flexibility, semantic safety, and conformance to the corresponding containers in std (except for some
points where it differs by design).
Generated by Doxygen
3.6 Extensions 141
3.6.3.2 Containers
Branch-Based
Hash-Based
List-Based
Topics
• Branch-Based
• Hash-Based
• Heap-Based
• List-Based
3.6.3.2.2 Branch-Based
Topics
Generated by Doxygen
142
Classes
Macros
• #define PB_DS_BRANCH_BASE
• #define PB_DS_TREE_BASE
• #define PB_DS_TREE_NODE_AND_IT_TRAITS
• #define PB_DS_TRIE_BASE
• #define PB_DS_TRIE_NODE_AND_IT_TRAITS
Detailed Description
*Classes
Detailed Description
3.6.3.2.3 Hash-Based
Generated by Doxygen
3.6 Extensions 143
Topics
Classes
• class __gnu_pbds::basic_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Resize_Policy, Store_Hash, Tag, Policy_Tl, _Alloc >
• class __gnu_pbds::cc_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Comb_Hash_Fn, Resize_Policy, Store_Hash, _Alloc >
• class __gnu_pbds::gp_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Al
Macros
• #define PB_DS_CC_HASH_BASE
• #define PB_DS_GP_HASH_BASE
• #define PB_DS_HASH_BASE
Detailed Description
*Classes
• class __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy >
• class __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Probe_Fn, Probe_Fn, Resize_
Detailed Description
3.6.3.2.4 Heap-Based
Generated by Doxygen
144
Topics
Classes
Detailed Description
*Classes
Detailed Description
3.6.3.2.5 List-Based
Containers List-Based
Generated by Doxygen
3.6 Extensions 145
Classes
• class __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >
Macros
• #define PB_DS_LU_BASE
Detailed Description
3.6.3.3 Exceptions
Classes
• struct __gnu_pbds::container_error
• struct __gnu_pbds::insert_error
• struct __gnu_pbds::join_error
• struct __gnu_pbds::resize_error
Functions
• void __gnu_pbds::__throw_container_error ()
• void __gnu_pbds::__throw_insert_error ()
• void __gnu_pbds::__throw_join_error ()
• void __gnu_pbds::__throw_resize_error ()
3.6.3.4 Tags
Generated by Doxygen
146
Topics
Classes
• struct __gnu_pbds::trivial_iterator_tag
Typedefs
trivial_iterator_difference_type
Generated by Doxygen
3.6 Extensions 147
Classes
• struct __gnu_pbds::associative_tag
• struct __gnu_pbds::basic_branch_tag
• struct __gnu_pbds::basic_hash_tag
• struct __gnu_pbds::binary_heap_tag
• struct __gnu_pbds::binomial_heap_tag
• struct __gnu_pbds::cc_hash_tag
• struct __gnu_pbds::container_tag
• struct __gnu_pbds::gp_hash_tag
• struct __gnu_pbds::list_update_tag
• struct __gnu_pbds::ov_tree_tag
• struct __gnu_pbds::pairing_heap_tag
• struct __gnu_pbds::pat_trie_tag
• struct __gnu_pbds::priority_queue_tag
• struct __gnu_pbds::rb_tree_tag
• struct __gnu_pbds::rc_binomial_heap_tag
• struct __gnu_pbds::sequence_tag
• struct __gnu_pbds::splay_tree_tag
• struct __gnu_pbds::string_tag
• struct __gnu_pbds::thin_heap_tag
• struct __gnu_pbds::tree_tag
• struct __gnu_pbds::trie_tag
Detailed Description
Classes
• struct __gnu_pbds::basic_invalidation_guarantee
• struct __gnu_pbds::point_invalidation_guarantee
• struct __gnu_pbds::range_invalidation_guarantee
Generated by Doxygen
148
Detailed Description
3.6.3.5 Traits
Classes
Generated by Doxygen
3.6 Extensions 149
Variables
3.6.4 SGI
Extensions SGI
Classes
Generated by Doxygen
150
Functions
Generated by Doxygen
3.6 Extensions 151
• constexpr bitset< _Nb > & std::bitset< _Nb >::_Unchecked_set (size_t __pos) noexcept
• constexpr bitset< _Nb > & std::bitset< _Nb >::_Unchecked_set (size_t __pos, int __val) noexcept
• constexpr bitset< _Nb > & std::bitset< _Nb >::_Unchecked_reset (size_t __pos) noexcept
• constexpr bitset< _Nb > & std::bitset< _Nb >::_Unchecked_flip (size_t __pos) noexcept
• constexpr bool std::bitset< _Nb >::_Unchecked_test (size_t __pos) const noexcept
Because libstdc++ based its implementation of the STL subsections of the library on the SGI 3.3 implementation, we
inherited their extensions as well.
They are additionally documented in the online documentation, a copy of which is also shipped with the library
source code (in .../docs/html/documentation.html). You can also read the documentation on SGI's site, which is
still running even though the code is not maintained.
NB that the following notes are pulled from various comments all over the place, so they may seem stilted.
The identity_element functions are not part of the C++ standard; SGI provided them as an extension. Its ar-
gument is an operation, and its return value is the identity element for that operation. It is overloaded for addition and
multiplication, and you can overload it for your own nefarious operations.
As an extension to the binders, SGI provided composition functors and wrapper functions to aid in their creation. The
unary_compose functor is constructed from two functions/functors, f and g. Calling operator() with a single
argument x returns f(g(x)). The function compose1 takes the two functions and constructs a unary_compose
variable for you.
binary_compose is constructed from three functors, f, g1, and g2. Its operator() returns f(g1(x),g2(x)). The
function compose2 takes f, g1, and g2, and constructs the binary_compose instance for you. For example, if f
returns an int, then
int answer = (compose2(f,g1,g2))(x);
is equivalent to
int temp1 = g1(x);
int temp2 = g2(x);
int answer = f(temp1,temp2);
But the first form is more compact, and can be passed around as a functor to other algorithms.
As an extension, SGI provided a functor called identity. When a functor is required but no operations are desired,
this can be used as a pass-through. Its operator() returns its argument unchanged.
select1st and select2nd are extensions provided by SGI. Their operator()s take a std::pair as an
argument, and return either the first member or the second member, respectively. They can be used (especially with the
composition functors) to strip data from a sequence before performing the remainder of an algorithm.
The operator() of the project1st functor takes two arbitrary arguments and returns the first one, while
project2nd returns the second one. They are extensions provided by SGI.
These three functors are each constructed from a single arbitrary variable/value. Later, their operator()s completely
ignore any arguments passed, and return the stored value.
Generated by Doxygen
152
The helper creator functions constant0, constant1, and constant2 each take a result argument and construct
variables of the appropriate functor type.
__median() [1/2]
Parameters
_←- A value.
_a
_←- A value.
_b
_←- A value.
_c
Returns
One of a, b or c.
If {l,m,n} is some convolution of {a,b,c} such that l<=m<=n then the value returned will be m. This is an SGI
extension.
__median() [2/2]
Parameters
__a A value.
__b A value.
__c A value.
__comp A binary predicate.
Returns
One of a, b or c.
If {l,m,n} is some convolution of {a,b,c} such that comp(l,m) and comp(m,n) are both true then the value returned
will be m. This is an SGI extension.
Generated by Doxygen
3.6 Extensions 153
_Find_first()
template<size_t _Nb>
size_t std::bitset< _Nb >::_Find_first () const [inline], [constexpr], [noexcept]
Finds the index of the first "on" bit.
Returns
See also
_Find_next
_Find_next()
template<size_t _Nb>
size_t std::bitset< _Nb >::_Find_next (
size_t __prev) const [inline], [constexpr], [noexcept]
Finds the index of the next "on" bit after prev.
Returns
Parameters
__prev Where to start searching.
See also
_Find_first
_Unchecked_flip()
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::_Unchecked_flip (
size_t __pos) [inline], [constexpr], [noexcept]
These versions of single-bit set, reset, flip, and test are extensions from the SGI version. They do no range checking.
_Unchecked_reset()
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::_Unchecked_reset (
size_t __pos) [inline], [constexpr], [noexcept]
These versions of single-bit set, reset, flip, and test are extensions from the SGI version. They do no range checking.
_Unchecked_set() [1/2]
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::_Unchecked_set (
size_t __pos) [inline], [constexpr], [noexcept]
These versions of single-bit set, reset, flip, and test are extensions from the SGI version. They do no range checking.
Generated by Doxygen
154
_Unchecked_set() [2/2]
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::_Unchecked_set (
size_t __pos,
int __val) [inline], [constexpr], [noexcept]
These versions of single-bit set, reset, flip, and test are extensions from the SGI version. They do no range checking.
_Unchecked_test()
template<size_t _Nb>
bool std::bitset< _Nb >::_Unchecked_test (
size_t __pos) const [inline], [constexpr], [noexcept]
These versions of single-bit set, reset, flip, and test are extensions from the SGI version. They do no range checking.
compose1()
compose2()
constant0()
constant1()
constant2()
Generated by Doxygen
3.6 Extensions 155
copy_n()
Parameters
Returns
This is an SGI extension. This inline function will boil down to a call to memmove whenever possible. Failing that, if ran-
dom access iterators are passed, then the loop count will be known (and therefore a candidate for compiler optimizations
such as unrolling).
distance()
identity_element() [1/2]
identity_element() [2/2]
lexicographical_compare_3way()
Generated by Doxygen
156
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2)
memcmp on steroids.
Parameters
Returns
The return value will be less than zero if the first range is lexigraphically less than the second, greater than zero if the
second range is lexigraphically less than the first, and zero otherwise. This is an SGI extension.
power() [1/2]
power() [2/2]
random_sample() [1/2]
Generated by Doxygen
3.6 Extensions 157
random_sample() [2/2]
random_sample_n() [1/2]
random_sample_n() [2/2]
uninitialized_copy_n()
Generated by Doxygen
158
Parameters
Returns
3.7 Filesystem
Files
• file filesystem
Classes
• class std::filesystem::directory_entry
• class std::filesystem::directory_iterator
• class std::filesystem::file_status
• class std::filesystem::filesystem_error
• class std::filesystem::path::iterator
• class std::filesystem::path
• class std::filesystem::recursive_directory_iterator
• struct std::filesystem::space_info
Typedefs
• using std::filesystem::file_time_type
Enumerations
Generated by Doxygen
3.7 Filesystem 159
Functions
Generated by Doxygen
160
Generated by Doxygen
3.7 Filesystem 161
Generated by Doxygen
162
file_time_type
using std::filesystem::file_time_type
The type used for file timestamps.
copy_options
directory_options
Generated by Doxygen
3.7 Filesystem 163
file_type
perm_options
perms
begin() [1/2]
directory_iterator begin (
directory_iterator __iter) [related]
Enable range-based for using directory_iterator.
Since
C++17
begin() [2/2]
recursive_directory_iterator begin (
recursive_directory_iterator __iter) [related]
Enable range-based for using recursive_directory_iterator.
Since
C++17
end() [1/2]
directory_iterator end (
directory_iterator ) [related]
Return a past-the-end directory_iterator.
end() [2/2]
recursive_directory_iterator end (
recursive_directory_iterator ) [related]
Return a past-the-end recursive_directory_iterator.
u8path() [1/2]
Generated by Doxygen
164
_InputIterator __first,
_InputIterator __last) [related]
Create a path from a UTF-8-encoded sequence of char
Since
C++17
u8path() [2/2]
C++17
3.8 I/O
Collaboration diagram for I/O:
std::istreambuf_iterator
std::ostreambuf_iterator
I/O Iterators
Classes
Generated by Doxygen
3.8 I/O 165
Typedefs
Nearly all of the I/O classes are parameterized on the type of characters they read and write. (The major exception is
ios_base at the top of the hierarchy.) This is a change from pre-Standard streams, which were not templates.
For ease of use and compatibility, all of the basic_∗ I/O-related classes are given typedef names for both of the builtin
character widths (wide and narrow). The typedefs are the same as the pre-Standard names, for example:
typedef basic_ifstream<char> ifstream;
Because properly forward-declaring these classes can be difficult, you should not do it yourself. Instead, include the
<iosfwd> header, which contains only declarations of all the I/O classes as well as the typedefs. Trying to forward-
declare the typedefs themselves (e.g., class ostream;) is not valid ISO C++.
For more specific declarations, see https://gcc.gnu.org/onlinedocs/libstdc++/manual/io.←-
html#std.io.objects
filebuf
fstream
Generated by Doxygen
166
ifstream
ios
iostream
istream
istringstream
ofstream
ostream
ostringstream
streambuf
stringbuf
stringstream
Generated by Doxygen
3.8 I/O 167
wfilebuf
wfstream
wifstream
wios
wiostream
wistream
wistringstream
wofstream
wostream
wostringstream
wstreambuf
Generated by Doxygen
168
wstringbuf
wstringstream
3.9 Iterators
Collaboration diagram for Iterators:
std::istreambuf_iterator
std::ostreambuf_iterator I/O
Iterators
Iterator Tags
std::input_iterator_tag
Topics
• Iterator Tags
Classes
Generated by Doxygen
3.9 Iterators 169
Macros
• #define _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter)
• #define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter)
Functions
Generated by Doxygen
170
Generated by Doxygen
3.9 Iterators 171
Variables
__iterator_category()
back_inserter()
Generated by Doxygen
172
Parameters
Returns
This wrapper function helps in creating back_insert_iterator instances. Typing the name of the iterator requires knowing
the precise full type of the container, which can be tedious and impedes generic programming. Using this function lets
you take advantage of automatic template parameter deduction, making the compiler match the correct types for you.
Referenced by std::match_results< _Bi_iter, _Alloc >::format(), std::match_results< _Bi_iter, _Alloc >::format(),
std::regex_replace(), std::regex_replace(), std::regex_replace(), and std::regex_replace().
front_inserter()
Parameters
Returns
This wrapper function helps in creating front_insert_iterator instances. Typing the name of the iterator requires knowing
the precise full type of the container, which can be tedious and impedes generic programming. Using this function lets
you take advantage of automatic template parameter deduction, making the compiler match the correct types for you.
inserter()
Parameters
Returns
This wrapper function helps in creating insert_iterator instances. Typing the name of the iterator requires knowing the
precise full type of the container, which can be tedious and impedes generic programming. Using this function lets you
take advantage of automatic template parameter deduction, making the compiler match the correct types for you.
Generated by Doxygen
3.9 Iterators 173
make_reverse_iterator()
operator==()
Parameters
_←- A reverse_iterator.
_x
_←- A reverse_iterator.
_y
Returns
A simple bool.
std::input_iterator_tag
Iterator Tags Iterators
Classes
• struct std::bidirectional_iterator_tag
• struct std::contiguous_iterator_tag
• struct std::forward_iterator_tag
• struct std::input_iterator_tag
• struct std::output_iterator_tag
• struct std::random_access_iterator_tag
These are empty types, used to distinguish different iterators. The distinction is not made by what they contain, but
simply by what they are. Different underlying algorithms can then be used based on the different operations supported
by different iterator types.
Generated by Doxygen
174
3.10 Locales
Namespaces
• namespace std::__detail
Classes
Functions
• template<typename _OutStr , typename _InChar , typename _Codecvt , typename _State , typename _Fn >
bool std::__do_str_codecvt (const _InChar ∗__first, const _InChar ∗__last, _OutStr &__outstr, const _Codecvt
&__cvt, _State &__state, size_t &__count, _Fn __fn)
• template<typename _CharT , typename _Traits , typename _Alloc , typename _State >
bool std::__str_codecvt_in (const char ∗__first, const char ∗__last, basic_string< _CharT, _Traits, _Alloc >
&__outstr, const codecvt< _CharT, char, _State > &__cvt)
• template<typename _CharT , typename _Traits , typename _Alloc , typename _State >
bool std::__str_codecvt_in (const char ∗__first, const char ∗__last, basic_string< _CharT, _Traits, _Alloc >
&__outstr, const codecvt< _CharT, char, _State > &__cvt, _State &__state, size_t &__count)
• template<typename _CharT , typename _Traits , typename _Alloc , typename _State >
bool std::__str_codecvt_in_all (const char ∗__first, const char ∗__last, basic_string< _CharT, _Traits, _Alloc >
&__outstr, const codecvt< _CharT, char, _State > &__cvt)
• template<typename _CharT , typename _Traits , typename _Alloc , typename _State >
bool std::__str_codecvt_out (const _CharT ∗__first, const _CharT ∗__last, basic_string< char, _Traits, _Alloc
> &__outstr, const codecvt< _CharT, char, _State > &__cvt)
• template<typename _CharT , typename _Traits , typename _Alloc , typename _State >
bool std::__str_codecvt_out (const _CharT ∗__first, const _CharT ∗__last, basic_string< char, _Traits, _Alloc
> &__outstr, const codecvt< _CharT, char, _State > &__cvt, _State &__state, size_t &__count)
• template<typename _CharT , typename _Traits , typename _Alloc , typename _State >
bool std::__str_codecvt_out_all (const _CharT ∗__first, const _CharT ∗__last, basic_string< char, _Traits, _←-
Alloc > &__outstr, const codecvt< _CharT, char, _State > &__cvt)
Generated by Doxygen
3.10 Locales 175
has_facet()
Template Parameters
Parameters
__loc The locale to test.
Returns
use_facet()
Template Parameters
Parameters
__loc The locale to use.
Returns
Generated by Doxygen
176
Exceptions
Referenced by std::money_get< _CharT, _InIter >::do_get(), std::time_get< _CharT, _InIter >::do_get(), std::time_get< _CharT, _InIter >
std::time_get< _CharT, _InIter >::do_get_monthname(), std::time_get< _CharT, _InIter >::do_get_time(), std::time_get< _CharT, _InIter
std::time_get< _CharT, istreambuf_iterator< _CharT > >::do_get_weekday(), std::time_get< _CharT, _InIter >::do_get_year(),
std::money_put< _CharT, _OutIter >::do_put(), std::time_put< _CharT, _OutIter >::do_put(), std::time_get< _CharT, _InIter >::get(),
std::isalnum(), std::isalpha(), std::isblank(), std::iscntrl(), std::regex_traits< typename >::isctype(), std::isdigit(),
std::isgraph(), std::islower(), std::isprint(), std::ispunct(), std::isspace(), std::isupper(), std::isxdigit(), std::regex_traits< typename >::lookup
std::regex_traits< _CharType >::lookup_classname(), std::regex_traits< typename >::lookup_collatename(), std::basic_ostream< _Cha
std::basic_istream< _CharT, _Traits >::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(),
std::operator>>(), std::time_put< _CharT, _OutIter >::put(), std::tolower(), std::toupper(), std::regex_traits< typename >::transform(),
std::regex_traits< typename >::transform_primary(), std::regex_traits< typename >::translate_nocase(), and
std::ws().
3.11 Numerics
Collaboration diagram for Numerics:
Bit manipulation
Complex Numbers
Decimal Floating-Point
Arithmetic
Mathematical Special
Numerics
Functions
Numeric Arrays
Generated by Doxygen
3.11 Numerics 177
Topics
• Bit manipulation
• Complex Numbers
• Decimal Floating-Point Arithmetic
• Mathematical Special Functions
• Numeric Arrays
• Random Number Generation
• TR1 Mathematical Special Functions
Components for performing numeric operations. Includes support for complex number types, random number genera-
tion, numeric (n-at-a-time) arrays, generalized numeric algorithms, and mathematical special functions.
Classes
Generated by Doxygen
178
Functions
• constexpr std::complex< double >::complex (const complex< long double > &)
• constexpr std::complex< float >::complex (const complex< double > &)
• constexpr std::complex< float >::complex (const complex< long double > &)
• template<typename _Tp >
_Tp std::__complex_abs (const complex< _Tp > &__z)
• template<typename _Tp >
_Tp std::__complex_arg (const complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::__complex_cos (const complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::__complex_cosh (const complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::__complex_exp (const complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::__complex_log (const complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::__complex_pow (const complex< _Tp > &__x, const complex< _Tp > &__y)
• template<typename _Tp >
complex< _Tp > std::__complex_pow_unsigned (complex< _Tp > __x, unsigned __n)
• template<typename _Tp >
complex< _Tp > std::__complex_sin (const complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::__complex_sinh (const complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::__complex_sqrt (const complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::__complex_tan (const complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::__complex_tanh (const complex< _Tp > &__z)
• template<typename _Tp >
_Tp std::abs (const complex< _Tp > &)
• template<typename _Tp >
_Tp std::arg (const complex< _Tp > &)
• template<typename _Tp >
constexpr complex< _Tp > std::conj (const complex< _Tp > &)
• template<typename _Tp >
std::complex< typename __gnu_cxx::__promote< _Tp >::__type > std::tr1::conj (_Tp __x)
• template<typename _Tp >
std::complex< _Tp > std::tr1::conj (const std::complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::cos (const complex< _Tp > &)
• template<typename _Tp >
complex< _Tp > std::cosh (const complex< _Tp > &)
• template<typename _Tp >
complex< _Tp > std::exp (const complex< _Tp > &)
• template<typename _Tp >
std::complex< _Tp > std::tr1::fabs (const std::complex< _Tp > &__z)
• template<typename _Tp >
constexpr _Tp std::imag (const complex< _Tp > &__z)
• template<typename _Tp >
complex< _Tp > std::log (const complex< _Tp > &)
Generated by Doxygen
3.11 Numerics 179
Generated by Doxygen
180
Generated by Doxygen
3.11 Numerics 181
abs()
arg()
conj()
cos()
cosh()
exp()
Generated by Doxygen
182
fabs()
log()
log10()
norm()
operator∗() [1/3]
operator∗() [2/3]
operator∗() [3/3]
Generated by Doxygen
3.11 Numerics 183
operator∗=() [1/2]
operator∗=() [2/2]
operator+() [1/4]
operator+() [2/4]
operator+() [3/4]
operator+() [4/4]
operator+=()
Generated by Doxygen
184
operator-() [1/4]
operator-() [2/4]
operator-() [3/4]
operator-() [4/4]
operator-=()
operator/() [1/3]
operator/() [2/3]
Generated by Doxygen
3.11 Numerics 185
operator/() [3/3]
operator/=() [1/2]
operator/=() [2/2]
operator<<()
operator=() [1/2]
operator=() [2/2]
operator==() [1/2]
Generated by Doxygen
186
operator==() [2/2]
operator>>()
polar()
pow() [1/5]
pow() [2/5]
pow() [3/5]
pow() [4/5]
Generated by Doxygen
3.11 Numerics 187
pow() [5/5]
sin()
sinh()
sqrt()
tan()
tanh()
Generated by Doxygen
188
Decimal Floating-Point
Numerics
Arithmetic
Namespaces
• namespace std::decimal
Mathematical Special
Numerics
Functions
Functions
Generated by Doxygen
3.11 Numerics 189
• float std::assoc_legendref (unsigned int __l, unsigned int __m, float __x)
• long double std::assoc_legendrel (unsigned int __l, unsigned int __m, long double __x)
• template<typename _Tpa , typename _Tpb >
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type std::beta (_Tpa __a, _Tpb __b)
• float std::betaf (float __a, float __b)
• long double std::betal (long double __a, long double __b)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::comp_ellint_1 (_Tp __k)
• float std::comp_ellint_1f (float __k)
• long double std::comp_ellint_1l (long double __k)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::comp_ellint_2 (_Tp __k)
• float std::comp_ellint_2f (float __k)
• long double std::comp_ellint_2l (long double __k)
• template<typename _Tp , typename _Tpn >
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type std::comp_ellint_3 (_Tp __k, _Tpn __nu)
• float std::comp_ellint_3f (float __k, float __nu)
• long double std::comp_ellint_3l (long double __k, long double __nu)
• template<typename _Tpa , typename _Tpc , typename _Tp >
__gnu_cxx::__promote_3< _Tpa, _Tpc, _Tp >::__type __gnu_cxx::conf_hyperg (_Tpa __a, _Tpc __c, _Tp __x)
• float __gnu_cxx::conf_hypergf (float __a, float __c, float __x)
• long double __gnu_cxx::conf_hypergl (long double __a, long double __c, long double __x)
• template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_bessel_i (_Tpnu __nu, _Tp __x)
• float std::cyl_bessel_if (float __nu, float __x)
• long double std::cyl_bessel_il (long double __nu, long double __x)
• template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_bessel_j (_Tpnu __nu, _Tp __x)
• float std::cyl_bessel_jf (float __nu, float __x)
• long double std::cyl_bessel_jl (long double __nu, long double __x)
• template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_bessel_k (_Tpnu __nu, _Tp __x)
• float std::cyl_bessel_kf (float __nu, float __x)
• long double std::cyl_bessel_kl (long double __nu, long double __x)
• template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_neumann (_Tpnu __nu, _Tp __x)
• float std::cyl_neumannf (float __nu, float __x)
• long double std::cyl_neumannl (long double __nu, long double __x)
• template<typename _Tp , typename _Tpp >
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type std::ellint_1 (_Tp __k, _Tpp __phi)
• float std::ellint_1f (float __k, float __phi)
• long double std::ellint_1l (long double __k, long double __phi)
• template<typename _Tp , typename _Tpp >
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type std::ellint_2 (_Tp __k, _Tpp __phi)
• float std::ellint_2f (float __k, float __phi)
• long double std::ellint_2l (long double __k, long double __phi)
• template<typename _Tp , typename _Tpn , typename _Tpp >
__gnu_cxx::__promote_3< _Tp, _Tpn, _Tpp >::__type std::ellint_3 (_Tp __k, _Tpn __nu, _Tpp __phi)
• float std::ellint_3f (float __k, float __nu, float __phi)
• long double std::ellint_3l (long double __k, long double __nu, long double __phi)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::expint (_Tp __x)
Generated by Doxygen
190
A collection of advanced mathematical special functions, defined by ISO/IEC IS 29124 and then added to ISO C++
2017.
The first significant library upgrade on the road to C++2011, TR1, included a set of 23 mathematical functions that
significantly extended the standard transcendental functions inherited from C and declared in <cmath>.
Although most components from TR1 were eventually adopted for C++11 these math functions were left behind out of
concern for implementability. The math functions were published as a separate international standard IS 29124 -
Extensions to the C++ Library to Support Mathematical Special Functions.
For C++17 these functions were incorporated into the main standard.
Generated by Doxygen
3.11 Numerics 191
3.11.5.2.2 Contents
• cyl_neumann - Cylindrical Neumann functions or Cylindrical Bessel functions of the second kind
The hypergeometric functions were stricken from the TR29124 and C++17 versions of this math library because of
implementation concerns. However, since they were in the TR1 version and since they are popular we kept them as an
extension in namespace __gnu_cxx:
The arguments suppled to the non-suffixed functions will be promoted according to the following rules:
1. If any argument intended to be floating point is given an integral value That integral value is promoted to double.
2. All floating point arguments are promoted up to the largest floating point precision among them.
Generated by Doxygen
192
If any of the floating point arguments supplied to these functions is invalid or NaN (std::numeric_limits<Tp>::quiet_←-
NaN), the value NaN is returned.
3.11.5.2.5 Implementation
We strive to implement the underlying math with type generic algorithms to the greatest extent possible. In practice, the
functions are thin wrappers that dispatch to function templates. Type dependence is controlled with std::numeric_limits
and functions thereof.
We don't promote float to double or double to long double reflexively. The goal is for float functions
to operate more quickly, at the cost of float accuracy and possibly a smaller domain of validity. Similaryly, long
double should give you more dynamic range and slightly more pecision than double on many systems.
3.11.5.2.6 Testing
These functions have been tested against equivalent implementations from the Gnu Scientific Library,
GSL and Boost and the ratio
|f − ftest |
|ftest |
is generally found to be within 10-15 for 64-bit double on linux-x86_64 systems over most of the ranges of validity.
Todo Provide accuracy comparisons on a per-function basis for a small number of targets.
Abramowitz and Stegun: Handbook of Mathematical Functions, with Formulas, Graphs, and Mathematical Tables
Edited by Milton Abramowitz and Irene A. Stegun, National Bureau of Standards Applied Mathematics Series - 55
Issued June 1964, Tenth Printing, December 1972, with corrections Electronic versions of A&S abound including
both pdf and navigable html.
for example http://people.math.sfu.ca/∼cbm/aands/
The old A&S has been redone as the NIST Digital Library of Mathematical Functions: http://dlmf.←-
nist.gov/ This version is far more navigable and includes more recent work.
An Atlas of Functions: with Equator, the Atlas Function Calculator 2nd Edition, by Oldham, Keith B., Myland, Jan,
Spanier, Jerome
Asymptotics and Special Functions by Frank W. J. Olver, Academic Press, 1974
Numerical Recipes in C, The Art of Scientific Computing, by William H. Press, Second Ed., Saul A. Teukolsky,
William T. Vetterling, and Brian P. Flannery, Cambridge University Press, 1992
The Special Functions and Their Approximations: Volumes 1 and 2, by Yudell L. Luke, Academic Press, 1969
airy_ai()
airy_aif()
float __gnu_cxx::airy_aif (
float __x) [inline]
Return the Airy function Ai(x) of float argument x.
Generated by Doxygen
3.11 Numerics 193
airy_ail()
airy_bi()
airy_bif()
float __gnu_cxx::airy_bif (
float __x) [inline]
Return the Airy function Bi(x) of float argument x.
airy_bil()
assoc_laguerre()
(α + 1)n
Lα
n (x) = 1 F1 (−n; α + 1; x)
n!
where (α)n is the Pochhammer symbol and 1 F1 (a; c; x) is the confluent hypergeometric function.
The associated Laguerre polynomial is defined for integral degree α = m by:
dm
Lm
n (x) = (−1)
m
Ln+m (x)
dxm
where the Laguerre polynomial is defined by:
ex dn n −x
Ln (x) = (x e )
n! dxn
and x >= 0.
See also
Generated by Doxygen
194
Template Parameters
Parameters
Exceptions
assoc_laguerref()
float std::assoc_laguerref (
unsigned int __n,
unsigned int __m,
float __x) [inline]
Return the associated Laguerre polynomial of order n, degree m: Lm
n (x) for float argument.
See also
assoc_laguerrel()
See also
assoc_legendre()
Generated by Doxygen
3.11 Numerics 195
See also
Template Parameters
Parameters
_←- The degree __l >= 0.
_l
_←- The order __m <= l.
_m
_←- The argument, abs(__x) <= 1.
_x
Exceptions
assoc_legendref()
float std::assoc_legendref (
unsigned int __l,
unsigned int __m,
float __x) [inline]
Return the associated Legendre function of degree l and order m for float argument.
See also
assoc_legendrel()
See also
beta()
Generated by Doxygen
196
Template Parameters
Parameters
Exceptions
betaf()
float std::betaf (
float __a,
float __b) [inline]
Return the beta function, B(a, b), for float parameters a, b.
See also
betal()
See also
comp_ellint_1()
Generated by Doxygen
3.11 Numerics 197
ellint_1 for details of the incomplete elliptic function of the first kind.
Template Parameters
Parameters
_←- The modulus, abs(__k) <= 1
_k
Exceptions
comp_ellint_1f()
float std::comp_ellint_1f (
float __k) [inline]
Return the complete elliptic integral of the first kind E(k) for float modulus k.
See also
comp_ellint_1l()
comp_ellint_2()
where E(k, ϕ) is the incomplete elliptic integral of the second kind and the modulus |k| <= 1.
Generated by Doxygen
198
See also
ellint_2 for details of the incomplete elliptic function of the second kind.
Template Parameters
Parameters
_←- The modulus, abs(__k) <= 1
_k
Exceptions
comp_ellint_2f()
float std::comp_ellint_2f (
float __k) [inline]
Return the complete elliptic integral of the second kind E(k) for float modulus k.
See also
comp_ellint_2l()
comp_ellint_3()
where Π(k, ν, ϕ) is the incomplete elliptic integral of the second kind and the modulus |k| <= 1.
See also
ellint_3 for details of the incomplete elliptic function of the third kind.
Generated by Doxygen
3.11 Numerics 199
Template Parameters
Parameters
__k The modulus, abs(__k) <= 1
__nu The argument
Exceptions
comp_ellint_3f()
float std::comp_ellint_3f (
float __k,
float __nu) [inline]
Return the complete elliptic integral of the third kind Π(k, ν) for float modulus k.
See also
comp_ellint_3l()
See also
conf_hyperg()
Generated by Doxygen
200
Parameters
_←- The numeratorial parameter
_a
_←- The denominatorial parameter
_c
_←- The argument
_x
conf_hypergf()
float __gnu_cxx::conf_hypergf (
float __a,
float __c,
float __x) [inline]
Return the confluent hypergeometric function 1 F1 (a; c; x) of float numeratorial parameter a, denominatorial param-
eter c, and argument x.
See also
conf_hypergl()
cyl_bessel_i()
Template Parameters
Generated by Doxygen
3.11 Numerics 201
Parameters
__nu The order
__x The argument, __x >= 0
Exceptions
cyl_bessel_if()
float std::cyl_bessel_if (
float __nu,
float __x) [inline]
Return the regular modified Bessel function Iν (x) for float order ν and argument x >= 0.
See also
cyl_bessel_il()
cyl_bessel_j()
Template Parameters
Parameters
__nu The order
__x The argument, __x >= 0
Generated by Doxygen
202
Exceptions
cyl_bessel_jf()
float std::cyl_bessel_jf (
float __nu,
float __x) [inline]
Return the Bessel function of the first kind Jν (x) for float order ν and argument x >= 0.
See also
cyl_bessel_jl()
See also
cyl_bessel_k()
Template Parameters
Parameters
__nu The order
__x The argument, __x >= 0
Generated by Doxygen
3.11 Numerics 203
Exceptions
cyl_bessel_kf()
float std::cyl_bessel_kf (
float __nu,
float __x) [inline]
Return the irregular modified Bessel function Kν (x) for float order ν and argument x >= 0.
See also
cyl_bessel_kl()
cyl_neumann()
Template Parameters
Parameters
__nu The order
__x The argument, __x >= 0
Exceptions
Generated by Doxygen
204
cyl_neumannf()
float std::cyl_neumannf (
float __nu,
float __x) [inline]
Return the Neumann function Nν (x) of float order ν and argument x.
See also
cyl_neumannl()
See also
ellint_1()
See also
comp_ellint_1.
Template Parameters
Parameters
__k The modulus, abs(__k) <= 1
__phi The integral limit argument in radians
Exceptions
Generated by Doxygen
3.11 Numerics 205
ellint_1f()
float std::ellint_1f (
float __k,
float __phi) [inline]
Return the incomplete elliptic integral of the first kind E(k, ϕ) for float modulus k and angle ϕ.
See also
ellint_1l()
See also
ellint_2()
For ϕ = π/2 this becomes the complete elliptic integral of the second kind, E(k).
See also
comp_ellint_2.
Template Parameters
Parameters
__k The modulus, abs(__k) <= 1
__phi The integral limit argument in radians
Returns
Generated by Doxygen
206
Exceptions
ellint_2f()
float std::ellint_2f (
float __k,
float __phi) [inline]
Return the incomplete elliptic integral of the second kind E(k, ϕ) for float argument.
See also
ellint_2l()
See also
ellint_3()
For ϕ = π/2 this becomes the complete elliptic integral of the third kind, Π(k, ν).
See also
comp_ellint_3.
Template Parameters
Generated by Doxygen
3.11 Numerics 207
Parameters
__k The modulus, abs(__k) <= 1
__nu The second argument
__phi The integral limit argument in radians
Returns
Exceptions
ellint_3f()
float std::ellint_3f (
float __k,
float __nu,
float __phi) [inline]
Return the incomplete elliptic integral of the third kind Π(k, ν, ϕ) for float argument.
See also
ellint_3l()
expint()
Template Parameters
Generated by Doxygen
208
Parameters
expintf()
float std::expintf (
float __x) [inline]
Return the exponential integral Ei(x) for float argument x.
See also
expintl()
See also
hermite()
Template Parameters
Parameters
_←- The order
_n
_←- The argument
_x
Generated by Doxygen
3.11 Numerics 209
hermitef()
float std::hermitef (
unsigned int __n,
float __x) [inline]
Return the Hermite polynomial Hn (x) of nonnegative order n and float argument x.
See also
hermitel()
See also
hyperg()
Parameters
hypergf()
float __gnu_cxx::hypergf (
float __a,
Generated by Doxygen
210
float __b,
float __c,
float __x) [inline]
Return the hypergeometric function 2 F1 (a, b; c; x) of @ float numeratorial parameters a and b, denominatorial param-
eter c, and argument x.
See also
hypergl()
See also
laguerre()
Template Parameters
Parameters
_←- The nonnegative order
_n
_←- The argument __x >= 0
_x
Exceptions
Generated by Doxygen
3.11 Numerics 211
laguerref()
float std::laguerref (
unsigned int __n,
float __x) [inline]
Returns the Laguerre polynomial Ln (x) of nonnegative degree n and float argument x >= 0.
See also
laguerrel()
See also
legendre()
1 dl 2
Pl (x) = (x − 1)l
2l l! dxl
Template Parameters
Parameters
Exceptions
Generated by Doxygen
212
legendref()
float std::legendref (
unsigned int __l,
float __x) [inline]
Return the Legendre polynomial Pl (x) of nonnegative degree l and float argument |x| <= 0.
See also
legendrel()
See also
riemann_zeta()
and
∞
1 X
ζ(s) = (−1)k−1 k −s for 0 <= s <= 1
1 − 21−s
k=1
Template Parameters
Parameters
_←- The argument s != 1
_s
Generated by Doxygen
3.11 Numerics 213
riemann_zetaf()
float std::riemann_zetaf (
float __s) [inline]
Return the Riemann zeta function ζ(s) for float argument s.
See also
riemann_zetal()
See also
sph_bessel()
Template Parameters
Parameters
_←- The integral order n >= 0
_n
_←- The real argument x >= 0
_x
Exceptions
Generated by Doxygen
214
sph_besself()
float std::sph_besself (
unsigned int __n,
float __x) [inline]
Return the spherical Bessel function jn (x) of nonnegative order n and float argument x >= 0.
See also
sph_bessell()
See also
sph_legendre()
(2l + 1) (l − m)! m
Ylm (θ, ϕ) = (−1)m [ ]P (cos θ) expimϕ
4π (l + m)! l
Template Parameters
Parameters
__l The order __l >= 0
__m The degree __m >= 0 and __m <=
__l
__theta The radian polar angle argument
sph_legendref()
float std::sph_legendref (
unsigned int __l,
unsigned int __m,
float __theta) [inline]
Return the spherical Legendre function of nonnegative integral degree l and order m and float angle θ in radians.
Generated by Doxygen
3.11 Numerics 215
See also
sph_legendrel()
sph_neumann()
Template Parameters
Parameters
_←- The integral order n >= 0
_n
_←- The real argument __x >= 0
_x
Exceptions
sph_neumannf()
float std::sph_neumannf (
unsigned int __n,
float __x) [inline]
Return the spherical Neumann function of integral order n >= 0 and float argument x >= 0.
See also
Generated by Doxygen
216
sph_neumannl()
See also
Classes
• class std::gslice
• class std::gslice_array< _Tp >
• class std::indirect_array< _Tp >
• class std::mask_array< _Tp >
• class std::slice
• class std::slice_array< _Tp >
• class std::valarray< _Tp >
Functions
• std::gslice::gslice ()
• std::gslice::gslice (const gslice &)
• std::gslice::gslice (size_t __o, const valarray< size_t > &__l, const valarray< size_t > &__s)
• std::slice::slice ()
• std::slice::slice (size_t __o, size_t __d, size_t __s)
• std::valarray< _Tp >::valarray () noexcept
• template<class _Dom >
std::valarray< _Tp >::valarray (const _Expr< _Dom, _Tp > &__e)
• std::valarray< _Tp >::valarray (const _Tp &, size_t)
• template<typename _Tp >
std::valarray< _Tp >::valarray (const _Tp ∗__restrict__ __p, size_t __n)
• std::valarray< _Tp >::valarray (const gslice_array< _Tp > &)
• std::valarray< _Tp >::valarray (const indirect_array< _Tp > &)
• std::valarray< _Tp >::valarray (const mask_array< _Tp > &)
• std::valarray< _Tp >::valarray (const slice_array< _Tp > &)
• template<typename _Tp >
std::valarray< _Tp >::valarray (const valarray< _Tp > &__v)
Generated by Doxygen
3.11 Numerics 217
Generated by Doxygen
218
• valarray< _Tp > & std::valarray< _Tp >::operator= (valarray< _Tp > &&__v) noexcept
• gslice_array< _Tp > std::valarray< _Tp >::operator[ ] (const gslice &__s)
• _Expr< _GClos< _ValArray, _Tp >, _Tp > std::valarray< _Tp >::operator[ ] (const gslice &__s) const
• mask_array< _Tp > std::valarray< _Tp >::operator[ ] (const valarray< bool > &__m)
• valarray< _Tp > std::valarray< _Tp >::operator[ ] (const valarray< bool > &__m) const
• indirect_array< _Tp > std::valarray< _Tp >::operator[ ] (const valarray< size_t > &__i)
• _Expr< _IClos< _ValArray, _Tp >, _Tp > std::valarray< _Tp >::operator[ ] (const valarray< size_t > &__i) const
• _Tp & std::valarray< _Tp >::operator[ ] (size_t __i) noexcept
• const _Tp & std::valarray< _Tp >::operator[ ] (size_t) const noexcept
• slice_array< _Tp > std::valarray< _Tp >::operator[ ] (slice __s)
• _Expr< _SClos< _ValArray, _Tp >, _Tp > std::valarray< _Tp >::operator[ ] (slice __s) const
• void std::valarray< _Tp >::resize (size_t __size, _Tp __c=_Tp())
• valarray< _Tp > std::valarray< _Tp >::shift (int __n) const
• valarray< size_t > std::gslice::size () const
• size_t std::slice::size () const
• size_t std::valarray< _Tp >::size () const
• size_t std::gslice::start () const
• size_t std::slice::start () const
• valarray< size_t > std::gslice::stride () const
• size_t std::slice::stride () const
• _Tp std::valarray< _Tp >::sum () const
• void std::valarray< _Tp >::swap (valarray< _Tp > &__v) noexcept
• template<typename _Tp , size_t _Nm>
std::valarray (const _Tp(&)[_Nm], size_t) -> valarray< _Tp >
gslice() [1/3]
std::gslice::gslice () [inline]
Construct an empty slice.
gslice() [2/3]
std::gslice::gslice (
const gslice & __g) [inline]
Copy constructor.
gslice() [3/3]
std::gslice::gslice (
size_t __o,
const valarray< size_t > & __l,
const valarray< size_t > & __s) [inline]
Construct a slice.
Constructs a slice with as many dimensions as the length of the l and s arrays.
Generated by Doxygen
3.11 Numerics 219
Parameters
slice() [1/2]
std::slice::slice () [inline]
Construct an empty slice.
slice() [2/2]
std::slice::slice (
size_t __o,
size_t __d,
size_t __s) [inline]
Construct a slice.
Parameters
valarray() [1/8]
valarray() [2/8]
valarray() [3/8]
Generated by Doxygen
220
valarray() [4/8]
valarray() [5/8]
valarray() [6/8]
valarray() [7/8]
valarray() [8/8]
∼gslice()
std::gslice::∼gslice () [inline]
Destructor.
apply() [1/2]
Parameters
Generated by Doxygen
3.11 Numerics 221
Returns
apply() [2/2]
Parameters
Returns
begin() [1/2]
Parameters
__va valarray.
begin() [2/2]
Parameters
__va valarray.
Referenced by std::cbegin(), std::list< _Tp, _Alloc >::crend(), std::list< _Tp, _Alloc >::front(), std::list< _Tp, _Alloc >::front(),
std::vector< _Tp, _Alloc >::insert(), std::list< _Tp, _Alloc >::merge(), std::list< _Tp, _Alloc >::merge(), std::list< _Tp, _Alloc >::pop_fron
std::list< _Tp, _Alloc >::push_front(), std::list< _Tp, _Alloc >::remove(), std::list< _Tp, _Alloc >::remove_if(),
std::list< _Tp, _Alloc >::rend(), std::list< _Tp, _Alloc >::rend(), std::list< _Tp, _Alloc >::size(), std::list< _Tp, _Alloc >::sort(),
std::list< _Tp, _Alloc >::sort(), std::list< _Tp, _Alloc >::unique(), and std::list< _Tp, _Alloc >::unique().
Generated by Doxygen
222
cshift()
Parameters
Returns
end() [1/2]
Parameters
__va valarray.
end() [2/2]
Parameters
__va valarray.
Referenced by std::list< _Tp, _Alloc >::back(), std::list< _Tp, _Alloc >::back(), std::cend(), std::list< _Tp, _Alloc >::crbegin(),
std::vector< _Tp, _Alloc >::insert(), std::list< _Tp, _Alloc >::merge(), std::list< _Tp, _Alloc >::merge(), std::list< _Tp, _Alloc >::push_ba
std::list< _Tp, _Alloc >::rbegin(), std::list< _Tp, _Alloc >::rbegin(), std::list< _Tp, _Alloc >::remove(), std::list< _Tp, _Alloc >::remove_if
std::forward_list< _Tp, _Alloc >::resize(), std::forward_list< _Tp, _Alloc >::resize(), std::list< _Tp, _Alloc >::resize(),
std::list< _Tp, _Alloc >::resize(), std::list< _Tp, _Alloc >::size(), std::list< _Tp, _Alloc >::sort(), std::list< _Tp, _Alloc >::sort(),
std::list< _Tp, _Alloc >::unique(), and std::list< _Tp, _Alloc >::unique().
max()
Generated by Doxygen
3.11 Numerics 223
min()
operator=() [1/16]
operator=() [2/16]
operator=() [3/16]
operator=() [4/16]
operator=() [5/16]
operator=() [6/16]
operator=() [7/16]
Generated by Doxygen
224
operator=() [8/16]
operator=() [9/16]
Parameters
operator=() [10/16]
Parameters
operator=() [11/16]
Parameters
Generated by Doxygen
3.11 Numerics 225
operator=() [12/16]
Parameters
operator=() [13/16]
Parameters
operator=() [14/16]
Parameters
operator=() [15/16]
Parameters
Generated by Doxygen
226
operator=() [16/16]
Parameters
operator[]() [1/9]
gslice.
Parameters
_←- The source gslice.
_s
Returns
operator[]() [2/9]
gslice.
Parameters
_←- The source slice.
_s
Returns
Generated by Doxygen
3.11 Numerics 227
operator[]() [3/9]
Parameters
_←- The valarray bitmask.
_m
Returns
operator[]() [4/9]
Parameters
_←- The valarray bitmask.
_m
Returns
operator[]() [5/9]
Generated by Doxygen
228
Parameters
←- The valarray element index list.
_←-
←-
_←-
i
Returns
operator[]() [6/9]
Parameters
←- The valarray element index list.
_←-
←-
_←-
i
Returns
operator[]() [7/9]
Parameters
Returns
Generated by Doxygen
3.11 Numerics 229
operator[]() [8/9]
See also
slice.
Parameters
_←- The source slice.
_s
Returns
operator[]() [9/9]
See also
slice.
Parameters
_←- The source slice.
_s
Returns
resize()
Generated by Doxygen
230
Parameters
__size New array size.
__c New value for all elements.
shift()
Parameters
Returns
size() [1/3]
size() [2/3]
size() [3/3]
start() [1/2]
start() [2/2]
Generated by Doxygen
3.11 Numerics 231
stride() [1/2]
stride() [2/2]
sum()
swap()
Topics
Functions
Generated by Doxygen
232
generate_canonical()
Bernoulli Distributions
Normal Distributions
Sampling Distributions
Uniform Distributions
Topics
• Bernoulli Distributions
• Normal Distributions
• Poisson Distributions
• Sampling Distributions
• Uniform Distributions
Generated by Doxygen
3.11 Numerics 233
Classes
• class std::bernoulli_distribution
• class std::binomial_distribution< _IntType >
• class std::geometric_distribution< _IntType >
• class std::negative_binomial_distribution< _IntType >
Functions
Detailed Description
Function Documentation
operator<<() [1/2]
Parameters
__os An output stream.
__x A bernoulli_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
operator<<() [2/2]
Parameters
__os An output stream.
__x A geometric_distribution random number distribution.
Generated by Doxygen
234
Returns
The output stream with the state of __x inserted or in an error state.
operator>>() [1/2]
Parameters
_←- An input stream.
_is
_←- A bernoulli_distribution random number generator engine.
_x
Returns
References std::bernoulli_distribution::param().
operator>>() [2/2]
Parameters
_←- An input stream.
_is
_←- A geometric_distribution random number generator engine.
_x
Generated by Doxygen
3.11 Numerics 235
Returns
Classes
Functions
Detailed Description
Function Documentation
operator<<()
Parameters
__os An output stream.
__x A cauchy_distribution random number distribution.
Generated by Doxygen
236
Returns
The output stream with the state of __x inserted or in an error state.
References std::tan().
operator>>()
Parameters
_←- An input stream.
_is
_←- A cauchy_distribution random number generator engine.
_x
Returns
Classes
Functions
Generated by Doxygen
3.11 Numerics 237
Detailed Description
Function Documentation
operator<<() [1/3]
Parameters
__os An output stream.
__x A exponential_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
References std::log().
operator<<() [2/3]
Parameters
__os An output stream.
__x A extreme_value_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
References std::log().
Generated by Doxygen
238
operator<<() [3/3]
Parameters
__os An output stream.
__x A weibull_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
operator>>() [1/3]
Parameters
_←- An input stream.
_is
_←- A exponential_distribution random number generator engine.
_x
Returns
operator>>() [2/3]
Parameters
_←- An input stream.
_is
_←- A extreme_value_distribution random number generator engine.
_x
Generated by Doxygen
3.11 Numerics 239
Returns
operator>>() [3/3]
Parameters
_←- An input stream.
_is
_←- A weibull_distribution random number generator engine.
_x
Returns
Classes
Generated by Doxygen
240
Detailed Description
Classes
Functions
Detailed Description
Function Documentation
operator<<() [1/2]
Parameters
__os An output stream.
__x A uniform_int_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
References std::ios_base::flags().
Generated by Doxygen
3.11 Numerics 241
operator<<() [2/2]
Parameters
__os An output stream.
__x A uniform_real_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
operator>>() [1/2]
Parameters
_←- An input stream.
_is
_←- A uniform_int_distribution random number generator engine.
_x
Returns
operator>>() [2/2]
Parameters
_←- An input stream.
_is
_←- A uniform_real_distribution random number generator engine.
_x
Returns
Generated by Doxygen
242
Classes
Typedefs
Functions
• template<typename _RandomNumberEngine , size_t __w, typename _UIntType , typename _CharT , typename _Traits >
std::basic_ostream< _CharT, _Traits > & std::operator<< (std::basic_ostream< _CharT, _Traits > &__os, const
std::independent_bits_engine< _RandomNumberEngine, __w, _UIntType > &__x)
These classes define objects which provide random or pseudorandom numbers, either from a discrete or a continuous
interval. The random number generator supplied as a part of this library are all uniform random number generators
which provide a sequence of random number uniformly distributed over their range.
A number generator is a function object with an operator() that takes zero arguments and returns a number.
A compliant random number generator must satisfy the following requirements.
To be documented.
Generated by Doxygen
3.11 Numerics 243
minstd_rand
minstd_rand0
mt19937
typedef mersenne_twister_engine< uint_fast32_t, 32, 624, 397, 31, 0x9908b0dfUL, 11, 0xffffffffUL,
7, 0x9d2c5680UL, 15, 0xefc60000UL, 18, 1812433253UL> std::mt19937
The classic Mersenne Twister.
Reference: M. Matsumoto and T. Nishimura, Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudo-
Random Number Generator, ACM Transactions on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp
3-30.
mt19937_64
operator<<()
Parameters
__os An output stream.
__x A independent_bits_engine random number generator engine.
Generated by Doxygen
244
Returns
The output stream with the state of __x inserted or in an error state.
Classes
• class std::seed_seq
Functions
Generated by Doxygen
3.11 Numerics 245
Generated by Doxygen
246
assoc_laguerre()
assoc_legendre()
beta()
Generated by Doxygen
3.11 Numerics 247
comp_ellint_1()
comp_ellint_2()
comp_ellint_3()
cyl_bessel_i()
cyl_bessel_j()
cyl_bessel_k()
cyl_neumann()
Generated by Doxygen
248
ellint_1()
ellint_2()
ellint_3()
expint()
hermite()
laguerre()
legendre()
Generated by Doxygen
3.12 Regular Expressions 249
riemann_zeta()
sph_bessel()
sph_legendre()
sph_neumann()
std::regex_error Exceptions
Regular Expressions
Base and Implementation
Classes
Topics
Namespaces
• namespace std::regex_constants
Generated by Doxygen
250
Classes
Typedefs
Functions
Generated by Doxygen
3.12 Regular Expressions 251
Generated by Doxygen
252
basic_regex< _Ch_type, _Rx_traits > &__e, const _Ch_type ∗__fmt, regex_constants::match_flag_type __←-
flags=regex_constants::match_default)
• template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa >
basic_string< _Ch_type > std::regex_replace (const _Ch_type ∗__s, const basic_regex< _Ch_type, _Rx←-
_traits > &__e, const basic_string< _Ch_type, _St, _Sa > &__fmt, regex_constants::match_flag_type __←-
flags=regex_constants::match_default)
• template<typename _Rx_traits , typename _Ch_type >
basic_string< _Ch_type > std::regex_replace (const _Ch_type ∗__s, const basic_regex< _Ch_type, _Rx_traits
> &__e, const _Ch_type ∗__fmt, regex_constants::match_flag_type __flags=regex_constants::match_default)
Since
C++11
cregex_token_iterator
csub_match
Generated by Doxygen
3.12 Regular Expressions 253
regex
sregex_token_iterator
ssub_match
wcregex_token_iterator
wcsub_match
wregex
wsregex_token_iterator
wssub_match
operator() [1/4]
Parameters
__lhs A regular expression submatch.
__rhs A string.
Generated by Doxygen
254
Returns
A value indicating whether __lhs is less than, equal to, greater than, or incomparable with __rhs.
operator() [2/4]
Parameters
__lhs A regular expression submatch.
__rhs A character.
Returns
A value indicating whether __lhs is less than, equal to, greater than, or incomparable with __rhs.
References std::__addressof().
operator() [3/4]
Parameters
__lhs A regular expression submatch.
__rhs A null-terminated string.
Returns
A value indicating whether __lhs is less than, equal to, greater than, or incomparable with __rhs.
operator() [4/4]
Parameters
__lhs First regular expression submatch.
__rhs Second regular expression submatch.
Generated by Doxygen
3.12 Regular Expressions 255
Returns
A value indicating whether __lhs is less than, equal to, greater than, or incomparable with __rhs.
operator<<()
Parameters
__os The output stream.
__m A submatch string.
Returns
operator==() [1/5]
Returns
true if the two objects refer to the same match, false otherwise.
References std::match_results< _Bi_iter, _Alloc >::begin(), std::match_results< _Bi_iter, _Alloc >::empty(), std::match_results< _Bi_iter
std::match_results< _Bi_iter, _Alloc >::prefix(), std::match_results< _Bi_iter, _Alloc >::ready(), std::match_results< _Bi_iter, _Alloc >::s
and std::match_results< _Bi_iter, _Alloc >::suffix().
operator==() [2/5]
Parameters
__lhs A regular expression submatch.
__rhs A string.
Returns
Generated by Doxygen
256
operator==() [3/5]
Parameters
__lhs A regular expression submatch.
__rhs A character.
Returns
References std::__addressof().
operator==() [4/5]
Parameters
__lhs A regular expression submatch.
__rhs A null-terminated string.
Returns
operator==() [5/5]
Parameters
__lhs First regular expression submatch.
__rhs Second regular expression submatch.
Returns
Generated by Doxygen
3.12 Regular Expressions 257
regex_match() [1/7]
Parameters
Return values
true A match exists.
false Otherwise.
Exceptions
References std::regex_match().
regex_match() [2/7]
Parameters
Return values
true A match exists.
Generated by Doxygen
258
false Otherwise.
Generated by Doxygen
3.12 Regular Expressions 259
Exceptions
regex_match() [3/7]
Parameters
Return values
true A match exists.
false Otherwise.
Exceptions
References std::regex_match().
regex_match() [4/7]
Parameters
Generated by Doxygen
260
Parameters
_←- The regular expression.
_re
_←- Controls how the regular expression is matched.
_f
Return values
true A match exists.
false Otherwise.
Exceptions
References std::regex_match().
regex_match() [5/7]
regex_match() [6/7]
Parameters
__s The string to match.
__m The match results.
__re The regular expression.
__flags Controls how the regular expression is matched.
Generated by Doxygen
3.12 Regular Expressions 261
Return values
true A match exists.
false Otherwise.
Exceptions
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end(),
and std::regex_match().
regex_match() [7/7]
Parameters
__s [IN] The string to match.
__re [IN] The regular expression.
__flags [IN] Controls how the regular expression is matched.
Return values
true A match exists.
false Otherwise.
Exceptions
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end(),
and std::regex_match().
regex_replace() [1/6]
Generated by Doxygen
262
Parameters
Returns
__out
Exceptions
regex_replace() [2/6]
Parameters
Returns
__out
Exceptions
References std::basic_string< _CharT, _Traits, _Alloc >::c_str(), and std::basic_string< _CharT, _Traits, _Alloc >::length().
Referenced by std::regex_replace(), std::regex_replace(), std::regex_replace(), and std::regex_replace().
Generated by Doxygen
3.12 Regular Expressions 263
regex_replace() [3/6]
Parameters
Returns
Exceptions
regex_replace() [4/6]
Parameters
Returns
Generated by Doxygen
264
Exceptions
regex_replace() [5/6]
Parameters
__s [IN] The string to search and replace.
__e [IN] The regular expression to search for.
__fmt [IN] The format C-string.
__flags [IN] Search and replace policy flags.
Returns
Exceptions
References std::back_inserter(), std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end()
and std::regex_replace().
regex_replace() [6/6]
template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa , typename _Fst ,
typename _Fsa >
basic_string< _Ch_type, _St, _Sa > std::regex_replace (
const basic_string< _Ch_type, _St, _Sa > & __s,
const basic_regex< _Ch_type, _Rx_traits > & __e,
const basic_string< _Ch_type, _Fst, _Fsa > & __fmt,
regex_constants::match_flag_type __flags = regex_constants::match_default) [inline]
Search for a regular expression within a string for multiple times, and replace the matched parts through filling a format
string.
Parameters
__s [IN] The string to search and replace.
__e [IN] The regular expression to search for.
__fmt [IN] The format string.
Generated by Doxygen
3.12 Regular Expressions 265
Returns
Exceptions
References std::back_inserter(), std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end()
and std::regex_replace().
regex_search() [1/7]
Parameters
Return values
Exceptions
References std::regex_search().
regex_search() [2/7]
Generated by Doxygen
266
Parameters
Return values
Exceptions
Referenced by std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator(), std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits
std::regex_search(), std::regex_search(), std::regex_search(), std::regex_search(), and std::regex_search().
regex_search() [3/7]
Parameters
Return values
Exceptions
References std::regex_search().
Generated by Doxygen
3.12 Regular Expressions 267
regex_search() [4/7]
Parameters
Return values
Exceptions
References std::regex_search().
regex_search() [5/7]
regex_search() [6/7]
Generated by Doxygen
268
Parameters
Return values
Exceptions
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end(),
and std::regex_search().
regex_search() [7/7]
Parameters
__s [IN] The string to search.
__e [IN] The regular expression to search for.
__flags [IN] Search policy flags.
Return values
Generated by Doxygen
3.12 Regular Expressions 269
Exceptions
References std::regex_search().
swap() [1/2]
Parameters
__lhs First regular expression.
__rhs Second regular expression.
swap() [2/2]
Parameters
__lhs A match result.
__rhs A match result.
Classes
Generated by Doxygen
270
Typedefs
Enumerations
Variables
_Opcode
3.13 Strings
Collaboration diagram for Strings:
std::experimental::
fundamentals_v1::basic
_string_view Library Fundamentals TS
std::basic_string
Strings std::basic_string_view
std::experimental::
fundamentals_v1::basic
_string_view
Sequences
Generated by Doxygen
3.14 Technical Specifications 271
Classes
Typedefs
string
u16string
u32string
wstring
Filesystem TS
Parallelism TS
Generated by Doxygen
272
Topics
• Filesystem TS
• Library Fundamentals TS
• Parallelism TS
3.14.2 Filesystem TS
Files
• file filesystem
Classes
• class std::experimental::filesystem::v1::filesystem_error
• class std::experimental::filesystem::v1::path::iterator
• class std::experimental::filesystem::v1::path
• struct std::experimental::filesystem::v1::space_info
Typedefs
• using std::experimental::filesystem::file_time_type
Enumerations
Generated by Doxygen
3.14 Technical Specifications 273
Functions
Generated by Doxygen
274
Generated by Doxygen
3.14 Technical Specifications 275
Generated by Doxygen
276
Generated by Doxygen
3.14 Technical Specifications 277
Utilities for performing operations on file systems and their components, such as paths, regular files, and directories.
ISO/IEC TS 18822:2015 C++ File System Technical Specification
Since
C++11
Remarks
file_time_type
using std::experimental::filesystem::v1::file_time_type
The type used for file timestamps.
copy_options
directory_options
file_type
perms
Generated by Doxygen
278
Type-safe container
of any type
Detection idiom
Optional values
std::experimental::
fundamentals_v1::basic Const-propagating wrapper
_string_view
Sequences
std::experimental::
fundamentals_v1::basic
_string_view
Strings
Topics
Files
• file algorithm
• file any
• file array
• file chrono
• file deque
• file forward_list
• file functional
• file iterator
• file list
• file map
• file memory
• file memory_resource
• file numeric
• file optional
• file propagate_const
• file random
Generated by Doxygen
3.14 Technical Specifications 279
• file ratio
• file regex
• file set
• file string
• file string_view
• file system_error
• file tuple
• file type_traits
• file unordered_map
• file unordered_set
• file utility
• file vector
Classes
Components defined by the C++ Extensions for Library Fundamentals Technical Specification, versions 1 and 2.
Functions
Array creation functions as described in N4529, Working Draft, C++ Extensions for Library Fundamentals, Version 2
Generated by Doxygen
280
make_array()
to_array()
Classes
Functions
Generated by Doxygen
3.14 Technical Specifications 281
A const-propagating wrapper that propagates const to pointer-like members, as described in n4388 "A Proposal to Add
a Const-Propagating Wrapper to the Standard Library".
Generated by Doxygen
282
• #define __cpp_lib_experimental_detect
• template<typename... >
using std::experimental::void_t
• template<typename _Default , template< typename... > class _Op, typename... _Args>
using std::experimental::detected_or
• template<typename _Default , template< typename... > class _Op, typename... _Args>
using std::experimental::detected_or_t
• template<template< typename... > class _Op, typename... _Args>
using std::experimental::detected_t
• template<template< typename... > class _Op, typename... _Args>
using std::experimental::is_detected
• template<typename _Expected , template< typename... > class _Op, typename... _Args>
using std::experimental::is_detected_exact
• template<typename _To , template< typename... > class _Op, typename... _Args>
using std::experimental::is_detected_convertible
• template<template< typename... > class _Op, typename... _Args>
constexpr bool std::experimental::is_detected_v
• template<typename _Expected , template< typename... > class _Op, typename... _Args>
constexpr bool std::experimental::is_detected_exact_v
• template<typename _To , template< typename... > class _Op, typename... _Args>
constexpr bool std::experimental::is_detected_convertible_v
__cpp_lib_experimental_detect
#define __cpp_lib_experimental_detect
A metafunction that always yields void, used for detecting valid types.
detected_or
Generated by Doxygen
3.14 Technical Specifications 283
detected_or_t
detected_t
is_detected
is_detected_convertible
is_detected_exact
void_t
template<typename... >
using std::experimental::fundamentals_v2::void_t
A metafunction that always yields void, used for detecting valid types.
is_detected_convertible_v
is_detected_exact_v
is_detected_v
Generated by Doxygen
284
• #define __cpp_lib_experimental_logical_traits
• template<typename... _Bn>
constexpr bool std::experimental::conjunction_v
• template<typename... _Bn>
constexpr bool std::experimental::disjunction_v
• template<typename _Pp >
constexpr bool std::experimental::negation_v
std::experimental::
fundamentals_v1::bad
_optional_access
Library Fundamentals TS Optional values Exceptions
Classes
• class std::experimental::fundamentals_v1::bad_optional_access
• struct std::experimental::fundamentals_v1::in_place_t
• struct std::experimental::fundamentals_v1::nullopt_t
• class std::experimental::fundamentals_v1::optional< _Tp >
Macros
• #define __cpp_lib_experimental_optional
Variables
Generated by Doxygen
3.14 Technical Specifications 285
Class template for optional values and surrounding facilities, as described in n3793 "A proposal to add a utility class to
represent optional objects (Revision 5)".
in_place
nullopt
std::experimental::
fundamentals_v1::bad
Type-safe container _any_cast
Library Fundamentals TS Exceptions
of any type
Classes
• class std::experimental::fundamentals_v1::any
• class std::experimental::fundamentals_v1::bad_any_cast
Macros
• #define __cpp_lib_experimental_any
Functions
Generated by Doxygen
286
A type-safe container for single values of value types, as described in n3804 "Any Library Proposal (Revision 3)".
any_cast() [1/5]
Template Parameters
Parameters
__any The object to access.
Returns
Exceptions
any_cast() [2/5]
Template Parameters
Parameters
__any The object to access.
Returns
Generated by Doxygen
3.14 Technical Specifications 287
Exceptions
any_cast() [3/5]
Template Parameters
Parameters
__any A pointer to the object to access.
Returns
The address of the contained object if __any != nullptr && __any.type() == typeid(_←-
ValueType) , otherwise a null pointer.
any_cast() [4/5]
Template Parameters
Parameters
__any The object to access.
Returns
Exceptions
Generated by Doxygen
288
any_cast() [5/5]
Template Parameters
Parameters
__any A pointer to the object to access.
Returns
The address of the contained object if __any != nullptr && __any.type() == typeid(_←-
ValueType) , otherwise a null pointer.
swap()
void std::experimental::fundamentals_v1::swap (
any & __x,
any & __y) [inline], [noexcept]
Exchange the states of two any objects.
• #define __cpp_lib_experimental_type_trait_variable_templates
• template<typename _Tp >
constexpr bool std::experimental::is_void_v
• template<typename _Tp >
constexpr bool std::experimental::is_null_pointer_v
• template<typename _Tp >
constexpr bool std::experimental::is_integral_v
• template<typename _Tp >
constexpr bool std::experimental::is_floating_point_v
• template<typename _Tp >
constexpr bool std::experimental::is_array_v
Generated by Doxygen
3.14 Technical Specifications 289
Generated by Doxygen
290
Generated by Doxygen
3.14 Technical Specifications 291
See also
variable_templates
3.14.4 Parallelism TS
Topics
Generated by Doxygen
292
Macros
• #define __cpp_lib_experimental_parallel_simd
C++17
3.15 Utilities
Collaboration diagram for Utilities:
Time
Function Objects
Utilities Memory
Metaprogramming
Rational Arithmetic
Topics
• Function Objects
Generated by Doxygen
3.15 Utilities 293
• Memory
• Metaprogramming
• Rational Arithmetic
• Time
Classes
Functions
Generated by Doxygen
294
Generated by Doxygen
3.15 Utilities 295
• template<typename... _Elements>
constexpr tuple< _Elements &... > std::tie (_Elements &... __args) noexcept
• template<typename... _UTypes>
std::tuple (_UTypes...) -> tuple< _UTypes... >
• template<typename _Alloc , typename... _UTypes>
std::tuple (allocator_arg_t, _Alloc, _UTypes...) -> tuple< _UTypes... >
• template<typename _Alloc , typename _T1 , typename _T2 >
std::tuple (allocator_arg_t, _Alloc, pair< _T1, _T2 >) -> tuple< _T1, _T2 >
• template<typename _Alloc , typename... _UTypes>
std::tuple (allocator_arg_t, _Alloc, tuple< _UTypes... >) -> tuple< _UTypes... >
• template<typename _T1 , typename _T2 >
std::tuple (pair< _T1, _T2 >) -> tuple< _T1, _T2 >
• template<typename... _Tpls, typename = typename enable_if<__and_<__is_tuple_like<_Tpls>...>::value>::type>
constexpr auto std::tuple_cat (_Tpls &&... __tpls) -> typename __tuple_cat_result< _Tpls... >::__type
Variables
Basic function and class templates used with the rest of the library. Includes pair, swap, forward/move helpers, declval,
integer_sequence.
pair() [1/2]
pair() [2/2]
Generated by Doxygen
296
Parameters
The elements of each tuple will be used as the constructor arguments for the data members of the pair.
__addressof()
__invoke()
addressof()
Parameters
Returns
Since
C++11
References std::__addressof().
Generated by Doxygen
3.15 Utilities 297
declval()
Since
C++11
forward() [1/2]
Since
C++11
forward() [2/2]
Since
C++11
Generated by Doxygen
298
std::map< _Key, _Tp, _Compare, _Alloc >::insert(), std::map< _Key, _Tp, _Compare, _Alloc >::insert(), std::multimap< _Key, _Tp, _Com
std::multimap< _Key, _Tp, _Compare, _Alloc >::insert(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(),
std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >::insert
std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >::insert(), std::map< _Key, _Tp, _Compare, _Alloc >::insert_or_assign(),
std::map< _Key, _Tp, _Compare, _Alloc >::insert_or_assign(), std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert_or_assi
std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert_or_assign(), std::make_pair(), std::shared_ptr< _Tp >::make_shared(),
std::unique_ptr< _Tp, _Dp >::make_unique(), std::function< _Res(_ArgTypes...)>::operator()(), std::move_only_function< _Res(_ArgTy
std::function< _Res(_ArgTypes...)>::operator=(), std::move_only_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>
std::unique_ptr< _Tp, _Dp >::operator=(), std::unique_ptr< _Tp[ ], _Dp >::operator=(), std::sample(), std::throw_with_nested(),
std::map< _Key, _Tp, _Compare, _Alloc >::try_emplace(), std::map< _Key, _Tp, _Compare, _Alloc >::try_emplace(),
std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::try_emplace(), and std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >:
forward_as_tuple()
template<typename... _Elements>
tuple< _Elements &&... > std::forward_as_tuple (
_Elements &&... __args) [constexpr], [noexcept]
Create a tuple of lvalue or rvalue references to the arguments.
Referenced by std::map< _Key, _Tp, _Compare, _Alloc >::insert_or_assign(), std::map< _Key, _Tp, _Compare, _Alloc >::insert_or_assi
std::map< _Key, _Tp, _Compare, _Alloc >::try_emplace(), and std::map< _Key, _Tp, _Compare, _Alloc >::try_emplace().
get() [1/4]
get() [2/4]
get() [3/4]
get() [4/4]
make_pair()
Generated by Doxygen
3.15 Utilities 299
Parameters
Returns
The C++98 standard says the objects are passed by reference-to-const, but C++03 says they are passed by value (this
was LWG issue #181).
Since C++11 they have been passed by forwarding reference and then forwarded to the new members of the pair. To
create a pair with a member of reference type, pass a reference_wrapper to this function.
References std::forward().
Referenced by __gnu_parallel::__find_template(), std::__gen_two_uniform_ints(), __gnu_debug::__get_distance(),
__gnu_parallel::__parallel_merge_advance(), __gnu_parallel::__parallel_sort_qsb(), __gnu_parallel::__qsb_local_sort_with_helping(),
__gnu_parallel::__adjacent_find_selector::_M_sequential_algorithm(), __gnu_parallel::__find_first_of_selector< _FIterator >::_M_seque
__gnu_parallel::__find_if_selector::_M_sequential_algorithm(), __gnu_parallel::multiseq_partition(), __gnu_parallel::multiseq_selection(),
__gnu_parallel::parallel_multiway_merge(), __gnu_parallel::parallel_sort_mwms_pu(), and __gnu_pbds::detail::pat_trie_base::_Node_cite
make_tuple()
template<typename... _Elements>
tuple< typename __decay_and_strip< _Elements >::__type... > std::make_tuple (
_Elements &&... __args) [constexpr]
Create a tuple containing copies of the arguments.
move()
Parameters
Returns
Generated by Doxygen
300
Since
C++11
move_if_noexcept()
Parameters
Returns
Same as std::move unless the type's move constructor could throw and the type is copyable, in which case an lvalue-
reference is returned instead.
Since
C++11
References std::move().
operator()
Generated by Doxygen
3.15 Utilities 301
operator==()
swap() [1/4]
Note
This std::swap overload is not declared in C++03 mode, which has performance implications, e.g. see https←-
://gcc.gnu.org/PR38466
swap() [2/4]
Parameters
Returns
Nothing.
swap() [3/4]
Generated by Doxygen
302
_Tp(&) __a[_Nm],
_Tp(&) __b[_Nm]) [inline], [constexpr], [noexcept]
Swap the contents of two arrays.
swap() [4/4]
template<typename... _Elements>
enable_if< __and_< __is_swappable< _Elements >... >::value >::type std::swap (
tuple< _Elements... > & __x,
tuple< _Elements... > & __y) [inline], [constexpr], [delete], [noexcept]
Exchange the values of two tuples.
Exchange the values of two const tuples (if const elements can be swapped)
tie()
template<typename... _Elements>
tuple< _Elements &... > std::tie (
_Elements &... __args) [constexpr], [noexcept]
Return a tuple of lvalue references bound to the arguments.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
tuple_cat()
piecewise_construct
Generated by Doxygen
3.15 Utilities 303
Arithmetic Function
Object Classes
Binder Classes
Comparison Classes
Hashes
Negators
Topics
Classes
Generated by Doxygen
304
Functions
Function objects, or functors, are objects with an operator() defined and accessible. They can be passed as
arguments to algorithm templates and used in place of a function pointer. Not only is the resulting expressiveness of
the library increased, but the generated code can be more efficient than what you might write by hand. When we refer
to functors, then, generally we include function pointers in the description as well.
Often, functors are only created as temporaries passed to algorithm calls, rather than being created as named variables.
Two examples taken from the standard itself follow. To perform a by-element addition of two vectors a and b containing
double, and put the result in a, use
transform (a.begin(), a.end(), b.begin(), a.begin(), plus<double>());
To negate every element in a, use
transform(a.begin(), a.end(), a.begin(), negate<double>());
The addition and negation functions will usually be inlined directly.
An adaptable function object is one which provides nested typedefs result_type and either argument_type
(for a unary function) or first_argument_type and second_argument_type (for a binary function). Those
typedefs are used by function object adaptors such as bind2nd. The standard library provides two class templates,
unary_function and binary_function, which define those typedefs and so can be used as base classes of
adaptable function objects.
Since C++11 the use of function object adaptors has been superseded by more powerful tools such as lambda ex-
pressions, function<>, and more powerful type deduction (using auto and decltype). The helpers for defining
adaptable function objects are deprecated since C++11, and no longer part of the standard library since C++17. How-
ever, they are still defined and used by libstdc++ after C++17, as a conforming extension.
mem_fn()
Generated by Doxygen
3.15 Utilities 305
Since
C++11
Classes
Functions
The advantage of function objects over pointers to functions is that the objects in the standard library declare nested
typedefs describing their argument and result types with uniform names (e.g., result_type from the base classes
unary_function and binary_function). Sometimes those typedefs are required, not just optional.
Adaptors are provided to turn pointers to unary (single-argument) and binary (double-argument) functions into function
objects. The long-winded functor pointer_to_unary_function is constructed with a function pointer f, and
its operator() called with argument x returns f(x). The functor pointer_to_binary_function does the
same thing, but with a double-argument f and operator().
The function ptr_fun takes a pointer-to-function f and constructs an instance of the appropriate functor.
ptr_fun() [1/2]
Generated by Doxygen
306
ptr_fun() [2/2]
Classes
Functions
There are a total of 8 = 2∧ 3 function objects in this family. (1) Member functions taking no arguments vs member
functions taking one argument. (2) Call through pointer vs call through reference. (3) Const vs non-const member
function.
All of this complexity is in the function objects themselves. You can ignore it by using the helper function mem_fun and
mem_fun_ref, which create whichever type of adaptor is appropriate.
Deprecated Deprecated in C++11, no longer in the standard since C++17. Use mem_fn instead.
Generated by Doxygen
3.15 Utilities 307
Arithmetic Function
Function Objects
Object Classes
Classes
The library provides function objects for basic arithmetic operations. See the documentation for function objects for
examples of their use.
Namespaces
• namespace std::placeholders
Generated by Doxygen
308
Classes
Functions
Binders turn functions/functors with two arguments into functors with a single argument, storing an argument to be
applied later. For example, a variable B of type binder1st is constructed from a functor f and an argument x. Later,
B's operator() is called with a single argument y. The return value is the value of f(x,y). B can be called with
various arguments (y1, y2, ...) and will in turn call f(x,y1), f(x,y2), ...
The function bind1st is provided to save some typing. It takes the function and an argument as parameters, and
returns an instance of binder1st.
The type binder2nd and its creator function bind2nd do the same thing, but the stored argument is passed
as the second parameter instead of the first, e.g., bind2nd(std::minus<float>(),1.3) will create a functor whose
operator() accepts a floating-point number, subtracts 1.3 from it, and returns the result. (If bind1st had been
used, the functor would perform 1.3 - x instead.
Creator-wrapper functions like bind1st are intended to be used in calling algorithms. Their return values will be
temporary objects. (The goal is to not require you to type names like std::binder1st<std::plus<int>> for
declaring a variable to hold the return value from bind1st(std::plus<int>(),5).
These become more useful when combined with the composition functions.
These functions are deprecated in C++11 and can be replaced by std::bind (or std::tr1::bind) which
is more powerful and flexible, supporting functions with any number of arguments. Uses of bind1st can be
replaced by std::bind(f, x, std::placeholders::_1) and bind2nd by std::bind(f, std←-
::placeholders::_1, x).
Generated by Doxygen
3.15 Utilities 309
bind() [1/2]
Since
C++11
bind() [2/2]
Since
C++11
bind1st()
bind2nd()
Boolean Operations
Function Objects
Classes
Generated by Doxygen
310
Classes
The library provides function objects for the logical operations: &&, ||, and !.
Classes
The library provides six wrapper functors for all the basic comparisons in C++, like <.
Generated by Doxygen
3.15 Utilities 311
3.15.4.9 Hashes
Classes
Macros
• #define _Cxx_hashtable_define_trivial_hash(_Tp)
Variables
Generated by Doxygen
312
3.15.4.10 Negators
Classes
Functions
The function templates not1 and not2 are function object adaptors, which each take a predicate functor and wrap it in
an instance of unary_negate or binary_negate, respectively. Those classes are functors whose operator()
evaluates the wrapped predicate function and then returns the negation of the result.
For example, given a vector of integers and a trivial predicate,
struct IntGreaterThanThree
: public std::unary_function<int, bool>
{
bool operator() (int x) const { return x > 3; }
};
not1()
not2()
Generated by Doxygen
3.15 Utilities 313
3.15.5 Memory
Allocators
Polymorphic memory
resources
Utilities Memory
Pointer Abstractions
Topics
• Allocators
• Pointer Abstractions
• Pointer Safety and Garbage Collection
• Polymorphic memory resources
Files
• file memory
Functions
• void ∗ std::align (size_t __align, size_t __size, void ∗&__ptr, size_t &__space) noexcept
• template<size_t _Align, class _Tp >
constexpr _Tp ∗ std::assume_aligned (_Tp ∗__ptr) noexcept
• template<typename _InputIterator , typename _ForwardIterator >
_ForwardIterator std::uninitialized_copy (_InputIterator __first, _InputIterator __last, _ForwardIterator __result)
• template<typename _InputIterator , typename _Size , typename _ForwardIterator >
_ForwardIterator std::uninitialized_copy_n (_InputIterator __first, _Size __n, _ForwardIterator __result)
• template<typename _ForwardIterator >
void std::uninitialized_default_construct (_ForwardIterator __first, _ForwardIterator __last)
• template<typename _ForwardIterator , typename _Size >
_ForwardIterator std::uninitialized_default_construct_n (_ForwardIterator __first, _Size __count)
• template<typename _ForwardIterator , typename _Tp >
void std::uninitialized_fill (_ForwardIterator __first, _ForwardIterator __last, const _Tp &__x)
• template<typename _ForwardIterator , typename _Size , typename _Tp >
_ForwardIterator std::uninitialized_fill_n (_ForwardIterator __first, _Size __n, const _Tp &__x)
Generated by Doxygen
314
align()
void ∗ std::align (
size_t __align,
size_t __size,
void ∗& __ptr,
size_t & __space) [inline], [noexcept]
Fit aligned storage in buffer.
This function tries to fit __size bytes of storage with alignment __align into the buffer __ptr of size __space bytes. If such
a buffer fits then __ptr is changed to point to the first byte of the aligned storage and __space is reduced by the bytes
used for alignment.
C++11 20.6.5 [ptr.align]
Parameters
Returns
assume_aligned()
Template Parameters
Generated by Doxygen
3.15 Utilities 315
Parameters
__ptr A pointer that is aligned to _Align
uninitialized_copy()
Parameters
Returns
uninitialized_copy_n()
Parameters
Returns
__result + __n
Since
C++11
Generated by Doxygen
316
uninitialized_default_construct()
Parameters
Since
C++17
uninitialized_default_construct_n()
Parameters
Returns
__first + __count
Since
C++17
uninitialized_fill()
Parameters
Generated by Doxygen
3.15 Utilities 317
Returns
Nothing.
uninitialized_fill_n()
Parameters
Returns
__first + __n.
uninitialized_move()
Parameters
Returns
Since
C++17
References std::uninitialized_copy().
Generated by Doxygen
318
uninitialized_move_n()
Parameters
Returns
__result + __count
Since
C++17
uninitialized_value_construct()
Parameters
Since
C++17
uninitialized_value_construct_n()
Parameters
Generated by Doxygen
3.15 Utilities 319
Returns
__result + __count
Since
C++17
3.15.5.3 Allocators
Memory Allocators
Classes
Typedefs
Functions
Generated by Doxygen
320
__allocator_base
Template Parameters
operator==()
Returns
Generated by Doxygen
3.15 Utilities 321
Classes
Functions
Generated by Doxygen
322
Generated by Doxygen
3.15 Utilities 323
Generated by Doxygen
324
allocate_shared() [1/3]
Generated by Doxygen
3.15 Utilities 325
Parameters
__a An allocator.
__args Arguments for the _Tp object's constructor.
Returns
Exceptions
A copy of __a will be used to allocate memory for the shared_ptr and the new object.
allocate_shared() [2/3]
Parameters
__a An allocator.
__args Arguments for the _Tp object's constructor.
Returns
Exceptions
A copy of __a will be used to allocate memory for the shared_ptr and the new object.
References std::forward().
allocate_shared() [3/3]
Parameters
__a An allocator.
__args Arguments for the _Tp object's constructor.
Generated by Doxygen
326
Returns
Exceptions
A copy of __a will be used to allocate memory for the shared_ptr and the new object.
atomic_compare_exchange_strong() [1/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- A non-null pointer to a shared_ptr object.
_v
_←- A non-null pointer to a shared_ptr object.
_w
Returns
atomic_compare_exchange_strong() [2/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- A non-null pointer to a shared_ptr object.
_v
_←- A non-null pointer to a shared_ptr object.
_w
Generated by Doxygen
3.15 Utilities 327
Returns
atomic_compare_exchange_strong_explicit() [1/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- A non-null pointer to a shared_ptr object.
_v
_←- A non-null pointer to a shared_ptr object.
_w
Returns
atomic_compare_exchange_strong_explicit() [2/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- A non-null pointer to a shared_ptr object.
_v
_←- A non-null pointer to a shared_ptr object.
_w
Generated by Doxygen
328
Returns
atomic_compare_exchange_weak() [1/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- A non-null pointer to a shared_ptr object.
_v
_←- A non-null pointer to a shared_ptr object.
_w
Returns
atomic_compare_exchange_weak() [2/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- A non-null pointer to a shared_ptr object.
_v
_←- A non-null pointer to a shared_ptr object.
_w
Returns
Generated by Doxygen
3.15 Utilities 329
atomic_compare_exchange_weak_explicit() [1/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- A non-null pointer to a shared_ptr object.
_v
_←- A non-null pointer to a shared_ptr object.
_w
Returns
atomic_compare_exchange_weak_explicit() [2/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- A non-null pointer to a shared_ptr object.
_v
_←- A non-null pointer to a shared_ptr object.
_w
Returns
Generated by Doxygen
330
atomic_exchange() [1/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- New value to store in ∗__p.
_r
Returns
References std::move().
atomic_exchange() [2/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- New value to store in ∗__p.
_r
Returns
References std::move().
atomic_exchange_explicit() [1/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
Generated by Doxygen
3.15 Utilities 331
Returns
atomic_exchange_explicit() [2/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- New value to store in ∗__p.
_r
Returns
atomic_is_lock_free() [1/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
Returns
atomic_is_lock_free() [2/2]
Generated by Doxygen
332
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
Returns
atomic_load() [1/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
Returns
∗__p
atomic_load() [2/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
Returns
∗__p
atomic_load_explicit() [1/2]
Generated by Doxygen
3.15 Utilities 333
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
Returns
∗__p
The memory order shall not be memory_order_release or memory_order_acq_rel.
atomic_load_explicit() [2/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
Returns
∗__p
The memory order shall not be memory_order_release or memory_order_acq_rel.
atomic_store() [1/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- The value to store.
_r
atomic_store() [2/2]
Generated by Doxygen
334
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- The value to store.
_r
atomic_store_explicit() [1/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- The value to store.
_r
atomic_store_explicit() [2/2]
Parameters
_←- A non-null pointer to a shared_ptr object.
_p
_←- The value to store.
_r
const_pointer_cast() [1/2]
Generated by Doxygen
3.15 Utilities 335
const_pointer_cast() [2/2]
Since
C++20
References std::move().
dynamic_pointer_cast() [1/2]
dynamic_pointer_cast() [2/2]
Since
C++20
References std::move().
get_deleter()
make_shared()
Parameters
Returns
Generated by Doxygen
336
Exceptions
References std::forward().
make_unique() [1/3]
Template Parameters
Parameters
Returns
Since
C++14
References std::forward().
make_unique() [2/3]
Template Parameters
Since
C++14
make_unique() [3/3]
Generated by Doxygen
3.15 Utilities 337
Template Parameters
Parameters
Returns
Since
C++14
make_unique_for_overwrite() [1/3]
Template Parameters
Returns
Since
C++20
make_unique_for_overwrite() [2/3]
Template Parameters
Since
C++20
Generated by Doxygen
338
make_unique_for_overwrite() [3/3]
Template Parameters
Parameters
Returns
Since
C++20
operator<() [1/3]
operator<() [2/3]
operator<() [3/3]
Generated by Doxygen
3.15 Utilities 339
operator<<() [1/2]
operator<<() [2/2]
Since
C++20
operator<=() [1/3]
operator<=() [2/3]
operator<=() [3/3]
operator==() [1/4]
Generated by Doxygen
340
operator==() [2/4]
operator==() [3/4]
operator==() [4/4]
operator>() [1/3]
operator>() [2/3]
operator>() [3/3]
operator>=() [1/3]
Generated by Doxygen
3.15 Utilities 341
operator>=() [2/3]
operator>=() [3/3]
reinterpret_pointer_cast() [1/2]
Since
C++17
reinterpret_pointer_cast() [2/2]
Since
C++20
References std::move().
static_pointer_cast() [1/2]
static_pointer_cast() [2/2]
Generated by Doxygen
342
Since
C++20
References std::move().
swap() [1/3]
swap() [2/3]
swap() [3/3]
to_address() [1/2]
Parameters
__ptr A pointer to an object
Returns
__ptr
to_address() [2/2]
Generated by Doxygen
3.15 Utilities 343
Parameters
__ptr A pointer to an object
Returns
References std::to_address().
Enumerations
Functions
Utilities to assist with garbage collection in an implementation that supports strict pointer safety. This implementation
only supports relaxed pointer safety and so these functions have no effect.
C++11 20.6.4 [util.dynamic.safety], Pointer safety
pointer_safety
Generated by Doxygen
344
declare_no_pointers()
void std::declare_no_pointers (
char ∗ ,
size_t ) [inline]
Inform a garbage collector that a region of memory need not be traced.
declare_reachable()
void std::declare_reachable (
void ∗ ) [inline]
Inform a garbage collector that an object is still in use.
get_pointer_safety()
undeclare_no_pointers()
void std::undeclare_no_pointers (
char ∗ ,
size_t ) [inline]
Unregister a range previously registered with declare_no_pointers.
undeclare_reachable()
Polymorphic memory
Memory
resources
Files
• file memory_resource
Generated by Doxygen
3.15 Utilities 345
Classes
Functions
C++17
Memory resources are classes that implement the std::pmr::memory_resource interface for allocating and
deallocating memory. Unlike traditional C++ allocators, memory resources are not value types and are used via pointers
to the abstract base class. They are only responsible for allocating and deallocating, not for construction and destruc-
tion of objects. As a result, memory resources just allocate raw memory as type void∗ and are not templates that
allocate/deallocate and construct/destroy a specific type.
The class template std::pmr::polymorphic_allocator is an allocator that uses a memory resource for its
allocations.
new_delete_resource()
Since
C++17
3.15.6 Metaprogramming
Utilities Metaprogramming
Classes
Generated by Doxygen
346
Generated by Doxygen
3.15 Utilities 347
Typedefs
Generated by Doxygen
348
Generated by Doxygen
3.15 Utilities 349
Functions
Variables
• template<typename... _Tp>
using std::common_reference_t
• template<typename _Tp , typename _Up >
constexpr bool std::is_layout_compatible_v
• template<typename _Base , typename _Derived >
constexpr bool std::is_pointer_interconvertible_base_of_v
• template<typename _S1 , typename _S2 , typename _M1 , typename _M2 >
constexpr bool std::is_corresponding_member (_M1 _S1::∗__m1, _M2 _S2::∗__m2) noexcept
• template<typename _Tp , typename _Mem >
constexpr bool std::is_pointer_interconvertible_with_class (_Mem _Tp::∗__mp) noexcept
Generated by Doxygen
350
Template utilities for compile-time introspection and modification, including type classification traits, type property in-
spection traits and type transformation traits.
Since
C++11
add_lvalue_reference_t
add_pointer_t
add_rvalue_reference_t
aligned_storage_t
common_reference_t
template<typename... _Tp>
using std::common_reference_t
Since
C++20
common_type_t
template<typename... _Tp>
using std::common_type_t
Alias template for common_type.
conditional_t
Generated by Doxygen
3.15 Utilities 351
decay_t
enable_if_t
false_type
using std::false_type
The type used as a compile-time boolean with false value.
make_signed_t
make_unsigned_t
remove_all_extents_t
remove_extent_t
remove_pointer_t
remove_reference_t
Generated by Doxygen
352
result_of_t
true_type
using std::true_type
The type used as a compile-time boolean with true value.
type
underlying_type_t
is_corresponding_member()
Since
C++20
is_pointer_interconvertible_with_class()
Returns
Since
C++20
swap() [1/2]
Generated by Doxygen
3.15 Utilities 353
Generated by Doxygen
354
Parameters
Returns
Nothing.
swap() [2/2]
alignment_value
is_layout_compatible_v
Since
C++20
is_pointer_interconvertible_base_of_v
Generated by Doxygen
3.15 Utilities 355
Since
C++20
Files
• file ratio
Classes
Typedefs
• using std::atto
• using std::centi
• using std::deca
• using std::deci
• using std::exa
• using std::femto
• using std::giga
• using std::hecto
• using std::kilo
• using std::mega
• using std::micro
• using std::milli
• using std::nano
• using std::peta
• using std::pico
• template<typename _R1 , typename _R2 >
using std::ratio_add
• template<typename _R1 , typename _R2 >
using std::ratio_divide
Generated by Doxygen
356
Variables
ratio_add
ratio_divide
ratio_multiply
ratio_subtract
Generated by Doxygen
3.15 Utilities 357
3.15.8 Time
Utilities Time
Files
• file chrono
Namespaces
• namespace std::chrono
• namespace std::literals::chrono_literals
Classes
Typedefs
• using std::chrono::days
• using std::chrono::file_clock
• template<typename _Duration >
using std::chrono::file_time
• using std::chrono::gps_seconds
• template<typename _Duration >
using std::chrono::gps_time
• using std::chrono::high_resolution_clock
Generated by Doxygen
358
• using std::chrono::hours
• using std::chrono::local_days
• using std::chrono::local_seconds
• template<typename _Duration >
using std::chrono::local_time
• using std::chrono::microseconds
• using std::chrono::milliseconds
• using std::chrono::minutes
• using std::chrono::months
• using std::chrono::nanoseconds
• using std::chrono::seconds
• using std::chrono::sys_days
• using std::chrono::sys_seconds
• template<typename _Duration >
using std::chrono::sys_time
• using std::chrono::tai_seconds
• template<typename _Duration >
using std::chrono::tai_time
• using std::chrono::utc_seconds
• template<typename _Duration >
using std::chrono::utc_time
• using std::chrono::weeks
• using std::chrono::years
• using std::chrono::zoned_seconds
Enumerations
Functions
Generated by Doxygen
3.15 Utilities 359
Generated by Doxygen
360
Generated by Doxygen
3.15 Utilities 361
Generated by Doxygen
362
Generated by Doxygen
3.15 Utilities 363
Variables
Generated by Doxygen
364
Generated by Doxygen
3.15 Utilities 365
C++11
Generated by Doxygen
366
days
using std::chrono::days
days
high_resolution_clock
using std::chrono::_V2::high_resolution_clock
Highest-resolution clock.
This is the clock "with the shortest tick period." Alias to std::system_clock until higher-than-nanosecond definitions
become feasible.
hours
using std::chrono::hours
hours
microseconds
using std::chrono::microseconds
microseconds
milliseconds
using std::chrono::milliseconds
milliseconds
minutes
using std::chrono::minutes
minutes
months
using std::chrono::months
months
nanoseconds
using std::chrono::nanoseconds
nanoseconds
seconds
using std::chrono::seconds
seconds
weeks
using std::chrono::weeks
weeks
Generated by Doxygen
3.15 Utilities 367
years
using std::chrono::years
years
abs()
Parameters
_←- A duration with a signed rep type.
_d
Returns
Since
C++17
ceil() [1/2]
Template Parameters
Parameters
_←- A duration.
_d
Returns
Since
C++17
References std::chrono::duration_cast().
Referenced by std::chrono::ceil().
Generated by Doxygen
368
ceil() [2/2]
Template Parameters
Parameters
←- A time point.
_←-
←-
_←-
t
Returns
Since
C++17
References std::chrono::ceil().
clock_cast()
duration_cast()
Generated by Doxygen
3.15 Utilities 369
Template Parameters
Parameters
_←- A duration.
_d
Returns
Since
C++11
Referenced by std::chrono::ceil(), std::chrono::floor(), std::this_thread::sleep_for(), and std::chrono::time_point_cast().
floor() [1/2]
Template Parameters
Parameters
_←- A duration.
_d
Returns
Since
C++17
References std::chrono::duration_cast().
Referenced by std::chrono::floor(), and std::chrono::round().
floor() [2/2]
Generated by Doxygen
370
Template Parameters
Parameters
←- A time point.
_←-
←-
_←-
t
Returns
Since
C++17
References std::chrono::floor().
local_time_format()
Since
C++20
operator""""d()
chrono::day std::literals::chrono_literals::operator""d (
unsigned long long __d) [constexpr], [noexcept]
Literal suffix for creating chrono::day objects.
Since
C++20
operator""""h() [1/2]
template<char... _Digits>
chrono::hours std::literals::chrono_literals::operator""h () [constexpr]
Literal suffix for durations of type std::chrono::hours
Generated by Doxygen
3.15 Utilities 371
operator""""h() [2/2]
operator""""min() [1/2]
template<char... _Digits>
chrono::minutes std::literals::chrono_literals::operator""min () [constexpr]
Literal suffix for durations of type std::chrono::minutes
operator""""min() [2/2]
operator""""ms() [1/2]
template<char... _Digits>
chrono::milliseconds std::literals::chrono_literals::operator""ms () [constexpr]
Literal suffix for durations of type std::chrono::milliseconds
operator""""ms() [2/2]
operator""""ns() [1/2]
template<char... _Digits>
chrono::nanoseconds std::literals::chrono_literals::operator""ns () [constexpr]
Literal suffix for durations of type std::chrono::nanoseconds
operator""""ns() [2/2]
operator""""s() [1/2]
template<char... _Digits>
chrono::seconds std::literals::chrono_literals::operator""s () [constexpr]
Literal suffix for durations of type std::chrono::seconds
operator""""s() [2/2]
Generated by Doxygen
372
operator""""us() [1/2]
template<char... _Digits>
chrono::microseconds std::literals::chrono_literals::operator""us () [constexpr]
Literal suffix for durations of type std::chrono::microseconds
operator""""us() [2/2]
operator""""y()
chrono::year std::literals::chrono_literals::operator""y (
unsigned long long __y) [constexpr], [noexcept]
Literal suffix for creating chrono::year objects.
Since
C++20
operator%() [1/2]
operator%() [2/2]
operator∗() [1/2]
operator∗() [2/2]
Generated by Doxygen
3.15 Utilities 373
operator+() [1/3]
operator+() [2/3]
operator+() [3/3]
operator-() [1/3]
operator-() [2/3]
operator-() [3/3]
operator/() [1/2]
Generated by Doxygen
374
::operator/ (
const duration< _Rep1, _Period > & __d,
const _Rep2 & __s) [constexpr]
Arithmetic operators for chrono::duration
operator/() [2/2]
operator<()
operator<<() [1/3]
operator<<() [2/3]
operator<<() [3/3]
C++20
operator<=()
Generated by Doxygen
3.15 Utilities 375
operator<=>()
operator==()
operator>()
operator>=()
round() [1/2]
Template Parameters
_ToDur The result type must be a duration with a non-floating-point rep type.
Parameters
_←- A duration.
_d
Generated by Doxygen
376
Returns
Since
C++17
References std::chrono::floor().
Referenced by std::chrono::round().
round() [2/2]
Template Parameters
_ToDur The duration type to use for the result, which must have a non-floating-point rep type.
Parameters
←- A time point.
_←-
←-
_←-
t
Returns
Since
C++17
References std::chrono::round().
time_point_cast()
Generated by Doxygen
4 Namespace Documentation 377
Template Parameters
Parameters
←- A time point.
_←-
←-
_←-
t
Returns
Since
C++11
References std::chrono::duration_cast().
4 Namespace Documentation
4.1 __gnu_cxx Namespace Reference
Namespaces
• namespace __detail
• namespace typelist
Classes
• struct __alloc_traits
• struct __common_pool_policy
• class __mt_alloc
• class __mt_alloc_base
• struct __per_type_pool_policy
• class __pool
• class __pool< false >
• class __pool< true >
• class __pool_alloc
• class __pool_alloc_base
• struct __pool_base
• class __rc_string_base
• class __scoped_lock
• class __versa_string
• struct _Caster
• struct _Char_types
• class _ExtPtr_allocator
• struct _Invalid_type
• class _Pointer_adapter
Generated by Doxygen
378
• class _Relative_pointer_impl
• class _Relative_pointer_impl< const _Tp >
• class _Std_pointer_impl
• struct _Unqualified_type
• struct annotate_base
• class binary_compose
• class bitmap_allocator
• struct char_traits
• struct character
• struct condition_base
• struct constant_binary_fun
• struct constant_unary_fun
• struct constant_void_fun
• class debug_allocator
• class enc_filebuf
• struct encoding_char_traits
• class encoding_state
• struct forced_error
• class free_list
• class hash_map
• class hash_multimap
• class hash_multiset
• class hash_set
• struct limit_condition
• class malloc_allocator
• class new_allocator
• struct project1st
• struct project2nd
• struct random_condition
• struct rb_tree
• class recursive_init_error
• class rope
• struct select1st
• struct select2nd
• class slist
• class stdio_filebuf
• class stdio_sync_filebuf
• class subtractive_rng
• struct temporary_buffer
• class throw_allocator_base
• struct throw_allocator_limit
• struct throw_allocator_random
• struct throw_value_base
• struct throw_value_limit
• struct throw_value_random
• class unary_compose
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 379
Typedefs
Enumerations
• enum { _S_num_primes }
• enum _Lock_policy { _S_single , _S_mutex , _S_atomic }
Functions
Generated by Doxygen
380
• void __error_type_must_be_a_signed_integer_type ()
• void __error_type_must_be_an_integer_type ()
• void __error_type_must_be_an_unsigned_integer_type ()
• _Atomic_word __exchange_and_add (volatile _Atomic_word ∗, int) noexcept
• _Atomic_word __exchange_and_add_dispatch (_Atomic_word ∗__mem, int __val)
• _Atomic_word __exchange_and_add_single (_Atomic_word ∗__mem, int __val)
• template<class _Concept >
constexpr void __function_requires ()
• template<typename _Type >
constexpr bool __is_null_pointer (_Type ∗__ptr)
• template<typename _Type >
constexpr bool __is_null_pointer (_Type)
• constexpr bool __is_null_pointer (std::nullptr_t)
• bool __is_single_threaded () noexcept
• template<typename _InputIterator1 , typename _InputIterator2 >
int __lexicographical_compare_3way (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2,
_InputIterator2 __last2)
• int __lexicographical_compare_3way (const char ∗__first1, const char ∗__last1, const char ∗__first2, const
char ∗__last2)
• int __lexicographical_compare_3way (const unsigned char ∗__first1, const unsigned char ∗__last1, const un-
signed char ∗__first2, const unsigned char ∗__last2)
• template<typename _Tp >
const _Tp & __median (const _Tp &__a, const _Tp &__b, const _Tp &__c)
• template<typename _Tp , typename _Compare >
const _Tp & __median (const _Tp &__a, const _Tp &__b, const _Tp &__c, _Compare __comp)
• crope::reference __mutable_reference_at (crope &__c, std::size_t __i)
• template<typename _Tp , typename _Integer >
_Tp __power (_Tp __x, _Integer __n)
• template<typename _Tp , typename _Integer , typename _MonoidOperation >
_Tp __power (_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
• template<typename _InputIterator , typename _RandomAccessIterator , typename _RandomNumberGenerator , typename _Distance >
_RandomAccessIterator __random_sample (_InputIterator __first, _InputIterator __last, _RandomAccessIterator
__out, _RandomNumberGenerator &__rand, const _Distance __n)
• template<typename _InputIterator , typename _RandomAccessIterator , typename _Distance >
_RandomAccessIterator __random_sample (_InputIterator __first, _InputIterator __last, _RandomAccessIterator
__out, const _Distance __n)
• template<typename _ToType , typename _FromType >
_ToType __reinterpret_pointer_cast (_FromType ∗__arg)
• template<typename _ToType , typename _FromType >
_ToType __reinterpret_pointer_cast (const _FromType &__arg)
• _Slist_node_base ∗ __slist_make_link (_Slist_node_base ∗__prev_node, _Slist_node_base ∗__new_node)
• _Slist_node_base ∗ __slist_previous (_Slist_node_base ∗__head, const _Slist_node_base ∗__node)
• const _Slist_node_base ∗ __slist_previous (const _Slist_node_base ∗__head, const _Slist_node_base ∗__←-
node)
• _Slist_node_base ∗ __slist_reverse (_Slist_node_base ∗__node)
• std::size_t __slist_size (_Slist_node_base ∗__node)
• void __slist_splice_after (_Slist_node_base ∗__pos, _Slist_node_base ∗__before_first, _Slist_node_base ∗_←-
_before_last)
• void __slist_splice_after (_Slist_node_base ∗__pos, _Slist_node_base ∗__head)
• template<typename _ToType , typename _FromType >
_ToType __static_pointer_cast (_FromType ∗__arg)
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 381
Generated by Doxygen
382
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 383
Generated by Doxygen
384
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (__versa_string< _CharT, _Traits, _Alloc, _Base >
&&__lhs, __versa_string< _CharT, _Traits, _Alloc, _Base > &&__rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (__versa_string< _CharT, _Traits, _Alloc, _Base >
&&__lhs, _CharT __rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (__versa_string< _CharT, _Traits, _Alloc, _Base >
&&__lhs, const __versa_string< _CharT, _Traits, _Alloc, _Base > &__rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (__versa_string< _CharT, _Traits, _Alloc, _Base >
&&__lhs, const _CharT ∗__rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (_CharT __lhs, __versa_string< _CharT, _Traits,
_Alloc, _Base > &&__rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (_CharT __lhs, const __versa_string< _CharT, _←-
Traits, _Alloc, _Base > &__rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (const __versa_string< _CharT, _Traits, _Alloc,
_Base > &__lhs, __versa_string< _CharT, _Traits, _Alloc, _Base > &&__rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (const __versa_string< _CharT, _Traits, _Alloc,
_Base > &__lhs, _CharT __rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (const __versa_string< _CharT, _Traits, _Alloc,
_Base > &__lhs, const __versa_string< _CharT, _Traits, _Alloc, _Base > &__rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (const __versa_string< _CharT, _Traits, _Alloc,
_Base > &__lhs, const _CharT ∗__rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (const _CharT ∗__lhs, __versa_string< _CharT,
_Traits, _Alloc, _Base > &&__rhs)
• template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > operator+ (const _CharT ∗__lhs, const __versa_string< _←-
CharT, _Traits, _Alloc, _Base > &__rhs)
• template<class _CharT , class _Alloc >
_Rope_const_iterator< _CharT, _Alloc > operator+ (const _Rope_const_iterator< _CharT, _Alloc > &__x, std←-
::ptrdiff_t __n)
• template<class _CharT , class _Alloc >
_Rope_iterator< _CharT, _Alloc > operator+ (const _Rope_iterator< _CharT, _Alloc > &__x, std::ptrdiff_t __n)
• template<class _CharT , class _Alloc >
rope< _CharT, _Alloc > operator+ (const rope< _CharT, _Alloc > &__left, _CharT __right)
• template<class _CharT , class _Alloc >
rope< _CharT, _Alloc > operator+ (const rope< _CharT, _Alloc > &__left, const _CharT ∗__right)
• template<class _CharT , class _Alloc >
rope< _CharT, _Alloc > operator+ (const rope< _CharT, _Alloc > &__left, const rope< _CharT, _Alloc > &_←-
_right)
• template<typename _Cond >
throw_value_base< _Cond > operator+ (const throw_value_base< _Cond > &__a, const throw_value_base<
_Cond > &__b)
• template<class _CharT , class _Alloc >
_Rope_const_iterator< _CharT, _Alloc > operator+ (std::ptrdiff_t __n, const _Rope_const_iterator< _CharT,
_Alloc > &__x)
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 385
Generated by Doxygen
386
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 387
Generated by Doxygen
388
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 389
Generated by Doxygen
390
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 391
Generated by Doxygen
392
Variables
__int_traits
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 393
__static_pointer_cast() [1/2]
__static_pointer_cast() [2/2]
_Bit_scan_forward()
std::size_t __gnu_cxx::_Bit_scan_forward (
std::size_t __num) [inline]
Generic Version of the bsf instruction.
Referenced by __gnu_cxx::bitmap_allocator< _Tp >::_M_allocate_single_object().
operator"!=() [1/3]
Parameters
__lhs First string.
__rhs Second string.
Returns
operator"!=() [2/3]
Generated by Doxygen
394
Parameters
__lhs String.
__rhs C string.
Returns
operator"!=() [3/3]
Parameters
__lhs C string.
__rhs String.
Returns
operator+() [1/5]
Parameters
__lhs First string.
__rhs Last string.
Returns
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::append(), __gnu_cxx::__versa_string< _CharT, _Traits, _Allo
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::reserve(), and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 395
operator+() [2/5]
Generated by Doxygen
396
Parameters
__lhs First string.
__rhs Last string.
Returns
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::append(), __gnu_cxx::__versa_string< _CharT, _Traits, _Allo
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::reserve(), and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base
operator+() [3/5]
Parameters
__lhs First string.
__rhs Last string.
Returns
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::append(), __gnu_cxx::__versa_string< _CharT, _Traits, _Allo
and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().
operator+() [4/5]
Parameters
__lhs First string.
__rhs Last string.
Returns
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 397
operator+() [5/5]
Parameters
__lhs First string.
__rhs Last string.
Returns
operator<() [1/3]
Parameters
__lhs First string.
__rhs Second string.
Returns
operator<() [2/3]
Parameters
__lhs String.
__rhs C string.
Returns
Generated by Doxygen
398
operator<() [3/3]
Parameters
__lhs C string.
__rhs String.
Returns
operator<=() [1/3]
Parameters
__lhs First string.
__rhs Second string.
Returns
operator<=() [2/3]
Parameters
__lhs String.
__rhs C string.
Returns
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 399
operator<=() [3/3]
Parameters
__lhs C string.
__rhs String.
Returns
operator==() [1/4]
Parameters
__lhs First string.
__rhs Second string.
Returns
operator==() [2/4]
Parameters
__lhs String.
__rhs C string.
Returns
Generated by Doxygen
400
operator==() [3/4]
Parameters
__lhs C string.
__rhs String.
Returns
operator==() [4/4]
operator>() [1/3]
Parameters
__lhs First string.
__rhs Second string.
Returns
operator>() [2/3]
Generated by Doxygen
4.1 __gnu_cxx Namespace Reference 401
Parameters
__lhs String.
__rhs C string.
Returns
operator>() [3/3]
Parameters
__lhs C string.
__rhs String.
Returns
operator>=() [1/3]
Parameters
__lhs First string.
__rhs Second string.
Returns
operator>=() [2/3]
Generated by Doxygen
402
Parameters
__lhs String.
__rhs C string.
Returns
operator>=() [3/3]
Parameters
__lhs C string.
__rhs String.
Returns
swap()
Parameters
__lhs First string.
__rhs Second string.
• class __mini_vector
• class _Bitmap_counter
• class _Ffit_finder
Generated by Doxygen
4.2 __gnu_cxx::__detail Namespace Reference 403
Enumerations
• enum { _S_max_rope_depth }
• enum { bits_per_byte , bits_per_block }
• enum _Tag { _S_leaf , _S_concat , _S_substringfn , _S_function }
Functions
__bit_allocate()
void __gnu_cxx::__detail::__bit_allocate (
std::size_t ∗ __pbmap,
std::size_t __pos) throw ( ) [inline]
Mark a memory address as allocated by re-setting the corresponding bit in the bit-map.
Referenced by __gnu_cxx::bitmap_allocator< _Tp >::_M_allocate_single_object().
__bit_free()
void __gnu_cxx::__detail::__bit_free (
std::size_t ∗ __pbmap,
std::size_t __pos) throw ( ) [inline]
Mark a memory address as free by setting the corresponding bit in the bit-map.
Referenced by __gnu_cxx::bitmap_allocator< _Tp >::_M_deallocate_single_object().
__num_bitmaps()
__num_blocks()
Generated by Doxygen
404
apply_generator()
• class _After_nth_from
• struct _BeforeBeginHelper
• class _Equal_to
• class _Not_equal_to
• class _Safe_container
• class _Safe_forward_list
• class _Safe_iterator
• class _Safe_iterator_base
• class _Safe_local_iterator
• class _Safe_local_iterator_base
• class _Safe_node_sequence
• class _Safe_sequence
• class _Safe_sequence_base
• class _Safe_unordered_container
• class _Safe_unordered_container_base
• class _Safe_vector
• struct _Sequence_traits
• class basic_string
Generated by Doxygen
4.4 __gnu_debug Namespace Reference 405
Typedefs
Enumerations
• enum _Debug_msg_id {
__msg_valid_range , __msg_insert_singular , __msg_insert_different , __msg_erase_bad ,
__msg_erase_different , __msg_subscript_oob , __msg_empty , __msg_unpartitioned ,
__msg_unpartitioned_pred , __msg_unsorted , __msg_unsorted_pred , __msg_not_heap ,
__msg_not_heap_pred , __msg_bad_bitset_write , __msg_bad_bitset_read , __msg_bad_bitset_flip ,
__msg_self_splice , __msg_splice_alloc , __msg_splice_bad , __msg_splice_other ,
__msg_splice_overlap , __msg_init_singular , __msg_init_copy_singular , __msg_init_const_singular ,
__msg_copy_singular , __msg_bad_deref , __msg_bad_inc , __msg_bad_dec ,
__msg_iter_subscript_oob , __msg_advance_oob , __msg_retreat_oob , __msg_iter_compare_bad ,
__msg_compare_different , __msg_iter_order_bad , __msg_order_different , __msg_distance_bad ,
__msg_distance_different , __msg_deref_istream , __msg_inc_istream , __msg_output_ostream ,
__msg_deref_istreambuf , __msg_inc_istreambuf , __msg_insert_after_end , __msg_erase_after_bad ,
__msg_valid_range2 , __msg_local_iter_compare_bad , __msg_non_empty_range , __msg_self_move←-
_assign ,
__msg_bucket_index_oob , __msg_valid_load_factor , __msg_equal_allocs , __msg_insert_range_←-
from_self ,
__msg_irreflexive_ordering }
• enum _Distance_precision {
__dp_none , __dp_equality , __dp_sign , __dp_sign_max_size ,
__dp_exact }
Functions
Generated by Doxygen
406
Generated by Doxygen
4.4 __gnu_debug Namespace Reference 407
Generated by Doxygen
408
Generated by Doxygen
4.4 __gnu_debug Namespace Reference 409
Generated by Doxygen
410
u16string
u32string
_Distance_precision
enum __gnu_debug::_Distance_precision
The precision to which we can calculate the distance between two iterators.
Generated by Doxygen
4.4 __gnu_debug Namespace Reference 411
__base()
__check_singular()
__check_singular_aux()
bool __gnu_debug::__check_singular_aux (
const _Safe_iterator_base ∗ __x) [inline]
Iterators that derive from _Safe_iterator_base can be determined singular or non-singular.
References __gnu_debug::_Safe_iterator_base::_M_singular().
__check_string() [1/2]
__check_string() [2/2]
__foreign_iterator_aux2() [1/2]
Generated by Doxygen
412
__foreign_iterator_aux2() [2/2]
__get_distance()
__valid_range() [1/3]
__valid_range() [2/3]
__valid_range() [3/3]
__valid_range_aux() [1/2]
Generated by Doxygen
4.5 __gnu_internal Namespace Reference 413
We have iterators, so figure out what kind of iterators they are to see if we can check the range ahead of time.
References std::__iterator_category(), and __valid_range_aux().
__valid_range_aux() [2/2]
GNU implemenation details, not for public use or export. Used only when anonymous namespaces cannot be substi-
tuted.
• struct __accumulate_binop_reduct
• struct __accumulate_selector
• struct __adjacent_difference_selector
• struct __adjacent_find_selector
• class __binder1st
• class __binder2nd
• struct __count_if_selector
• struct __count_selector
• struct __fill_selector
• struct __find_first_of_selector
• struct __find_if_selector
• struct __for_each_selector
• struct __generate_selector
• struct __generic_find_selector
• struct __generic_for_each_selector
• struct __identity_selector
• struct __inner_product_selector
• struct __max_element_reduct
• struct __min_element_reduct
• struct __mismatch_selector
• struct __multiway_merge_3_variant_sentinel_switch
• struct __multiway_merge_3_variant_sentinel_switch< true, _RAIterIterator, _RAIter3, _DifferenceTp, _Compare >
• struct __multiway_merge_4_variant_sentinel_switch
• struct __multiway_merge_4_variant_sentinel_switch< true, _RAIterIterator, _RAIter3, _DifferenceTp, _Compare >
• struct __multiway_merge_k_variant_sentinel_switch
• struct __multiway_merge_k_variant_sentinel_switch< false, __stable, _RAIterIterator, _RAIter3, _DifferenceTp, _Compare >
• struct __replace_if_selector
• struct __replace_selector
Generated by Doxygen
414
• struct __transform1_selector
• struct __transform2_selector
• class __unary_negate
• struct _DRandomShufflingGlobalData
• struct _DRSSorterPU
• struct _DummyReduct
• class _EqualFromLess
• struct _EqualTo
• class _GuardedIterator
• class _IteratorPair
• class _IteratorTriple
• struct _Job
• struct _Less
• class _Lexicographic
• class _LexicographicReverse
• class _LoserTree
• class _LoserTree< false, _Tp, _Compare >
• class _LoserTreeBase
• class _LoserTreePointer
• class _LoserTreePointer< false, _Tp, _Compare >
• class _LoserTreePointerBase
• class _LoserTreePointerUnguarded
• class _LoserTreePointerUnguarded< false, _Tp, _Compare >
• class _LoserTreePointerUnguardedBase
• struct _LoserTreeTraits
• class _LoserTreeUnguarded
• class _LoserTreeUnguarded< false, _Tp, _Compare >
• class _LoserTreeUnguardedBase
• struct _Multiplies
• struct _Nothing
• struct _Piece
• struct _Plus
• struct _PMWMSSortingData
• class _PseudoSequence
• class _PseudoSequenceIterator
• struct _QSBThreadLocal
• class _RandomNumber
• class _RestrictedBoundedConcurrentQueue
• struct _SamplingSorter
• struct _SamplingSorter< false, _RAIter, _StrictWeakOrdering >
• struct _Settings
• struct _SplitConsistently
• struct _SplitConsistently< false, _RAIter, _Compare, _SortingPlacesIterator >
• struct _SplitConsistently< true, _RAIter, _Compare, _SortingPlacesIterator >
• struct balanced_quicksort_tag
• struct balanced_tag
• struct constant_size_blocks_tag
• struct default_parallel_tag
• struct equal_split_tag
• struct exact_tag
• struct find_tag
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 415
• struct growing_blocks_tag
• struct multiway_mergesort_exact_tag
• struct multiway_mergesort_sampling_tag
• struct multiway_mergesort_tag
• struct omp_loop_static_tag
• struct omp_loop_tag
• struct parallel_tag
• struct quicksort_tag
• struct sampling_tag
• struct sequential_tag
• struct unbalanced_tag
Typedefs
Enumerations
Functions
Generated by Doxygen
416
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 417
Generated by Doxygen
418
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 419
Generated by Doxygen
420
• template<typename _LT , typename _RAIterIterator , typename _RAIter3 , typename _DifferenceTp , typename _Compare >
_RAIter3 multiway_merge_loser_tree_unguarded (_RAIterIterator __seqs_begin, _RAIterIterator __seqs_end, ←-
_RAIter3 __target, const typename std::iterator_traits< typename std::iterator_traits< _RAIterIterator >::value←-
_type::first_type >::value_type &__sentinel, _DifferenceTp __length, _Compare __comp)
• template<bool __stable, typename _RAIterIterator , typename _Compare , typename _DifferenceType >
void multiway_merge_sampling_splitting (_RAIterIterator __seqs_begin, _RAIterIterator __seqs_end, _←-
DifferenceType __length, _DifferenceType __total_length, _Compare __comp, std::vector< std::pair< _←-
DifferenceType, _DifferenceType > > ∗__pieces)
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut multiway_merge_sentinels (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __seqs_end, ←-
_RAIterOut __target, _DifferenceTp __length, _Compare __comp, __gnu_parallel::exact_tag __tag)
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut multiway_merge_sentinels (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __seqs_end, _←-
RAIterOut __target, _DifferenceTp __length, _Compare __comp, __gnu_parallel::sequential_tag)
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut multiway_merge_sentinels (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __seqs_end, ←-
_RAIterOut __target, _DifferenceTp __length, _Compare __comp, default_parallel_tag __tag)
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut multiway_merge_sentinels (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __seqs_end, ←-
_RAIterOut __target, _DifferenceTp __length, _Compare __comp, parallel_tag __tag=parallel_tag(0))
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut multiway_merge_sentinels (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __seqs_end, ←-
_RAIterOut __target, _DifferenceTp __length, _Compare __comp, sampling_tag __tag)
• template<bool __stable, bool __sentinels, typename _RAIterIterator , typename _RAIter3 , typename _DifferenceTp , typename _Splitter ,
typename _Compare >
_RAIter3 parallel_multiway_merge (_RAIterIterator __seqs_begin, _RAIterIterator __seqs_end, _RAIter3 __←-
target, _Splitter __splitter, _DifferenceTp __length, _Compare __comp, _ThreadIndex __num_threads)
• template<bool __stable, bool __exact, typename _RAIter , typename _Compare >
void parallel_sort_mwms (_RAIter __begin, _RAIter __end, _Compare __comp, _ThreadIndex __num_threads)
• template<bool __stable, bool __exact, typename _RAIter , typename _Compare >
void parallel_sort_mwms_pu (_PMWMSSortingData< _RAIter > ∗__sd, _Compare &__comp)
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut stable_multiway_merge (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __seqs_end, _←-
RAIterOut __target, _DifferenceTp __length, _Compare __comp, __gnu_parallel::exact_tag __tag)
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut stable_multiway_merge (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __seqs_end, _←-
RAIterOut __target, _DifferenceTp __length, _Compare __comp, __gnu_parallel::sequential_tag)
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut stable_multiway_merge (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __seqs_end, _←-
RAIterOut __target, _DifferenceTp __length, _Compare __comp, default_parallel_tag __tag)
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut stable_multiway_merge (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __seqs_end, _←-
RAIterOut __target, _DifferenceTp __length, _Compare __comp, parallel_tag __tag=parallel_tag(0))
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut stable_multiway_merge (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __seqs_end, _←-
RAIterOut __target, _DifferenceTp __length, _Compare __comp, sampling_tag __tag)
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut stable_multiway_merge_sentinels (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __←-
seqs_end, _RAIterOut __target, _DifferenceTp __length, _Compare __comp, __gnu_parallel::exact_tag __tag)
• template<typename _RAIterPairIterator , typename _RAIterOut , typename _DifferenceTp , typename _Compare >
_RAIterOut stable_multiway_merge_sentinels (_RAIterPairIterator __seqs_begin, _RAIterPairIterator __←-
seqs_end, _RAIterOut __target, _DifferenceTp __length, _Compare __comp, __gnu_parallel::sequential_tag)
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 421
Variables
_BinIndex
_CASable
_SequenceIndex
_ThreadIndex
_AlgorithmStrategy
enum __gnu_parallel::_AlgorithmStrategy
Strategies for run-time algorithm selection:
_FindAlgorithm
enum __gnu_parallel::_FindAlgorithm
Find algorithms:
Generated by Doxygen
422
_MultiwayMergeAlgorithm
enum __gnu_parallel::_MultiwayMergeAlgorithm
Merging algorithms:
_Parallelism
enum __gnu_parallel::_Parallelism
Run-time equivalents for the compile-time tags.
Enumerator
sequential Not parallel.
parallel_unbalanced Parallel unbalanced (equal-sized chunks).
parallel_balanced Parallel balanced (work-stealing).
parallel_omp_loop Parallel with OpenMP dynamic load-balancing.
parallel_omp_loop_static Parallel with OpenMP static load-balancing.
parallel_taskqueue Parallel with OpenMP taskqueue construct.
_PartialSumAlgorithm
enum __gnu_parallel::_PartialSumAlgorithm
Partial sum algorithms: recursive, linear.
_SortAlgorithm
enum __gnu_parallel::_SortAlgorithm
Sorting algorithms:
_SplittingAlgorithm
enum __gnu_parallel::_SplittingAlgorithm
Sorting/merging algorithms: sampling, __exact.
__calc_borders()
Parameters
Referenced by __search_template().
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 423
__compare_and_swap()
Parameters
__ptr Pointer to signed integer.
__comparand Compare value.
__replacement Replacement value.
__decode2()
void __gnu_parallel::__decode2 (
_CASable __x,
int & __a,
int & __b) [inline]
Decode two integers from one gnu_parallel::_CASable.
Parameters
See also
__encode2
__determine_samples()
Generated by Doxygen
424
Parameters
__sd Pointer to algorithm data. _Result will be placed in __sd->_M_samples.
__num_samples Number of _M_samples to select.
__encode2()
_CASable __gnu_parallel::__encode2 (
int __a,
int __b) [inline]
Encode two integers into one gnu_parallel::_CASable.
Parameters
Returns
See also
__decode2
References _CASable_bits.
Referenced by __gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp >::_RestrictedBoundedConcurrentQueue(),
__gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp >::pop_back(), __gnu_parallel::_RestrictedBoundedConcurrentQueue< _T
and __gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp >::push_front().
__equally_split()
Parameters
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 425
Returns
__equally_split_point()
Parameters
Returns
splitting point
Referenced by __for_each_template_random_access_ed().
__fetch_and_add()
Parameters
__ptr Pointer to a signed integer.
__addend Value to add.
__find_template() [1/4]
Generated by Doxygen
426
Parameters
Returns
__find_template() [2/4]
Parameters
Returns
See also
__gnu_parallel::_Settings::find_sequential_search_size
__gnu_parallel::_Settings::find_block_size There are two main differences between the growing blocks and the
constant-size blocks variants.
1. For GB, the block size grows; for CSB, the block size is fixed.
2. For GB, the blocks are allocated dynamically; for CSB, the blocks are allocated in a predetermined manner,
namely spacial round-robin.
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 427
__find_template() [3/4]
Parameters
Returns
__find_template() [4/4]
Parameters
Returns
Generated by Doxygen
428
See also
__gnu_parallel::_Settings::find_sequential_search_size
__gnu_parallel::_Settings::find_scale_factor
There are two main differences between the growing blocks and the constant-size blocks variants.
1. For GB, the block size grows; for CSB, the block size is fixed.
2. For GB, the blocks are allocated dynamically; for CSB, the blocks are allocated in a predetermined manner,
namely spacial round-robin.
__for_each_template_random_access()
Parameters
__for_each_template_random_access_ed()
template<typename _RAIter , typename _Op , typename _Fu , typename _Red , typename _Result >
_Op __gnu_parallel::__for_each_template_random_access_ed (
_RAIter __begin,
_RAIter __end,
_Op __o,
_Fu & __f,
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 429
_Red __r,
_Result __base,
_Result & __output,
typename std::iterator_traits< _RAIter >::difference_type __bound)
Embarrassingly parallel algorithm for random access iterators, using hand-crafted parallelization by equal splitting the
work.
Parameters
Returns
__for_each_template_random_access_omp_loop()
template<typename _RAIter , typename _Op , typename _Fu , typename _Red , typename _Result >
_Op __gnu_parallel::__for_each_template_random_access_omp_loop (
_RAIter __begin,
_RAIter __end,
_Op __o,
_Fu & __f,
_Red __r,
_Result __base,
_Result & __output,
typename std::iterator_traits< _RAIter >::difference_type __bound)
Embarrassingly parallel algorithm for random access iterators, using an OpenMP for loop.
Parameters
Generated by Doxygen
430
Returns
References min().
Referenced by __for_each_template_random_access().
__for_each_template_random_access_omp_loop_static()
template<typename _RAIter , typename _Op , typename _Fu , typename _Red , typename _Result >
_Op __gnu_parallel::__for_each_template_random_access_omp_loop_static (
_RAIter __begin,
_RAIter __end,
_Op __o,
_Fu & __f,
_Red __r,
_Result __base,
_Result & __output,
typename std::iterator_traits< _RAIter >::difference_type __bound)
Embarrassingly parallel algorithm for random access iterators, using an OpenMP for loop with static scheduling.
Parameters
Returns
References std::min().
__for_each_template_random_access_workstealing()
template<typename _RAIter , typename _Op , typename _Fu , typename _Red , typename _Result >
_Op __gnu_parallel::__for_each_template_random_access_workstealing (
_RAIter __begin,
_RAIter __end,
_Op __op,
_Fu & __f,
_Red __r,
_Result __base,
_Result & __output,
typename std::iterator_traits< _RAIter >::difference_type __bound)
Work stealing algorithm for random access iterators.
Uses O(1) additional memory. Synchronization at job lists is done with atomic operations.
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 431
Parameters
Returns
__is_sorted()
Parameters
Returns
__median_of_three_iterators()
Generated by Doxygen
432
Parameters
__a First iterator.
__b Second iterator.
__c Third iterator.
__comp Comparator.
Referenced by __qsb_divide().
__merge_advance()
Parameters
Returns
__merge_advance_movc()
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 433
_DifferenceTp __max_length,
_Compare __comp)
Merge routine being able to merge only the __max_length smallest elements.
The __begin iterators are advanced accordingly, they might not reach __end, in contrast to the usual variant. Spe-
cially designed code should allow the compiler to generate conditional moves instead of branches.
Parameters
Returns
Referenced by __merge_advance().
__merge_advance_usual()
Parameters
Returns
Generated by Doxygen
434
__parallel_merge_advance() [1/2]
Parameters
Returns
__parallel_merge_advance() [2/2]
Parameters
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 435
Returns
References __merge_advance().
__parallel_nth_element()
Parameters
__parallel_partial_sort()
Parameters
References __parallel_nth_element().
__parallel_partial_sum()
Generated by Doxygen
436
_IIter __end,
_OutputIterator __result,
_BinaryOperation __bin_op)
Parallel partial sum front-__end.
Parameters
Returns
__parallel_partial_sum_basecase()
Parameters
Returns
Referenced by __parallel_partial_sum_linear().
__parallel_partial_sum_linear()
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 437
Parameters
Returns
__parallel_partition()
Parameters
Returns
__parallel_random_shuffle()
Parameters
Generated by Doxygen
438
References __parallel_random_shuffle_drs().
__parallel_random_shuffle_drs()
Parameters
__parallel_random_shuffle_drs_pu()
Parameters
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 439
__parallel_sort() [1/7]
Parameters
Template Parameters
std::make_pair std::forward
__gnu_parallel::parallel
_tag::__get_num_threads std::min
__gnu_parallel::__yield
__gnu_parallel::__parallel_sort
__gnu_parallel::__parallel __gnu_parallel::__qsb __gnu_parallel::__qsb
__gnu_parallel::_Settings::get
_sort_qsb _conquer _local_sort_with_helping
__gnu_parallel::__median __gnu_parallel::__compare
__gnu_parallel::__rd_log2 __gnu_parallel::__qsb
_of_three_iterators _and_swap
_divide
__gnu_parallel::__parallel __gnu_parallel::__fetch
_partition _and_add
std::max
__parallel_sort() [2/7]
Parameters
Generated by Doxygen
440
Template Parameters
__gnu_parallel::parallel
__gnu_parallel::__parallel_sort
_tag::__get_num_threads
__parallel_sort() [3/7]
Parameters
Template Parameters
__gnu_parallel::parallel
_tag::__get_num_threads
__gnu_parallel::__parallel_sort __gnu_parallel::_Settings::get
__gnu_parallel::parallel
_sort_mwms
__gnu_parallel::parallel std::make_pair std::forward
_sort_mwms_pu
std::uninitialized_copy std::to_address
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 441
__parallel_sort() [4/7]
Parameters
Template Parameters
__gnu_parallel::parallel
_tag::__get_num_threads
__gnu_parallel::__parallel_sort __gnu_parallel::_Settings::get
__gnu_parallel::parallel
_sort_mwms
__gnu_parallel::parallel std::make_pair std::forward
_sort_mwms_pu
std::uninitialized_copy std::to_address
__parallel_sort() [5/7]
Parameters
Template Parameters
Generated by Doxygen
442
__gnu_parallel::parallel
_tag::__get_num_threads
__gnu_parallel::__parallel_sort
__gnu_parallel::parallel __gnu_parallel::_Settings::get
_sort_mwms
std::uninitialized_copy std::to_address
__parallel_sort() [6/7]
Parameters
Template Parameters
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 443
std::min
__gnu_parallel::__compare
__gnu_parallel::parallel _and_swap
_tag::__get_num_threads __gnu_parallel::__parallel __gnu_parallel::__parallel
_sort_qs_divide _partition
__gnu_parallel::__fetch
__gnu_parallel::__parallel __gnu_parallel::__parallel _and_add
_sort_qs _sort_qs_conquer
__gnu_parallel::__parallel_sort
std::max
__gnu_parallel::__median
_of_three_iterators
__gnu_parallel::__qsb __gnu_parallel::__qsb __gnu_parallel::_Settings::get
_conquer _divide
__gnu_parallel::__parallel
_sort_qsb
__gnu_parallel::__qsb
_local_sort_with_helping __gnu_parallel::__yield
std::make_pair std::forward
__gnu_parallel::__rd_log2
__gnu_parallel::parallel __gnu_parallel::parallel
_sort_mwms _sort_mwms_pu
std::uninitialized_copy std::to_address
__parallel_sort() [7/7]
Parameters
Template Parameters
__gnu_parallel::__compare
_and_swap
__gnu_parallel::__parallel __gnu_parallel::__fetch
__gnu_parallel::parallel _partition _and_add
_tag::__get_num_threads
__gnu_parallel::__parallel_sort __gnu_parallel::__parallel
_sort_qs_divide std::min std::max
__gnu_parallel::__parallel __gnu_parallel::__parallel
_sort_qs _sort_qs_conquer
__gnu_parallel::_Settings::get
Generated by Doxygen
444
__parallel_sort_qs()
Parameters
__parallel_sort_qs_conquer()
Parameters
__parallel_sort_qs_divide()
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 445
Parameters
__parallel_sort_qsb()
Parameters
__parallel_unique_copy() [1/2]
Parameters
Returns
References __parallel_unique_copy().
Generated by Doxygen
446
__parallel_unique_copy() [2/2]
Parameters
Returns
__qsb_conquer()
Parameters
__qsb_divide()
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 447
_RAIter __begin,
_RAIter __end,
_Compare __comp,
_ThreadIndex __num_threads)
Balanced quicksort divide step.
Parameters
Precondition
(__end-__begin)>=1
__qsb_local_sort_with_helping()
Parameters
__random_number_pow2()
Parameters
Generated by Doxygen
448
__rd_log2()
Parameters
_←- Argument.
_n
Returns
__round_up_to_pow2()
Parameters
_←- _Integer to round up
_x
References __rd_log2().
Referenced by __parallel_random_shuffle_drs(), __sequential_random_shuffle(), and multiseq_selection().
__search_template()
Parameters
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 449
Parameters
Returns
__sequential_multiway_merge()
Parameters
Returns
__sequential_random_shuffle()
Generated by Doxygen
450
Parameters
__shrink()
Parameters
__shrink_and_double()
Parameters
References __shrink(), std::vector< _Tp, _Alloc >::resize(), and std::vector< _Tp, _Alloc >::size().
Referenced by list_partition().
__yield()
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 451
list_partition()
Parameters
Returns
max()
min()
Generated by Doxygen
452
multiseq_partition()
Parameters
multiseq_selection()
Parameters
References __rd_log2(), __round_up_to_pow2(), _GLIBCXX_CALL, std::distance(), std::priority_queue< _Tp, _Sequence, _Compare >::
std::make_pair(), std::max(), std::min(), std::priority_queue< _Tp, _Sequence, _Compare >::pop(), std::priority_queue< _Tp, _Sequence
and std::priority_queue< _Tp, _Sequence, _Compare >::top().
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 453
multiway_merge()
• not stable
Example:
int sequences[10][10];
for (int __i = 0; __i < 10; ++__i)
for (int __j = 0; __i < 10; ++__j)
sequences[__i][__j] = __j;
int __out[33];
std::vector<std::pair<int*> > seqs;
for (int __i = 0; __i < 10; ++__i)
{ seqs.push(std::make_pair<int*>(sequences[__i],
sequences[__i] + 10)) }
See also
stable_multiway_merge
Precondition
Postcondition
[__target, return __value) contains merged __elements from the input sequences.
return __value - __target = min(__length, number of elements in all sequences).
Generated by Doxygen
454
Template Parameters
Parameters
Returns
multiway_merge_3_variant()
template<template< typename _RAI, typename _Cp > class iterator, typename _RAIterIterator , typename
_RAIter3 , typename _DifferenceTp , typename _Compare >
_RAIter3 __gnu_parallel::multiway_merge_3_variant (
_RAIterIterator __seqs_begin,
_RAIterIterator __seqs_end,
_RAIter3 __target,
_DifferenceTp __length,
_Compare __comp)
Highly efficient 3-way merging procedure.
Merging is done with the algorithm implementation described by Peter Sanders. Basically, the idea is to minimize the
number of necessary comparison after merging an element. The implementation trick that makes this fast is that the
order of the sequences is stored in the instruction pointer (translated into labels in C++).
This works well for merging up to 4 sequences.
Note that making the merging stable does not come at a performance hit.
Whether the merging is done guarded or unguarded is selected by the used iterator class.
Parameters
Returns
References _GLIBCXX_CALL.
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 455
multiway_merge_4_variant()
template<template< typename _RAI, typename _Cp > class iterator, typename _RAIterIterator , typename
_RAIter3 , typename _DifferenceTp , typename _Compare >
_RAIter3 __gnu_parallel::multiway_merge_4_variant (
_RAIterIterator __seqs_begin,
_RAIterIterator __seqs_end,
_RAIter3 __target,
_DifferenceTp __length,
_Compare __comp)
Highly efficient 4-way merging procedure.
Merging is done with the algorithm implementation described by Peter Sanders. Basically, the idea is to minimize the
number of necessary comparison after merging an element. The implementation trick that makes this fast is that the
order of the sequences is stored in the instruction pointer (translated into goto labels in C++).
This works well for merging up to 4 sequences.
Note that making the merging stable does not come at a performance hit.
Whether the merging is done guarded or unguarded is selected by the used iterator class.
Parameters
Returns
References _GLIBCXX_CALL.
multiway_merge_exact_splitting()
multiway_merge_loser_tree()
Generated by Doxygen
456
_RAIterIterator __seqs_end,
_RAIter3 __target,
_DifferenceTp __length,
_Compare __comp)
Multi-way merging procedure for a high branching factor, guarded case.
This merging variant uses a LoserTree class as selected by _LT.
Stability is selected through the used LoserTree class _LT.
At least one non-empty sequence is required.
Parameters
Returns
multiway_merge_loser_tree_sentinel()
Template Parameters
Parameters
Returns
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 457
multiway_merge_loser_tree_unguarded()
Precondition
Parameters
Returns
References _GLIBCXX_CALL.
Referenced by multiway_merge_loser_tree_sentinel().
multiway_merge_sampling_splitting()
multiway_merge_sentinels()
Generated by Doxygen
458
_RAIterPairIterator __seqs_end,
_RAIterOut __target,
_DifferenceTp __length,
_Compare __comp,
__gnu_parallel::sequential_tag )
Multiway Merge Frontend.
Merge the sequences specified by seqs_begin and __seqs_end into __target. __seqs_begin and __seqs_end must
point to a sequence of pairs. These pairs must contain an iterator to the beginning of a sequence in their first entry and
an iterator the _M_end of the same sequence in their second entry.
Ties are broken arbitrarily. See stable_multiway_merge for a variant that breaks ties by sequence number but is slower.
The first entries of the pairs (i.e. the begin iterators) will be moved forward accordingly.
The output sequence has to provide enough space for all elements that are written to it.
This function will merge the input sequences:
• not stable
• using sentinels
You have to take care that the element the _M_end iterator points to is readable and contains a value that is greater
than any other non-sentinel value in all sequences.
Example:
int sequences[10][11];
for (int __i = 0; __i < 10; ++__i)
for (int __j = 0; __i < 11; ++__j)
sequences[__i][__j] = __j; // __last one is sentinel!
int __out[33];
std::vector<std::pair<int*> > seqs;
for (int __i = 0; __i < 10; ++__i)
{ seqs.push(std::make_pair<int*>(sequences[__i],
sequences[__i] + 10)) }
Precondition
Postcondition
[__target, return __value) contains merged __elements from the input sequences.
return __value - __target = min(__length, number of elements in all sequences).
See also
stable_multiway_merge_sentinels
Generated by Doxygen
4.6 __gnu_parallel Namespace Reference 459
Template Parameters
Parameters
Returns
parallel_multiway_merge()
Template Parameters
Parameters
Generated by Doxygen
460
Returns
parallel_sort_mwms()
Parameters
parallel_sort_mwms_pu()
Parameters
__sd Pointer to algorithm data.
__comp Comparator.
_CASable_bits
Generated by Doxygen
4.7 __gnu_pbds Namespace Reference 461
_CASable_mask
• struct associative_tag
• class basic_branch
• struct basic_branch_tag
• class basic_hash_table
• struct basic_hash_tag
• struct basic_invalidation_guarantee
• struct binary_heap_tag
• struct binomial_heap_tag
• class cc_hash_max_collision_check_resize_trigger
• class cc_hash_table
• struct cc_hash_tag
• struct container_error
• struct container_tag
• struct container_traits
• struct container_traits_base
• struct container_traits_base< binary_heap_tag >
• struct container_traits_base< binomial_heap_tag >
• struct container_traits_base< cc_hash_tag >
• struct container_traits_base< gp_hash_tag >
• struct container_traits_base< list_update_tag >
• struct container_traits_base< ov_tree_tag >
• struct container_traits_base< pairing_heap_tag >
• struct container_traits_base< pat_trie_tag >
• struct container_traits_base< rb_tree_tag >
• struct container_traits_base< rc_binomial_heap_tag >
• struct container_traits_base< splay_tree_tag >
• struct container_traits_base< thin_heap_tag >
• class direct_mask_range_hashing
• class direct_mod_range_hashing
• class gp_hash_table
• struct gp_hash_tag
• class hash_exponential_size_policy
• class hash_load_check_resize_trigger
• class hash_prime_size_policy
• class hash_standard_resize_policy
• struct insert_error
• struct join_error
• class linear_probe_fn
• class list_update
Generated by Doxygen
462
• struct list_update_tag
• class lu_counter_policy
• class lu_move_to_front_policy
• struct null_node_update
• struct null_type
• struct ov_tree_tag
• struct pairing_heap_tag
• struct pat_trie_tag
• struct point_invalidation_guarantee
• class priority_queue
• struct priority_queue_tag
• class quadratic_probe_fn
• struct range_invalidation_guarantee
• struct rb_tree_tag
• struct rc_binomial_heap_tag
• struct resize_error
• class sample_probe_fn
• class sample_range_hashing
• class sample_ranged_hash_fn
• class sample_ranged_probe_fn
• class sample_resize_policy
• class sample_resize_trigger
• class sample_size_policy
• class sample_tree_node_update
• struct sample_trie_access_traits
• class sample_trie_node_update
• struct sample_update_policy
• struct sequence_tag
• struct splay_tree_tag
• struct string_tag
• struct thin_heap_tag
• class tree
• class tree_order_statistics_node_update
• struct tree_tag
• class trie
• class trie_order_statistics_node_update
• class trie_prefix_search_node_update
• struct trie_string_access_traits
• struct trie_tag
• struct trivial_iterator_tag
Typedefs
Functions
• void __throw_container_error ()
• void __throw_insert_error ()
• void __throw_join_error ()
• void __throw_resize_error ()
Generated by Doxygen
4.8 __gnu_sequential Namespace Reference 463
The cross-vendor C++ Application Binary Interface. A namespace alias to __cxxabiv1, but user programs should use
the alias 'abi'.
A brief overview of an ABI is given in the libstdc++ FAQ, question 5.8 (you may have a copy of the FAQ locally, or you
can view the online version at http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#5_8 ).
GCC subscribes to a cross-vendor ABI for C++, sometimes called the IA64 ABI because it happens to be the native
ABI for that platform. It is summarized at http://www.codesourcery.com/cxx-abi/ along with the current
specification.
For users of GCC greater than or equal to 3.x, entry points are available in <cxxabi.h>, which notes, 'It is not normally
necessary for user programs to include this header, or use the entry points directly. However, this header is available
should that be needed.'
• namespace __debug
• namespace __detail
• namespace __parallel
• namespace chrono
• namespace decimal
• namespace experimental
• namespace filesystem
• namespace literals
• namespace placeholders
• namespace regex_constants
• namespace rel_ops
• namespace this_thread
• namespace tr1
• namespace tr2
Classes
• class __basic_future
• class __codecvt_abstract_base
• class __ctype_abstract_base
• struct __is_fast_hash
• struct __is_location_invariant
• class __new_allocator
• struct __numeric_limits_base
• struct _Base_bitset
Generated by Doxygen
464
Generated by Doxygen
4.10 std Namespace Reference 465
Generated by Doxygen
466
Generated by Doxygen
4.10 std Namespace Reference 467
• class error_code
• class error_condition
• class exception
• class exponential_distribution
• struct extent
• class extreme_value_distribution
• class fisher_f_distribution
• struct forward_iterator_tag
• class forward_list
• class fpos
• struct from_chars_result
• class front_insert_iterator
• class function< _Res(_ArgTypes...)>
• class future
• class future< _Res & >
• class future< void >
• class future_error
• class gamma_distribution
• class geometric_distribution
• struct greater
• struct greater< void >
• struct greater_equal
• struct greater_equal< void >
• class gslice
• class gslice_array
• struct has_virtual_destructor
• struct hash
• struct hash< __debug::bitset< _Nb > >
• struct hash< __debug::vector< bool, _Alloc > >
• struct hash< __gnu_cxx::__u16vstring >
• struct hash< __gnu_cxx::__u32vstring >
• struct hash< __gnu_cxx::__vstring >
• struct hash< __gnu_cxx::__wvstring >
• struct hash< __gnu_cxx::throw_value_limit >
• struct hash< __gnu_cxx::throw_value_random >
• struct hash< __gnu_debug::basic_string< _CharT > >
• struct hash< __shared_ptr< _Tp, _Lp > >
• struct hash< _Tp ∗ >
• struct hash< basic_string< char, char_traits< char >, _Alloc > >
• struct hash< basic_string< char16_t, char_traits< char16_t >, _Alloc > >
• struct hash< basic_string< char32_t, char_traits< char32_t >, _Alloc > >
• struct hash< basic_string< wchar_t, char_traits< wchar_t >, _Alloc > >
• struct hash< bool >
• struct hash< char >
• struct hash< char16_t >
• struct hash< char32_t >
• struct hash< double >
• struct hash< error_code >
• struct hash< error_condition >
• struct hash< experimental::optional< _Tp > >
• struct hash< experimental::shared_ptr< _Tp > >
Generated by Doxygen
468
Generated by Doxygen
4.10 std Namespace Reference 469
• struct is_empty
• struct is_enum
• struct is_error_code_enum
• struct is_error_code_enum< future_errc >
• struct is_error_condition_enum
• struct is_floating_point
• struct is_function
• struct is_fundamental
• struct is_integral
• struct is_layout_compatible
• struct is_literal_type
• struct is_lvalue_reference
• struct is_member_function_pointer
• struct is_member_object_pointer
• struct is_member_pointer
• struct is_move_assignable
• struct is_move_constructible
• struct is_nothrow_assignable
• struct is_nothrow_constructible
• struct is_nothrow_copy_assignable
• struct is_nothrow_copy_constructible
• struct is_nothrow_default_constructible
• struct is_nothrow_destructible
• struct is_nothrow_move_assignable
• struct is_nothrow_move_constructible
• struct is_object
• struct is_placeholder
• struct is_placeholder< _Placeholder< _Num > >
• struct is_pod
• struct is_pointer
• struct is_pointer_interconvertible_base_of
• struct is_polymorphic
• struct is_reference
• struct is_rvalue_reference
• struct is_same
• struct is_scalar
• struct is_signed
• struct is_standard_layout
• struct is_trivial
• struct is_trivially_assignable
• struct is_trivially_constructible
• struct is_trivially_copy_assignable
• struct is_trivially_copy_constructible
• struct is_trivially_copyable
• struct is_trivially_default_constructible
• struct is_trivially_destructible
• struct is_trivially_move_assignable
• struct is_trivially_move_constructible
• struct is_union
• struct is_unsigned
• struct is_void
Generated by Doxygen
470
• struct is_volatile
• class istream_iterator
• class istreambuf_iterator
• struct iterator
• struct iterator_traits
• struct iterator_traits< _Tp ∗ >
• class length_error
• struct less
• struct less< void >
• struct less_equal
• struct less_equal< void >
• class linear_congruential_engine
• class list
• class locale
• class lock_guard
• class logic_error
• struct logical_and
• struct logical_and< void >
• struct logical_not
• struct logical_not< void >
• struct logical_or
• struct logical_or< void >
• class lognormal_distribution
• struct make_signed
• struct make_unsigned
• class map
• class mask_array
• class match_results
• class mem_fun1_ref_t
• class mem_fun1_t
• class mem_fun_ref_t
• class mem_fun_t
• class mersenne_twister_engine
• class messages
• struct messages_base
• class messages_byname
• struct minus
• struct minus< void >
• struct modulus
• struct modulus< void >
• class money_base
• class money_get
• class money_put
• class moneypunct
• class moneypunct_byname
• class move_iterator
• class move_only_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>
• class move_sentinel
• class multimap
• struct multiplies
• struct multiplies< void >
Generated by Doxygen
4.10 std Namespace Reference 471
• class multiset
• class mutex
• struct negate
• struct negate< void >
• class negative_binomial_distribution
• class nested_exception
• class normal_distribution
• struct nostopstate_t
• struct not_equal_to
• struct not_equal_to< void >
• class num_get
• class num_put
• struct numeric_limits
• struct numeric_limits< bool >
• struct numeric_limits< char >
• struct numeric_limits< char16_t >
• struct numeric_limits< char32_t >
• struct numeric_limits< double >
• struct numeric_limits< float >
• struct numeric_limits< int >
• struct numeric_limits< long >
• struct numeric_limits< long double >
• struct numeric_limits< long long >
• struct numeric_limits< short >
• struct numeric_limits< signed char >
• struct numeric_limits< unsigned char >
• struct numeric_limits< unsigned int >
• struct numeric_limits< unsigned long >
• struct numeric_limits< unsigned long long >
• struct numeric_limits< unsigned short >
• struct numeric_limits< wchar_t >
• class numpunct
• class numpunct_byname
• struct once_flag
• class ostream_iterator
• class ostreambuf_iterator
• class out_of_range
• struct output_iterator_tag
• class overflow_error
• struct owner_less
• struct owner_less< shared_ptr< _Tp > >
• struct owner_less< void >
• struct owner_less< weak_ptr< _Tp > >
• class packaged_task< _Res(_ArgTypes...)>
• struct pair
• class piecewise_constant_distribution
• struct piecewise_construct_t
• class piecewise_linear_distribution
• struct plus
• class pointer_to_binary_function
• class pointer_to_unary_function
Generated by Doxygen
472
• struct pointer_traits
• struct pointer_traits< _Tp ∗ >
• class poisson_distribution
• class priority_queue
• class promise
• class promise< _Res & >
• class promise< void >
• class queue
• struct random_access_iterator_tag
• class random_device
• class range_error
• struct rank
• struct ratio
• struct ratio_equal
• struct ratio_greater
• struct ratio_greater_equal
• struct ratio_less
• struct ratio_less_equal
• struct ratio_not_equal
• class raw_storage_iterator
• class recursive_mutex
• class recursive_timed_mutex
• class reference_wrapper
• class regex_error
• class regex_iterator
• class regex_token_iterator
• class regex_traits
• struct remove_all_extents
• struct remove_const
• struct remove_cv
• struct remove_extent
• struct remove_pointer
• struct remove_reference
• struct remove_volatile
• struct result_of
• class reverse_iterator
• class runtime_error
• class scoped_allocator_adaptor
• class seed_seq
• class set
• class shared_future
• class shared_future< _Res & >
• class shared_future< void >
• class shared_lock
• class shared_ptr
• class shared_timed_mutex
• class shuffle_order_engine
• class slice
• class slice_array
• class stack
• class stop_callback
Generated by Doxygen
4.10 std Namespace Reference 473
• class stop_source
• class stop_token
• class student_t_distribution
• class sub_match
• class subtract_with_carry_engine
• class system_error
• class thread
• class time_base
• class time_get
• class time_get_byname
• class time_put
• class time_put_byname
• class timed_mutex
• struct to_chars_result
• struct try_to_lock_t
• class tuple
• class tuple< _T1, _T2 >
• struct tuple_element
• struct tuple_element< 0, pair< _Tp1, _Tp2 > >
• struct tuple_element< 1, pair< _Tp1, _Tp2 > >
• struct tuple_element< __i, tuple< _Types... > >
• struct tuple_element< _Ind, array< _Tp, _Nm > >
• struct tuple_size
• struct tuple_size< array< _Tp, _Nm > >
• struct tuple_size< pair< _Tp1, _Tp2 > >
• struct tuple_size< tuple< _Elements... > >
• struct type_index
• class type_info
• struct unary_function
• class unary_negate
• class underflow_error
• struct underlying_type
• class uniform_int_distribution
• class uniform_real_distribution
• class unique_lock
• class unique_ptr
• class unique_ptr< _Tp[ ], _Dp >
• class unordered_map
• class unordered_multimap
• class unordered_multiset
• class unordered_set
• struct uses_allocator
• struct uses_allocator< tuple< _Types... >, _Alloc >
• class valarray
• class vector
• class vector< bool, _Alloc >
• class wbuffer_convert
• class weak_ptr
• class weibull_distribution
• class wstring_convert
Generated by Doxygen
474
Typedefs
Generated by Doxygen
4.10 std Namespace Reference 475
• template<bool _Cache>
using __umset_traits
• template<typename _Value , typename _Hash = hash<_Value>, typename _Pred = std::equal_to<_Value>, typename _Alloc = std←-
::allocator<_Value>, typename _Tr = __uset_traits<__cache_default<_Value, _Hash>::value>>
using __uset_hashtable
• template<bool _Cache>
using __uset_traits
• typedef unsigned long _Bit_type
• template<typename _Path , typename _Result = _Path, typename _Path2 = decltype(std::declval<_Path&>().make_preferred().←-
filename())>
using _If_fs_path
• template<typename _InIter >
using _RequireInputIter
• template<typename _Tp >
using add_lvalue_reference_t
• template<typename _Tp >
using add_pointer_t
• template<typename _Tp >
using add_rvalue_reference_t
• template<size_t _Len, size_t _Align = __aligned_storage_default_alignment(_Len)>
using aligned_storage_t
• template<size_t _Len, typename... _Types>
using aligned_union_t
• typedef atomic< bool > atomic_bool
• typedef atomic< char > atomic_char
• typedef atomic< char16_t > atomic_char16_t
• typedef atomic< char32_t > atomic_char32_t
• typedef atomic< int > atomic_int
• typedef atomic< int16_t > atomic_int16_t
• typedef atomic< int32_t > atomic_int32_t
• typedef atomic< int64_t > atomic_int64_t
• typedef atomic< int8_t > atomic_int8_t
• typedef atomic< int_fast16_t > atomic_int_fast16_t
• typedef atomic< int_fast32_t > atomic_int_fast32_t
• typedef atomic< int_fast64_t > atomic_int_fast64_t
• typedef atomic< int_fast8_t > atomic_int_fast8_t
• typedef atomic< int_least16_t > atomic_int_least16_t
• typedef atomic< int_least32_t > atomic_int_least32_t
• typedef atomic< int_least64_t > atomic_int_least64_t
• typedef atomic< int_least8_t > atomic_int_least8_t
• typedef atomic< intmax_t > atomic_intmax_t
• typedef atomic< intptr_t > atomic_intptr_t
• typedef atomic< long long > atomic_llong
• typedef atomic< long > atomic_long
• typedef atomic< ptrdiff_t > atomic_ptrdiff_t
• typedef atomic< signed char > atomic_schar
• typedef atomic< short > atomic_short
• typedef atomic< size_t > atomic_size_t
• typedef atomic< unsigned char > atomic_uchar
• typedef atomic< unsigned int > atomic_uint
• typedef atomic< uint16_t > atomic_uint16_t
Generated by Doxygen
476
Generated by Doxygen
4.10 std Namespace Reference 477
Generated by Doxygen
478
Generated by Doxygen
4.10 std Namespace Reference 479
Enumerations
• enum { _S_chunk_size }
• enum { _S_word_bit }
• enum _Ios_Fmtflags {
_S_boolalpha , _S_dec , _S_fixed , _S_hex ,
_S_internal , _S_left , _S_oct , _S_right ,
_S_scientific , _S_showbase , _S_showpoint , _S_showpos ,
_S_skipws , _S_unitbuf , _S_uppercase , _S_adjustfield ,
_S_basefield , _S_floatfield , _S_ios_fmtflags_end , _S_ios_fmtflags_max ,
_S_ios_fmtflags_min }
• enum _Ios_Iostate {
_S_goodbit , _S_badbit , _S_eofbit , _S_failbit ,
_S_ios_iostate_end , _S_ios_iostate_max , _S_ios_iostate_min }
• enum _Ios_Openmode {
_S_app , _S_ate , _S_bin , _S_in ,
_S_out , _S_trunc , _S_noreplace , _S_ios_openmode_end ,
_S_ios_openmode_max , _S_ios_openmode_min }
• enum _Ios_Seekdir { _S_beg , _S_cur , _S_end , _S_ios_seekdir_end }
• enum _Manager_operation { __get_type_info , __get_functor_ptr , __clone_functor , __destroy_functor }
• enum _Rb_tree_color { _S_red , _S_black }
• enum class align_val_t : size_t
• enum class chars_format { scientific , fixed , hex , general }
• enum codecvt_mode { consume_header , generate_header , little_endian }
• enum class cv_status { no_timeout , timeout }
• enum class errc {
address_family_not_supported , address_in_use , address_not_available , already_connected ,
argument_list_too_long , argument_out_of_domain , bad_address , bad_file_descriptor ,
broken_pipe , connection_aborted , connection_already_in_progress , connection_refused ,
connection_reset , cross_device_link , destination_address_required , device_or_resource_busy ,
directory_not_empty , executable_format_error , file_exists , file_too_large ,
filename_too_long , function_not_supported , host_unreachable , illegal_byte_sequence ,
inappropriate_io_control_operation , interrupted , invalid_argument , invalid_seek ,
io_error , is_a_directory , message_size , network_down ,
network_reset , network_unreachable , no_buffer_space , no_child_process ,
no_lock_available , no_message , no_protocol_option , no_space_on_device ,
no_such_device_or_address , no_such_device , no_such_file_or_directory , no_such_process ,
not_a_directory , not_a_socket , not_connected , not_enough_memory ,
operation_in_progress , operation_not_permitted , operation_not_supported , operation_would_block ,
permission_denied , protocol_not_supported , read_only_file_system , resource_deadlock_would_occur
,
resource_unavailable_try_again , result_out_of_range , timed_out , too_many_files_open_in_system ,
too_many_files_open , too_many_links , too_many_symbolic_link_levels , wrong_protocol_type }
• enum float_denorm_style { denorm_indeterminate , denorm_absent , denorm_present }
• enum float_round_style {
round_indeterminate , round_toward_zero , round_to_nearest , round_toward_infinity ,
round_toward_neg_infinity }
Generated by Doxygen
480
Functions
Generated by Doxygen
4.10 std Namespace Reference 481
Generated by Doxygen
482
Generated by Doxygen
4.10 std Namespace Reference 483
Generated by Doxygen
484
Generated by Doxygen
4.10 std Namespace Reference 485
Generated by Doxygen
486
Generated by Doxygen
4.10 std Namespace Reference 487
Generated by Doxygen
488
Generated by Doxygen
4.10 std Namespace Reference 489
Generated by Doxygen
490
Generated by Doxygen
4.10 std Namespace Reference 491
• template<typename _ForwardIterator , typename _OutputIterator , typename _Cat , typename _Size , typename _UniformRandomBit←-
Generator >
_OutputIterator __sample (_ForwardIterator __first, _ForwardIterator __last, forward_iterator_tag, _OutputIterator
__out, _Cat, _Size __n, _UniformRandomBitGenerator &&__g)
• template<typename _InputIterator , typename _RandomAccessIterator , typename _Size , typename _UniformRandomBitGenerator >
_RandomAccessIterator __sample (_InputIterator __first, _InputIterator __last, input_iterator_tag, _Random←-
AccessIterator __out, random_access_iterator_tag, _Size __n, _UniformRandomBitGenerator &&__g)
• template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate >
constexpr _ForwardIterator1 __search (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2
__first2, _ForwardIterator2 __last2, _BinaryPredicate __predicate)
• template<typename _ForwardIterator , typename _Integer , typename _UnaryPredicate >
constexpr _ForwardIterator __search_n (_ForwardIterator __first, _ForwardIterator __last, _Integer __count, _←-
UnaryPredicate __unary_pred)
• template<typename _ForwardIterator , typename _Integer , typename _UnaryPredicate >
constexpr _ForwardIterator __search_n_aux (_ForwardIterator __first, _ForwardIterator __last, _Integer __count,
_UnaryPredicate __unary_pred, std::forward_iterator_tag)
• template<typename _RandomAccessIter , typename _Integer , typename _UnaryPredicate >
constexpr _RandomAccessIter __search_n_aux (_RandomAccessIter __first, _RandomAccessIter __last, _←-
Integer __count, _UnaryPredicate __unary_pred, std::random_access_iterator_tag)
• template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Compare >
constexpr _OutputIterator __set_difference (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 _←-
_first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
• template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Compare >
constexpr _OutputIterator __set_intersection (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2
__first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
• template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Compare >
constexpr _OutputIterator __set_symmetric_difference (_InputIterator1 __first1, _InputIterator1 __last1, _←-
InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
• template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Compare >
constexpr _OutputIterator __set_union (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2,
_InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
• template<typename _Tp >
_Tp ∗ __shared_ptr_deref (_Tp ∗__p)
• constexpr long long __size_to_integer (double __n)
• constexpr long long __size_to_integer (float __n)
• constexpr int __size_to_integer (int __n)
• constexpr long __size_to_integer (long __n)
• constexpr long long __size_to_integer (long double __n)
• constexpr long long __size_to_integer (long long __n)
• constexpr unsigned __size_to_integer (unsigned __n)
• constexpr unsigned long __size_to_integer (unsigned long __n)
• constexpr unsigned long long __size_to_integer (unsigned long long __n)
• template<typename _RandomAccessIterator , typename _Compare >
constexpr void __sort_heap (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare &__←-
comp)
• template<typename _ForwardIterator , typename _Predicate >
_ForwardIterator __stable_partition (_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
• template<typename _ForwardIterator , typename _Pointer , typename _Predicate , typename _Distance >
_ForwardIterator __stable_partition_adaptive (_ForwardIterator __first, _ForwardIterator __last, _Predicate __←-
pred, _Distance __len, _Pointer __buffer, _Distance __buffer_size)
• template<typename _RandomAccessIterator , typename _Compare >
void __stable_sort (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
Generated by Doxygen
492
Generated by Doxygen
4.10 std Namespace Reference 493
Generated by Doxygen
494
Generated by Doxygen
4.10 std Namespace Reference 495
Generated by Doxygen
496
Generated by Doxygen
4.10 std Namespace Reference 497
Generated by Doxygen
498
Generated by Doxygen
4.10 std Namespace Reference 499
Generated by Doxygen
500
Generated by Doxygen
4.10 std Namespace Reference 501
Generated by Doxygen
502
Generated by Doxygen
4.10 std Namespace Reference 503
Generated by Doxygen
504
Generated by Doxygen
4.10 std Namespace Reference 505
Generated by Doxygen
506
Generated by Doxygen
4.10 std Namespace Reference 507
Generated by Doxygen
508
Generated by Doxygen
4.10 std Namespace Reference 509
Generated by Doxygen
510
Generated by Doxygen
4.10 std Namespace Reference 511
Generated by Doxygen
512
• template<typename _Key , typename _Tp , typename _Compare , typename _Alloc , typename _Predicate >
multimap< _Key, _Tp, _Compare, _Alloc >::size_type erase_if (multimap< _Key, _Tp, _Compare, _Alloc >
&__cont, _Predicate __pred)
• template<typename _Key , typename _Compare , typename _Alloc , typename _Predicate >
multiset< _Key, _Compare, _Alloc >::size_type erase_if (multiset< _Key, _Compare, _Alloc > &__cont, _←-
Predicate __pred)
• template<typename _Key , typename _Compare , typename _Alloc , typename _Predicate >
set< _Key, _Compare, _Alloc >::size_type erase_if (set< _Key, _Compare, _Alloc > &__cont, _Predicate __←-
pred)
• template<typename _Key , typename _Tp , typename _Hash , typename _CPred , typename _Alloc , typename _Predicate >
unordered_map< _Key, _Tp, _Hash, _CPred, _Alloc >::size_type erase_if (unordered_map< _Key, _Tp, _Hash,
_CPred, _Alloc > &__cont, _Predicate __pred)
• template<typename _Key , typename _Tp , typename _Hash , typename _CPred , typename _Alloc , typename _Predicate >
unordered_multimap< _Key, _Tp, _Hash, _CPred, _Alloc >::size_type erase_if (unordered_multimap< _Key,
_Tp, _Hash, _CPred, _Alloc > &__cont, _Predicate __pred)
• template<typename _Key , typename _Hash , typename _CPred , typename _Alloc , typename _Predicate >
unordered_multiset< _Key, _Hash, _CPred, _Alloc >::size_type erase_if (unordered_multiset< _Key, _Hash,
_CPred, _Alloc > &__cont, _Predicate __pred)
• template<typename _Key , typename _Hash , typename _CPred , typename _Alloc , typename _Predicate >
unordered_set< _Key, _Hash, _CPred, _Alloc >::size_type erase_if (unordered_set< _Key, _Hash, _CPred,
_Alloc > &__cont, _Predicate __pred)
• template<typename _Tp >
constexpr __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type erf (_Tp __x)
• constexpr float erf (float __x)
• constexpr long double erf (long double __x)
• template<typename _Tp >
constexpr __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type erfc (_Tp __x)
• constexpr float erfc (float __x)
• constexpr long double erfc (long double __x)
• template<typename _InputIterator , typename _OutputIterator , typename _Tp >
constexpr _OutputIterator exclusive_scan (_InputIterator __first, _InputIterator __last, _OutputIterator __result,
_Tp __init)
• template<typename _InputIterator , typename _OutputIterator , typename _Tp , typename _BinaryOperation >
constexpr _OutputIterator exclusive_scan (_InputIterator __first, _InputIterator __last, _OutputIterator __result,
_Tp __init, _BinaryOperation __binary_op)
• template<typename _Tp >
constexpr __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type exp (_Tp __x)
• template<class _Dom >
_Expr< _UnClos< struct std::_Exp, _Expr, _Dom >, typename _Dom::value_type > exp (const _Expr< _Dom,
typename _Dom::value_type > &__e)
• template<typename _Tp >
complex< _Tp > exp (const complex< _Tp > &)
• template<typename _Tp >
_Expr< _UnClos< struct std::_Exp, _ValArray, _Tp >, _Tp > exp (const valarray< _Tp > &__v)
• constexpr float exp (float __x)
• constexpr long double exp (long double __x)
• template<typename _Tp >
constexpr __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type exp2 (_Tp __x)
• constexpr float exp2 (float __x)
• constexpr long double exp2 (long double __x)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type expint (_Tp __x)
Generated by Doxygen
4.10 std Namespace Reference 513
Generated by Doxygen
514
Generated by Doxygen
4.10 std Namespace Reference 515
Generated by Doxygen
516
Generated by Doxygen
4.10 std Namespace Reference 517
Generated by Doxygen
518
Generated by Doxygen
4.10 std Namespace Reference 519
Generated by Doxygen
520
Generated by Doxygen
4.10 std Namespace Reference 521
Generated by Doxygen
522
Generated by Doxygen
4.10 std Namespace Reference 523
Generated by Doxygen
524
Generated by Doxygen
4.10 std Namespace Reference 525
Generated by Doxygen
526
Generated by Doxygen
4.10 std Namespace Reference 527
Generated by Doxygen
528
Generated by Doxygen
4.10 std Namespace Reference 529
Generated by Doxygen
530
Generated by Doxygen
4.10 std Namespace Reference 531
Generated by Doxygen
532
Generated by Doxygen
4.10 std Namespace Reference 533
Generated by Doxygen
534
Generated by Doxygen
4.10 std Namespace Reference 535
Generated by Doxygen
536
Generated by Doxygen
4.10 std Namespace Reference 537
Generated by Doxygen
538
Generated by Doxygen
4.10 std Namespace Reference 539
Generated by Doxygen
540
Generated by Doxygen
4.10 std Namespace Reference 541
Generated by Doxygen
542
Generated by Doxygen
4.10 std Namespace Reference 543
• template<typename _RandomNumberEngine , size_t __p, size_t __r, typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
discard_block_engine< _RandomNumberEngine, __p, __r > &__x)
• template<typename _IntType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
discrete_distribution< _IntType > &__x)
• template<typename _RealType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
fisher_f_distribution< _RealType > &__x)
• template<typename _RealType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
gamma_distribution< _RealType > &__x)
• template<typename _UIntType , _UIntType __a, _UIntType __c, _UIntType __m, typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
linear_congruential_engine< _UIntType, __a, __c, __m > &__lcr)
• template<typename _RealType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
lognormal_distribution< _RealType > &__x)
• template<typename _UIntType , size_t __w, size_t __n, size_t __m, size_t __r, _UIntType __a, size_t __u, _UIntType __d, size_t __s,
_UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f, typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >
&__x)
• template<typename _IntType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
negative_binomial_distribution< _IntType > &__x)
• template<typename _RealType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
normal_distribution< _RealType > &__x)
• template<typename _RealType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
piecewise_constant_distribution< _RealType > &__x)
• template<typename _RealType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
piecewise_linear_distribution< _RealType > &__x)
• template<typename _IntType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
poisson_distribution< _IntType > &__x)
• template<typename _RandomNumberEngine , size_t __k, typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
shuffle_order_engine< _RandomNumberEngine, __k > &__x)
• template<typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
std::bernoulli_distribution &__x)
• template<typename _RealType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
std::cauchy_distribution< _RealType > &__x)
• template<typename _RealType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
std::exponential_distribution< _RealType > &__x)
• template<typename _RealType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
std::extreme_value_distribution< _RealType > &__x)
Generated by Doxygen
544
Generated by Doxygen
4.10 std Namespace Reference 545
Generated by Doxygen
546
Generated by Doxygen
4.10 std Namespace Reference 547
Generated by Doxygen
548
Generated by Doxygen
4.10 std Namespace Reference 549
Generated by Doxygen
550
Generated by Doxygen
4.10 std Namespace Reference 551
Generated by Doxygen
552
Generated by Doxygen
4.10 std Namespace Reference 553
Generated by Doxygen
554
Generated by Doxygen
4.10 std Namespace Reference 555
Generated by Doxygen
556
• template<typename _Key , typename _Val , typename _KeyOfValue , typename _Compare , typename _Alloc >
void swap (_Rb_tree< _Key, _Val, _KeyOfValue, _Compare, _Alloc > &__x, _Rb_tree< _Key, _Val, _KeyOf←-
Value, _Compare, _Alloc > &__y)
• template<typename _Tp >
constexpr _Require< __not_< __is_tuple_like< _Tp > >, is_move_constructible< _Tp >, is_move_assignable<
_Tp > > swap (_Tp &, _Tp &) noexcept(__and_< is_nothrow_move_constructible< _Tp >, is_nothrow_move_assignable<
_Tp > >::value)
• template<typename _Tp >
constexpr enable_if< __and_< __not_< __is_tuple_like< _Tp > >, is_move_constructible< _Tp >,
is_move_assignable< _Tp > >::value >::type swap (_Tp &__a, _Tp &__b) noexcept(/∗conditional ∗/)
is_nothrow_move_assignable< _Tp > >
• template<typename _Tp , size_t _Nm>
constexpr enable_if< __is_swappable< _Tp >::value >::type swap (_Tp(&__a)[_Nm], _Tp(&__b)[_Nm])
noexcept(/∗conditional ∗/)
• template<typename _Tp , size_t _Nm>
constexpr __enable_if_t< __is_swappable< _Tp >::value > swap (_Tp(&__a)[_Nm], _Tp(&__b)[_Nm])
noexcept(__is_nothrow_swappable< _Tp >::value)
• template<typename _Tp , std::size_t _Nm>
__enable_if_t<!__array_traits< _Tp, _Nm >::_Is_swappable::value > swap (array< _Tp, _Nm > &, array< _Tp,
_Nm > &)=delete
• template<typename _Tp , std::size_t _Nm>
constexpr __enable_if_t< __array_traits< _Tp, _Nm >::_Is_swappable::value > swap (array< _Tp, _Nm > &←-
__one, array< _Tp, _Nm > &__two) noexcept(noexcept(__one.swap(__two)))
• template<class _CharT , class _Traits >
void swap (basic_filebuf< _CharT, _Traits > &__x, basic_filebuf< _CharT, _Traits > &__y)
• template<class _CharT , class _Traits >
void swap (basic_fstream< _CharT, _Traits > &__x, basic_fstream< _CharT, _Traits > &__y)
• template<class _CharT , class _Traits >
void swap (basic_ifstream< _CharT, _Traits > &__x, basic_ifstream< _CharT, _Traits > &__y)
• template<class _CharT , class _Traits , class _Allocator >
void swap (basic_istringstream< _CharT, _Traits, _Allocator > &__x, basic_istringstream< _CharT, _Traits, _←-
Allocator > &__y)
• template<class _CharT , class _Traits >
void swap (basic_ofstream< _CharT, _Traits > &__x, basic_ofstream< _CharT, _Traits > &__y)
• template<class _CharT , class _Traits , class _Allocator >
void swap (basic_ostringstream< _CharT, _Traits, _Allocator > &__x, basic_ostringstream< _CharT, _Traits,
_Allocator > &__y)
• template<typename _CharT , typename _Traits , typename _Alloc >
constexpr void swap (basic_string< _CharT, _Traits, _Alloc > &__lhs, basic_string< _CharT, _Traits, _Alloc >
&__rhs) noexcept(/∗conditional ∗/)
• template<class _CharT , class _Traits , class _Allocator >
void swap (basic_stringbuf< _CharT, _Traits, _Allocator > &__x, basic_stringbuf< _CharT, _Traits, _Allocator >
&__y) noexcept(noexcept(__x.swap(__y)))
• template<class _CharT , class _Traits , class _Allocator >
void swap (basic_stringstream< _CharT, _Traits, _Allocator > &__x, basic_stringstream< _CharT, _Traits, _←-
Allocator > &__y)
• template<typename _Tp , typename _Alloc >
void swap (deque< _Tp, _Alloc > &__x, deque< _Tp, _Alloc > &__y) noexcept(/∗conditional ∗/)
• template<typename _Tp , typename _Alloc >
void swap (forward_list< _Tp, _Alloc > &__lx, forward_list< _Tp, _Alloc > &__ly) noexcept(noexcept(__lx.←-
swap(__ly)))
• template<typename _Res , typename... _Args>
void swap (function< _Res(_Args...)> &__x, function< _Res(_Args...)> &__y) noexcept
Generated by Doxygen
4.10 std Namespace Reference 557
Generated by Doxygen
558
Generated by Doxygen
4.10 std Namespace Reference 559
• constexpr to_chars_result to_chars (char ∗__first, char ∗__last, signed long __value, int __base=10)
• constexpr to_chars_result to_chars (char ∗__first, char ∗__last, signed long long __value, int __base=10)
• constexpr to_chars_result to_chars (char ∗__first, char ∗__last, signed short __value, int __base=10)
• constexpr to_chars_result to_chars (char ∗__first, char ∗__last, unsigned char __value, int __base=10)
• constexpr to_chars_result to_chars (char ∗__first, char ∗__last, unsigned int __value, int __base=10)
• constexpr to_chars_result to_chars (char ∗__first, char ∗__last, unsigned long __value, int __base=10)
• constexpr to_chars_result to_chars (char ∗__first, char ∗__last, unsigned long long __value, int __base=10)
• constexpr to_chars_result to_chars (char ∗__first, char ∗__last, unsigned short __value, int __base=10)
• string to_string (double __val)
• string to_string (float __val)
• string to_string (int __val) noexcept
• string to_string (long __val) noexcept
• string to_string (long double __val)
• string to_string (long long __val)
• string to_string (unsigned __val) noexcept
• string to_string (unsigned long __val) noexcept
• string to_string (unsigned long long __val)
• wstring to_wstring (double __val)
• wstring to_wstring (float __val)
• wstring to_wstring (int __val)
• wstring to_wstring (long __val)
• wstring to_wstring (long double __val)
• wstring to_wstring (long long __val)
• wstring to_wstring (unsigned __val)
• wstring to_wstring (unsigned long __val)
• wstring to_wstring (unsigned long long __val)
• template<typename _CharT >
_CharT tolower (_CharT __c, const locale &__loc)
• template<typename _CharT >
_CharT toupper (_CharT __c, const locale &__loc)
• template<typename _IIter , typename _OIter , typename _UnaryOperation >
constexpr _OIter transform (_IIter, _IIter, _OIter, _UnaryOperation)
• template<typename _IIter1 , typename _IIter2 , typename _OIter , typename _BinaryOperation >
constexpr _OIter transform (_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
• template<typename _InputIterator , typename _OutputIterator , typename _UnaryOperation >
constexpr _OutputIterator transform (_InputIterator __first, _InputIterator __last, _OutputIterator __result, _←-
UnaryOperation __unary_op)
• template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _BinaryOperation >
constexpr _OutputIterator transform (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _←-
OutputIterator __result, _BinaryOperation __binary_op)
• template<typename _InputIterator , typename _OutputIterator , typename _Tp , typename _BinaryOperation , typename _UnaryOperation >
constexpr _OutputIterator transform_exclusive_scan (_InputIterator __first, _InputIterator __last, _OutputIterator
__result, _Tp __init, _BinaryOperation __binary_op, _UnaryOperation __unary_op)
• template<typename _InputIterator , typename _OutputIterator , typename _BinaryOperation , typename _UnaryOperation >
constexpr _OutputIterator transform_inclusive_scan (_InputIterator __first, _InputIterator __last, _OutputIterator
__result, _BinaryOperation __binary_op, _UnaryOperation __unary_op)
• template<typename _InputIterator , typename _OutputIterator , typename _BinaryOperation , typename _UnaryOperation , typename _Tp >
constexpr _OutputIterator transform_inclusive_scan (_InputIterator __first, _InputIterator __last, _OutputIterator
__result, _BinaryOperation __binary_op, _UnaryOperation __unary_op, _Tp __init)
• template<typename _InputIterator , typename _Tp , typename _BinaryOperation , typename _UnaryOperation >
constexpr _Tp transform_reduce (_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __←-
binary_op, _UnaryOperation __unary_op)
Generated by Doxygen
560
Generated by Doxygen
4.10 std Namespace Reference 561
Generated by Doxygen
562
typename = _RequireAllocator<_Allocator>>
unordered_map (initializer_list< pair< _Key, _Tp > >, typename unordered_map< int, int >::size_type={},
_Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_map< _Key, _Tp, _Hash, _Pred, _←-
Allocator >
• template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _Require←-
Allocator<_Allocator>>
unordered_multimap (_InputIterator, _InputIterator, _Allocator) -> unordered_multimap< __iter_key_t< _←-
InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_←-
key_t< _InputIterator > >, _Allocator >
• template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _Require←-
Allocator<_Allocator>>
unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type, _Allocator) ->
unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _←-
InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
• template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type, _Hash, _←-
Allocator) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash,
equal_to< __iter_key_t< _InputIterator > >, _Allocator >
• template<typename _InputIterator , typename _Hash = hash<__iter_key_t<_InputIterator>>, typename _Pred = equal_to<__iter_key_←-
t<_InputIterator>>, typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, typename = _RequireInputIter<_InputIterator>,
typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_←-
Allocator>>
unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type={}, _Hash=_←-
Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multimap< __iter_key_t< _InputIterator >, __←-
iter_val_t< _InputIterator >, _Hash, _Pred, _Allocator >
• template<typename _Key , typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
unordered_multimap (initializer_list< pair< _Key, _Tp > >, _Allocator) -> unordered_multimap< _Key, _Tp,
hash< _Key >, equal_to< _Key >, _Allocator >
• template<typename _Key , typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type, _←-
Allocator) -> unordered_multimap< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
• template<typename _Key , typename _Tp , typename _Hash , typename _Allocator , typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type, _Hash,
_Allocator) -> unordered_multimap< _Key, _Tp, _Hash, equal_to< _Key >, _Allocator >
• template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Allocator
= allocator<pair<const _Key, _Tp>>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>,
typename = _RequireAllocator<_Allocator>>
unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type={}, ←-
_Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multimap< _Key, _Tp, _Hash, _Pred,
_Allocator >
• template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _Require←-
Allocator<_Allocator>>
unordered_multiset (_InputIterator, _InputIterator, unordered_multiset< int >::size_type, _Allocator) ->
unordered_multiset< typename iterator_traits< _InputIterator >::value_type, hash< typename iterator_traits<
_InputIterator >::value_type >, equal_to< typename iterator_traits< _InputIterator >::value_type >, _Allocator
>
• template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
unordered_multiset (_InputIterator, _InputIterator, unordered_multiset< int >::size_type, _Hash, _Allocator) -
> unordered_multiset< typename iterator_traits< _InputIterator >::value_type, _Hash, equal_to< typename
iterator_traits< _InputIterator >::value_type >, _Allocator >
Generated by Doxygen
4.10 std Namespace Reference 563
Generated by Doxygen
564
• template<size_t _Nb>
constexpr bitset< _Nb > operator& (const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
• template<size_t _Nb>
constexpr bitset< _Nb > operator| (const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
• template<size_t _Nb>
constexpr bitset< _Nb > operator∧ (const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Generated by Doxygen
4.10 std Namespace Reference 565
Generated by Doxygen
566
Generated by Doxygen
4.10 std Namespace Reference 567
Generated by Doxygen
568
• template<typename _Out_iter , typename _Bi_iter , typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa >
_Out_iter regex_replace (_Out_iter __out, _Bi_iter __first, _Bi_iter __last, const basic_regex< _Ch_type, ←-
_Rx_traits > &__e, const basic_string< _Ch_type, _St, _Sa > &__fmt, regex_constants::match_flag_type
__flags=regex_constants::match_default)
• template<typename _Out_iter , typename _Bi_iter , typename _Rx_traits , typename _Ch_type >
_Out_iter regex_replace (_Out_iter __out, _Bi_iter __first, _Bi_iter __last, const basic_regex< _Ch_type, _←-
Rx_traits > &__e, const _Ch_type ∗__fmt, regex_constants::match_flag_type __flags=regex_constants::match_default)
• template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa , typename _Fst , typename _Fsa >
basic_string< _Ch_type, _St, _Sa > regex_replace (const basic_string< _Ch_type, _St, _Sa > &__←-
s, const basic_regex< _Ch_type, _Rx_traits > &__e, const basic_string< _Ch_type, _Fst, _Fsa > &__fmt,
regex_constants::match_flag_type __flags=regex_constants::match_default)
• template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa >
basic_string< _Ch_type, _St, _Sa > regex_replace (const basic_string< _Ch_type, _St, _Sa > &__s, const
basic_regex< _Ch_type, _Rx_traits > &__e, const _Ch_type ∗__fmt, regex_constants::match_flag_type __←-
flags=regex_constants::match_default)
• template<typename _Rx_traits , typename _Ch_type , typename _St , typename _Sa >
basic_string< _Ch_type > regex_replace (const _Ch_type ∗__s, const basic_regex< _Ch_type, _Rx_←-
traits > &__e, const basic_string< _Ch_type, _St, _Sa > &__fmt, regex_constants::match_flag_type __←-
flags=regex_constants::match_default)
• template<typename _Rx_traits , typename _Ch_type >
basic_string< _Ch_type > regex_replace (const _Ch_type ∗__s, const basic_regex< _Ch_type, _Rx_traits >
&__e, const _Ch_type ∗__fmt, regex_constants::match_flag_type __flags=regex_constants::match_default)
Generated by Doxygen
4.10 std Namespace Reference 569
Generated by Doxygen
570
Variables
Generated by Doxygen
4.10 std Namespace Reference 571
Generated by Doxygen
572
• istream cin
• ostream cout
• ostream cerr
• ostream clog
• wistream wcin
• wostream wcout
• wostream wcerr
Generated by Doxygen
4.10 std Namespace Reference 573
• wostream wclog
• template<typename... _Tp>
using common_reference_t
• template<typename _Tp , typename _Up >
constexpr bool is_layout_compatible_v
• template<typename _Base , typename _Derived >
constexpr bool is_pointer_interconvertible_base_of_v
• template<typename _S1 , typename _S2 , typename _M1 , typename _M2 >
constexpr bool is_corresponding_member (_M1 _S1::∗__m1, _M2 _S2::∗__m2) noexcept
• template<typename _Tp , typename _Mem >
constexpr bool is_pointer_interconvertible_with_class (_Mem _Tp::∗__mp) noexcept
__ptr_rebind
__umap_traits
template<bool _Cache>
using std::__umap_traits
Base types for unordered_map.
__ummap_traits
template<bool _Cache>
using std::__ummap_traits
Base types for unordered_multimap.
__umset_traits
template<bool _Cache>
using std::__umset_traits
Base types for unordered_multiset.
__uset_traits
template<bool _Cache>
using std::__uset_traits
Base types for unordered_set.
compare_three_way_result_t
Generated by Doxygen
574
index_sequence
template<size_t... _Idx>
using std::index_sequence
Alias template index_sequence.
index_sequence_for
template<typename... _Types>
using std::index_sequence_for
Alias template index_sequence_for.
make_index_sequence
template<size_t _Num>
using std::make_index_sequence
Alias template make_index_sequence.
make_integer_sequence
new_handler
streamoff
streampos
streamsize
u16streampos
u32streampos
Generated by Doxygen
4.10 std Namespace Reference 575
wstreampos
chars_format
float_denorm_style
enum std::float_denorm_style
Describes the denormalization for floating-point types.
These values represent the presence or absence of a variable number of exponent bits. This type is used in the std←-
::numeric_limits class.
Enumerator
denorm_indeterminate Indeterminate at compile time whether denormalized values are allowed.
denorm_absent The type does not allow denormalized values.
denorm_present The type allows denormalized values.
float_round_style
enum std::float_round_style
Describes the rounding style for floating-point types.
This is used in the std::numeric_limits class.
Enumerator
round_indeterminate Intermediate.
round_toward_zero To zero.
round_to_nearest To the nearest representable value.
round_toward_infinity To infinity.
round_toward_neg_infinity To negative infinity.
io_errc
__find_if_not()
Generated by Doxygen
576
__find_if_not_n()
__gcd()
__gen_two_uniform_ints()
Parameters
Returns
A pair (i, j) with i and j uniformly distributed over [0, __b0) and [0, __b1), respectively.
__inplace_stable_sort()
Generated by Doxygen
4.10 std Namespace Reference 577
_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Compare __comp)
This is a helper function for the stable sorting routines.
References __inplace_stable_sort(), and __merge_without_buffer().
Referenced by __inplace_stable_sort().
__lg()
__merge_adaptive()
__merge_without_buffer()
__move_median_to_first()
Generated by Doxygen
578
__move_merge()
__move_merge_adaptive()
__move_merge_adaptive_backward()
__partition() [1/2]
__partition() [2/2]
Generated by Doxygen
4.10 std Namespace Reference 579
_ForwardIterator __last,
_Predicate __pred,
forward_iterator_tag ) [constexpr]
This is a helper function...
Referenced by partition().
__reverse() [1/2]
__reverse() [2/2]
__rotate() [1/3]
__rotate() [2/3]
__rotate() [3/3]
Generated by Doxygen
580
_RandomAccessIterator __last,
random_access_iterator_tag ) [constexpr]
This is a helper function for the rotate algorithm.
References __rotate().
__rotate_adaptive()
__sample() [1/2]
__sample() [2/2]
__search_n_aux() [1/2]
Generated by Doxygen
4.10 std Namespace Reference 581
_UnaryPredicate __unary_pred,
std::forward_iterator_tag ) [constexpr]
This is an helper function for search_n overloaded for forward iterators.
__search_n_aux() [2/2]
__stable_partition_adaptive()
__unique_copy() [1/3]
__unique_copy() [2/3]
Generated by Doxygen
582
__unique_copy() [3/3]
_Construct()
_Destroy() [1/2]
_Destroy() [2/2]
_Destroy_n()
Generated by Doxygen
4.10 std Namespace Reference 583
acosh()
float std::acosh (
float __x) [constexpr]
Additional overloads.
advance()
Parameters
_←- An input iterator.
_i
_←- The delta by which to change __i.
_n
Returns
Nothing.
This increments i by n. For bidirectional and random access iterators, __n may be negative, in which case __i is
decremented.
For random access iterators, this uses their + and - operations and are constant time. For other iterator classes they
are linear time.
References __iterator_category().
Referenced by __merge_without_buffer(), __stable_partition_adaptive(), _Destroy_n(), std::deque< _Tp, _Alloc >::_M_range_initialize(),
__gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::get_child(),
__gnu_pbds::detail::pat_trie_base::_Node_iter< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::get_child(),
and partition_point().
arg()
begin() [1/4]
Parameters
__cont Container.
Generated by Doxygen
584
begin() [2/4]
Parameters
__arr Array.
begin() [3/4]
Parameters
__cont Container.
boolalpha()
cbegin()
Parameters
__cont Container.
References begin().
Referenced by std::vector< _Tp, _Alloc >::insert().
cend()
Parameters
__cont Container.
References end().
Generated by Doxygen
4.10 std Namespace Reference 585
const_pointer_cast()
crbegin()
Parameters
__cont Container.
References rbegin().
crend()
Parameters
__cont Container.
References rend().
data() [1/4]
Parameters
__cont Container.
data() [2/4]
Generated by Doxygen
586
Parameters
__array Array.
data() [3/4]
Parameters
__cont Container.
data() [4/4]
Parameters
_←- Initializer list.
_il
dec()
defaultfloat()
distance()
Generated by Doxygen
4.10 std Namespace Reference 587
Parameters
Returns
Returns n such that __first + n == __last. This requires that __last must be reachable from __first. Note that n
may be negative.
For random access iterators, this uses their + and - operations and are constant time. For other iterator classes they
are linear time.
References __iterator_category().
Referenced by __merge_without_buffer(), __sample(), std::deque< _Tp, _Alloc >::_M_range_initialize(), is_heap(),
is_heap_until(), is_heap_until(), std::sub_match< _BiIter >::length(), __gnu_parallel::multiseq_partition(), __gnu_parallel::multiseq_selec
__gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::num_children(),
partition_point(), std::match_results< _Bi_iter, _Alloc >::position(), std::list< _Tp, _Alloc >::size(), and std::list< _Tp, _Alloc >::splice().
dynamic_pointer_cast()
empty() [1/3]
Parameters
__cont Container.
Referenced by std::forward_list< _Tp, _Alloc >::sort(), std::list< _Tp, _Alloc >::sort(), and std::list< _Tp, _Alloc >::sort().
empty() [2/3]
empty() [3/3]
Generated by Doxygen
588
Parameters
_←- Initializer list.
_il
end() [1/4]
Parameters
__cont Container.
end() [2/4]
Parameters
__arr Array.
end() [3/4]
Parameters
__cont Container.
endl()
Generated by Doxygen
4.10 std Namespace Reference 589
ends()
fabs()
fixed()
flush()
from_chars()
template<typename _Tp , enable_if_t< __or_< __is_standard_integer< _Tp >, is_same< char, remove←-
_cv_t< _Tp > > >::value, int > = 0>
from_chars_result std::from_chars (
const char ∗ __first,
const char ∗ __last,
_Tp & __value,
int __base = 10) [constexpr]
std::from_chars for integral types.
get() [1/12]
get() [2/12]
Generated by Doxygen
590
get() [3/12]
get() [4/12]
get() [5/12]
get() [6/12]
get() [7/12]
get() [8/12]
get() [9/12]
Generated by Doxygen
4.10 std Namespace Reference 591
get() [10/12]
get() [11/12]
get() [12/12]
get_money()
Parameters
get_new_handler()
get_temporary_buffer()
Parameters
Generated by Doxygen
592
Returns
get_time()
Parameters
__tmb struct to extract the time data to.
__fmt format string.
getline() [1/6]
getline() [2/6]
getline() [3/6]
Generated by Doxygen
4.10 std Namespace Reference 593
Parameters
__is Input stream.
__str Buffer to store into.
Returns
getline() [4/6]
Parameters
__is Input stream.
__str Buffer to store into.
__delim Character marking end of line.
Returns
Stores characters from __is into __str until __delim is found, the end of the stream is encountered, or str.max_size() is
reached. If is.width() is non-zero, that is the limit on the number of characters stored into __str. Any previous contents
of __str are erased. If delim was encountered, it is extracted but not stored into __str.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::append(), __gnu_cxx::__versa_string< _CharT, _Traits, _Allo
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::max_size(), std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
getline() [5/6]
Parameters
__is Input stream.
__str Buffer to store into.
Generated by Doxygen
594
Returns
getline() [6/6]
Parameters
__is Input stream.
__str Buffer to store into.
__delim Character marking end of line.
Returns
Stores characters from __is into __str until __delim is found, the end of the stream is encountered, or str.max_size() is
reached. Any previous contents of __str are erased. If __delim is encountered, it is extracted but not stored into __str.
References std::basic_string< _CharT, _Traits, _Alloc >::erase(), std::basic_string< _CharT, _Traits, _Alloc >::max_size(),
std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >::setstate().
Referenced by getline(), getline(), getline(), and getline().
hex()
hexfloat()
internal()
Generated by Doxygen
4.10 std Namespace Reference 595
isalnum()
isalpha()
isblank()
iscntrl()
isdigit()
isgraph()
Generated by Doxygen
596
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
Generated by Doxygen
4.10 std Namespace Reference 597
left()
noboolalpha()
noshowbase()
noshowpoint()
noshowpos()
noskipws()
nounitbuf()
nouppercase()
Generated by Doxygen
598
oct()
operator"!=() [1/5]
operator"!=() [2/5]
operator"!=() [3/5]
operator"!=() [4/5]
operator"!=() [5/5]
operator&()
template<size_t _Nb>
bitset< _Nb > std::operator& (
const bitset< _Nb > & __x,
const bitset< _Nb > & __y) [inline], [constexpr], [noexcept]
Global bitwise operations on bitsets.
Generated by Doxygen
4.10 std Namespace Reference 599
Parameters
_←- A bitset.
_x
_←- A bitset of the same size as __x.
_y
Returns
A new bitset.
operator+() [1/5]
Parameters
__lhs First string.
__rhs Last string.
Returns
operator+() [2/5]
Parameters
__lhs First string.
__rhs Last string.
Returns
operator+() [3/5]
Generated by Doxygen
600
Parameters
__lhs First string.
__rhs Last string.
Returns
operator+() [4/5]
Parameters
__lhs First string.
__rhs Last string.
Returns
operator+() [5/5]
Parameters
__lhs First string.
__rhs Last string.
Returns
operator<() [1/5]
Generated by Doxygen
4.10 std Namespace Reference 601
Parameters
_←- A multimap.
_x
_←- A multimap of the same type as __x.
_y
Returns
This is a total ordering relation. It is linear in the size of the multimaps. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
operator<() [2/5]
Parameters
_←- A multiset.
_x
_←- A multiset of the same type as __x.
_y
Returns
This is a total ordering relation. It is linear in the size of the sets. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
operator<() [3/5]
Parameters
_←- A queue.
_x
_←- A queue of the same type as x.
_y
Generated by Doxygen
602
Returns
This is an total ordering relation. Complexity and semantics depend on the underlying sequence type, but the expected
rules are: this relation is linear in the size of the sequences, the elements must be comparable with <, and std←-
::lexicographical_compare() is usually used to make the determination.
References std::queue< _Tp, _Sequence >::c.
operator<() [4/5]
Parameters
_←- A set.
_x
_←- A set of the same type as x.
_y
Returns
This is a total ordering relation. It is linear in the size of the sets. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
operator<() [5/5]
Parameters
_←- A stack.
_x
_←- A stack of the same type as x.
_y
Returns
This is an total ordering relation. Complexity and semantics depend on the underlying sequence type, but the expected
rules are: this relation is linear in the size of the sequences, the elements must be comparable with <, and std←-
::lexicographical_compare() is usually used to make the determination.
Generated by Doxygen
4.10 std Namespace Reference 603
operator<<() [1/24]
Parameters
__os An input stream.
__x A reference to the object being inserted.
Returns
__os
This is just a forwarding function to allow insertion to rvalue streams since they won't bind to the inserter functions that
take an lvalue reference.
operator<<() [2/24]
Parameters
Returns
operator<<() [3/24]
Parameters
Returns
Generated by Doxygen
604
operator<<() [4/24]
Parameters
__out An output stream.
__c A character.
Returns
out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). _←-
_out.width(0) is then called.
If __c is of type char and the character type of the stream is not char, the character is widened before insertion.
operator<<() [5/24]
Parameters
__out An output stream.
__c A character.
Returns
out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). _←-
_out.width(0) is then called.
If __c is of type char and the character type of the stream is not char, the character is widened before insertion.
operator<<() [6/24]
Parameters
__out An output stream.
__s A character string.
Generated by Doxygen
4.10 std Namespace Reference 605
Returns
out
Precondition
operator<<() [7/24]
Parameters
__out An output stream.
__s A character string.
Returns
out
Precondition
operator<<() [8/24]
Parameters
__out An output stream.
__c A character.
Returns
out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). _←-
_out.width(0) is then called.
If __c is of type char and the character type of the stream is not char, the character is widened before insertion.
Generated by Doxygen
606
operator<<() [9/24]
Parameters
__out An output stream.
__c A character.
Returns
out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). _←-
_out.width(0) is then called.
If __c is of type char and the character type of the stream is not char, the character is widened before insertion.
operator<<() [10/24]
Parameters
__out An output stream.
__s A character string.
Returns
out
Precondition
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts traits::length(__s) characters starting at __s, widened if necessary,
followed by any required padding (as determined by [22.2.2.2.2]). __out.width(0) is then called.
operator<<() [11/24]
Generated by Doxygen
4.10 std Namespace Reference 607
Parameters
__out An output stream.
__s A character string.
Returns
out
Precondition
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts traits::length(__s) characters starting at __s, widened if necessary,
followed by any required padding (as determined by [22.2.2.2.2]). __out.width(0) is then called.
operator<<() [12/24]
Parameters
__out An output stream.
__s A character string.
Returns
out
Precondition
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts traits::length(__s) characters starting at __s, widened if necessary,
followed by any required padding (as determined by [22.2.2.2.2]). __out.width(0) is then called.
operator<<() [13/24]
Parameters
__out An output stream.
__c A character.
Generated by Doxygen
608
Returns
out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). _←-
_out.width(0) is then called.
If __c is of type char and the character type of the stream is not char, the character is widened before insertion.
operator<<() [14/24]
Parameters
__out An output stream.
__c A character.
Returns
out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). _←-
_out.width(0) is then called.
If __c is of type char and the character type of the stream is not char, the character is widened before insertion.
operator<<() [15/24]
Parameters
__out An output stream.
__s A character string.
Returns
out
Precondition
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts traits::length(__s) characters starting at __s, widened if necessary,
followed by any required padding (as determined by [22.2.2.2.2]). __out.width(0) is then called.
Generated by Doxygen
4.10 std Namespace Reference 609
operator<<() [16/24]
Parameters
__out An output stream.
__s A character string.
Returns
out
Precondition
operator<<() [17/24]
Parameters
__out An output stream.
__s A character string.
Returns
out
Precondition
operator<<() [18/24]
Generated by Doxygen
610
Parameters
__out An output stream.
__c A character.
Returns
out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). _←-
_out.width(0) is then called.
If __c is of type char and the character type of the stream is not char, the character is widened before insertion.
operator<<() [19/24]
Parameters
__out An output stream.
__c A character.
Returns
out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). _←-
_out.width(0) is then called.
If __c is of type char and the character type of the stream is not char, the character is widened before insertion.
operator<<() [20/24]
Parameters
__out An output stream.
__c A character.
Returns
out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). _←-
_out.width(0) is then called.
If __c is of type char and the character type of the stream is not char, the character is widened before insertion.
Generated by Doxygen
4.10 std Namespace Reference 611
operator<<() [21/24]
Parameters
__out An output stream.
__c A character.
Returns
out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). _←-
_out.width(0) is then called.
If __c is of type char and the character type of the stream is not char, the character is widened before insertion.
operator<<() [22/24]
Parameters
__out An output stream.
__s A character string.
Returns
out
Precondition
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts traits::length(__s) characters starting at __s, widened if necessary,
followed by any required padding (as determined by [22.2.2.2.2]). __out.width(0) is then called.
operator<<() [23/24]
Generated by Doxygen
612
Parameters
__out An output stream.
__s A character string.
Returns
out
Precondition
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object
with good status, this function inserts traits::length(__s) characters starting at __s, widened if necessary,
followed by any required padding (as determined by [22.2.2.2.2]). __out.width(0) is then called.
operator<<() [24/24]
operator<=() [1/5]
operator<=() [2/5]
operator<=() [3/5]
Generated by Doxygen
4.10 std Namespace Reference 613
operator<=() [4/5]
operator<=() [5/5]
operator<=>() [1/7]
Parameters
__lhs A string.
__rhs A null-terminated string.
Returns
A value indicating whether __lhs is less than, equal to, greater than, or incomparable with __rhs.
operator<=>() [2/7]
Parameters
__lhs A string.
__rhs A null-terminated string.
Returns
A value indicating whether __lhs is less than, equal to, greater than, or incomparable with __rhs.
Generated by Doxygen
614
operator<=>() [3/7]
Parameters
_←- A deque.
_x
_←- A deque of the same type as __x.
_y
Returns
A value indicating whether __x is less than, equal to, greater than, or incomparable with __y.
operator<=>() [4/7]
Parameters
_←- A forward_list.
_x
_←- A forward_list of the same type as __x.
_y
Returns
A value indicating whether __x is less than, equal to, greater than, or incomparable with __y.
operator<=>() [5/7]
Generated by Doxygen
4.10 std Namespace Reference 615
Parameters
_←- A list.
_x
_←- A list of the same type as __x.
_y
Returns
A value indicating whether __x is less than, equal to, greater than, or incomparable with __y.
operator<=>() [6/7]
Parameters
_←- A map.
_x
_←- A map of the same type as x.
_y
Returns
A value indicating whether __x is less than, equal to, greater than, or incomparable with __y.
This is a total ordering relation. It is linear in the size of the maps. The elements must be comparable with <.
See std::lexicographical_compare_three_way() for how the determination is made. This operator is
used to synthesize relational operators like < and >= etc.
operator<=>() [7/7]
Parameters
_←- A vector.
_x
_←- A vector of the same type as __x.
_y
Generated by Doxygen
616
Returns
A value indicating whether __x is less than, equal to, greater than, or incomparable with __y.
operator==() [1/14]
Parameters
__lhs String.
__rhs C string.
Returns
operator==() [2/14]
Parameters
__lhs First string.
__rhs Second string.
Returns
operator==() [3/14]
Generated by Doxygen
4.10 std Namespace Reference 617
Parameters
_←- A deque.
_x
_←- A deque of the same type as __x.
_y
Returns
True iff the size and elements of the deques are equal.
This is an equivalence relation. It is linear in the size of the deques. Deques are considered equivalent if their sizes are
equal, and if corresponding elements compare equal.
operator==() [4/14]
Parameters
_←- A forward_list
_lx
_←- A forward_list of the same type as __lx.
_ly
Returns
This is an equivalence relation. It is linear in the number of elements of the forward lists. Deques are considered
equivalent if corresponding elements compare equal.
References std::forward_list< _Tp, _Alloc >::cbegin(), and std::forward_list< _Tp, _Alloc >::cend().
operator==() [5/14]
operator==() [6/14]
Generated by Doxygen
618
operator==() [7/14]
Parameters
_←- A list.
_x
_←- A list of the same type as __x.
_y
Returns
True iff the size and elements of the lists are equal.
This is an equivalence relation. It is linear in the size of the lists. Lists are considered equivalent if their sizes are equal,
and if corresponding elements compare equal.
operator==() [8/14]
Parameters
_←- A map.
_x
_←- A map of the same type as x.
_y
Returns
True iff the size and elements of the maps are equal.
This is an equivalence relation. It is linear in the size of the maps. Maps are considered equivalent if their sizes are
equal, and if corresponding elements compare equal.
operator==() [9/14]
Generated by Doxygen
4.10 std Namespace Reference 619
Parameters
_←- A multimap.
_x
_←- A multimap of the same type as __x.
_y
Returns
True iff the size and elements of the maps are equal.
This is an equivalence relation. It is linear in the size of the multimaps. Multimaps are considered equivalent if their
sizes are equal, and if corresponding elements compare equal.
operator==() [10/14]
Parameters
_←- A multiset.
_x
_←- A multiset of the same type as __x.
_y
Returns
True iff the size and elements of the multisets are equal.
This is an equivalence relation. It is linear in the size of the multisets. Multisets are considered equivalent if their sizes
are equal, and if corresponding elements compare equal.
operator==() [11/14]
Parameters
_←- A queue.
_x
_←- A queue of the same type as __x.
_y
Generated by Doxygen
620
Returns
True iff the size and elements of the queues are equal.
This is an equivalence relation. Complexity and semantics depend on the underlying sequence type, but the expected
rules are: this relation is linear in the size of the sequences, and queues are considered equivalent if their sequences
compare equal.
References std::queue< _Tp, _Sequence >::c.
operator==() [12/14]
Parameters
_←- A set.
_x
_←- A set of the same type as x.
_y
Returns
True iff the size and elements of the sets are equal.
This is an equivalence relation. It is linear in the size of the sets. Sets are considered equivalent if their sizes are equal,
and if corresponding elements compare equal.
operator==() [13/14]
Parameters
_←- A stack.
_x
_←- A stack of the same type as __x.
_y
Returns
True iff the size and elements of the stacks are equal.
This is an equivalence relation. Complexity and semantics depend on the underlying sequence type, but the expected
rules are: this relation is linear in the size of the sequences, and stacks are considered equivalent if their sequences
compare equal.
Generated by Doxygen
4.10 std Namespace Reference 621
operator==() [14/14]
Parameters
_←- A vector.
_x
_←- A vector of the same type as __x.
_y
Returns
True iff the size and elements of the vectors are equal.
This is an equivalence relation. It is linear in the size of the vectors. Vectors are considered equivalent if their sizes are
equal, and if corresponding elements compare equal.
References std::vector< _Tp, _Alloc >::begin(), std::vector< _Tp, _Alloc >::end(), and std::vector< _Tp, _Alloc >::size().
operator>() [1/5]
operator>() [2/5]
operator>() [3/5]
operator>() [4/5]
Generated by Doxygen
622
operator>() [5/5]
operator>=() [1/5]
operator>=() [2/5]
operator>=() [3/5]
operator>=() [4/5]
operator>=() [5/5]
operator>>() [1/10]
Generated by Doxygen
4.10 std Namespace Reference 623
Parameters
_←- An input stream.
_is
_←- A reference to the extraction target.
_x
Returns
__is
This is just a forwarding function to allow extraction from rvalue streams since they won't bind to the extractor functions
that take an lvalue reference.
operator>>() [2/10]
Parameters
_←- An input stream.
_in
_←- A character reference.
_c
Returns
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry
object with good status, this function extracts a character (if one is available) and stores it in __c. Otherwise, sets failbit
in the input stream.
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::failbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdb
and std::basic_ios< _CharT, _Traits >::setstate().
operator>>() [3/10]
Parameters
_←- An input stream.
_in
_←- A character array (or a pointer to an array before C++20).
_s
Generated by Doxygen
624
Returns
__in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a
sentry object with good status, this function extracts up to n characters and stores them into the array __s. n is defined
as:
• (before C++20 the pointer is assumed to point to an array of the largest possible size for an array of char_type).
Characters are extracted and stored until one of the following happens:
• EOF is reached
operator>>() [4/10]
Parameters
__is Input stream.
__str Buffer to store into.
Returns
Stores characters from __is into __str until whitespace is found, the end of the stream is encountered, or str.max_size()
is reached. If is.width() is non-zero, that is the limit on the number of characters stored into __str. Any previous contents
of __str are erased.
References std::ios_base::getloc(), std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_ios< _CharT, _Traits >::setstate(),
use_facet(), and std::ios_base::width().
operator>>() [5/10]
Generated by Doxygen
4.10 std Namespace Reference 625
Parameters
__is Input stream.
__str Buffer to store into.
Returns
Stores characters from __is into __str until whitespace is found, the end of the stream is encountered, or str.max_size()
is reached. If is.width() is non-zero, that is the limit on the number of characters stored into __str. Any previous contents
of __str are erased.
References std::basic_string< _CharT, _Traits, _Alloc >::append(), std::basic_string< _CharT, _Traits, _Alloc >::erase(),
std::ios_base::getloc(), std::basic_string< _CharT, _Traits, _Alloc >::max_size(), std::basic_ios< _CharT, _Traits >::rdbuf(),
std::basic_ios< _CharT, _Traits >::setstate(), use_facet(), and std::ios_base::width().
operator>>() [6/10]
Parameters
_←- An input stream.
_in
_←- A character reference.
_c
Returns
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry
object with good status, this function extracts a character (if one is available) and stores it in __c. Otherwise, sets failbit
in the input stream.
operator>>() [7/10]
Parameters
_←- An input stream.
_in
_←- A character array (or a pointer to an array before C++20).
_s
Generated by Doxygen
626
Returns
__in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a
sentry object with good status, this function extracts up to n characters and stores them into the array __s. n is defined
as:
• (before C++20 the pointer is assumed to point to an array of the largest possible size for an array of char_type).
Characters are extracted and stored until one of the following happens:
• EOF is reached
operator>>() [8/10]
Parameters
_←- An input stream.
_in
_←- A character reference.
_c
Returns
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry
object with good status, this function extracts a character (if one is available) and stores it in __c. Otherwise, sets failbit
in the input stream.
operator>>() [9/10]
Generated by Doxygen
4.10 std Namespace Reference 627
Parameters
_←- An input stream.
_in
_←- A character array (or a pointer to an array before C++20).
_s
Returns
__in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a
sentry object with good status, this function extracts up to n characters and stores them into the array __s. n is defined
as:
• (before C++20 the pointer is assumed to point to an array of the largest possible size for an array of char_type).
Characters are extracted and stored until one of the following happens:
• EOF is reached
operator>>() [10/10]
operator∧ ()
template<size_t _Nb>
bitset< _Nb > std::operator∧ (
const bitset< _Nb > & __x,
const bitset< _Nb > & __y) [inline], [constexpr], [noexcept]
Global bitwise operations on bitsets.
Parameters
_←- A bitset.
_x
_←- A bitset of the same size as __x.
_y
Generated by Doxygen
628
Returns
A new bitset.
operator"|()
template<size_t _Nb>
bitset< _Nb > std::operator| (
const bitset< _Nb > & __x,
const bitset< _Nb > & __y) [inline], [constexpr], [noexcept]
Global bitwise operations on bitsets.
Parameters
_←- A bitset.
_x
_←- A bitset of the same size as __x.
_y
Returns
A new bitset.
put_money()
Parameters
put_time()
Parameters
Generated by Doxygen
4.10 std Namespace Reference 629
rbegin() [1/4]
Parameters
__cont Container.
Referenced by crbegin().
rbegin() [2/4]
Parameters
__arr Array.
rbegin() [3/4]
Parameters
__cont Container.
rbegin() [4/4]
Parameters
_←- initializer_list.
_il
Generated by Doxygen
630
rend() [1/4]
Generated by Doxygen
4.10 std Namespace Reference 631
Parameters
__cont Container.
Referenced by crend().
rend() [2/4]
Parameters
__arr Array.
rend() [3/4]
Parameters
__cont Container.
rend() [4/4]
Parameters
_←- initializer_list.
_il
replace_copy()
Generated by Doxygen
632
Parameters
Returns
Copies each element in the input range [__first,__last) to the output range [__result,__result+(__last-__first)) replacing
elements equal to __old_value with __new_value.
resetiosflags()
_Resetiosflags std::resetiosflags (
ios_base::fmtflags __mask) [inline]
Manipulator for setf.
Parameters
Sent to a stream object, this manipulator resets the specified flags, via stream.setf(0,__mask).
return_temporary_buffer()
Parameters
Returns
None.
right()
Generated by Doxygen
4.10 std Namespace Reference 633
sample()
scientific()
search()
Parameters
Returns
__searcher(__first,__last).first
set_new_handler()
new_handler std::set_new_handler (
new_handler ) throw ( )
Takes a replacement handler as the argument, returns the previous handler.
setbase()
_Setbase std::setbase (
int __base) [inline]
Manipulator for setf.
Parameters
__base A numeric base.
Generated by Doxygen
634
Sent to a stream object, this manipulator changes the ios_base::basefield flags to oct, dec, or hex when
base is 8, 10, or 16, accordingly, and to 0 if __base is any other value.
setfill()
Parameters
Sent to a stream object, this manipulator calls fill(__c) for that object.
setiosflags()
_Setiosflags std::setiosflags (
ios_base::fmtflags __mask) [inline]
Manipulator for setf.
Parameters
Sent to a stream object, this manipulator sets the format flags to __mask.
setprecision()
_Setprecision std::setprecision (
int __n) [inline]
Manipulator for precision.
Parameters
_←- The new precision.
_n
Sent to a stream object, this manipulator calls precision(__n) for that object.
setw()
_Setw std::setw (
int __n) [inline]
Manipulator for width.
Parameters
_←- The new width.
_n
Sent to a stream object, this manipulator calls width(__n) for that object.
Generated by Doxygen
4.10 std Namespace Reference 635
showbase()
showpoint()
showpos()
size() [1/2]
Parameters
__cont Container.
size() [2/2]
skipws()
Generated by Doxygen
636
static_pointer_cast()
swap() [1/19]
swap() [2/19]
swap() [3/19]
swap() [4/19]
swap() [5/19]
swap() [6/19]
Generated by Doxygen
4.10 std Namespace Reference 637
swap() [7/19]
Parameters
__lhs First string.
__rhs Second string.
swap() [8/19]
swap() [9/19]
swap() [10/19]
swap() [11/19]
swap() [12/19]
Generated by Doxygen
638
swap() [13/19]
swap() [14/19]
swap() [15/19]
swap() [16/19]
swap() [17/19]
swap() [18/19]
tolower()
Generated by Doxygen
4.10 std Namespace Reference 639
toupper()
unitbuf()
uppercase()
ws()
cerr
cin
Generated by Doxygen
640
clog
cout
default_sentinel
destroying_delete
ignore
Since
C++11
wcerr
wcin
wclog
wcout
Generated by Doxygen
4.11 std::__debug Namespace Reference 641
• class bitset
• class deque
• class forward_list
• class list
• class map
• class multimap
• class multiset
• class set
• class unordered_map
• class unordered_multimap
• class unordered_multiset
• class unordered_set
• class vector
Functions
Generated by Doxygen
642
Generated by Doxygen
4.11 std::__debug Namespace Reference 643
Generated by Doxygen
644
• template<typename _Key , typename _Compare = less<_Key>, typename _Allocator = allocator<_Key>, typename = _RequireNot←-
Allocator<_Compare>, typename = _RequireAllocator<_Allocator>>
set (initializer_list< _Key >, _Compare=_Compare(), _Allocator=_Allocator()) -> set< _Key, _Compare, _←-
Allocator >
• template<typename _Tp , typename _Alloc >
void swap (deque< _Tp, _Alloc > &__lhs, deque< _Tp, _Alloc > &__rhs) noexcept(/∗conditional ∗/)
• template<typename _Tp , typename _Alloc >
void swap (forward_list< _Tp, _Alloc > &__lx, forward_list< _Tp, _Alloc > &__ly) noexcept(noexcept(__lx.←-
swap(__ly)))
• template<typename _Tp , typename _Alloc >
void swap (list< _Tp, _Alloc > &__lhs, list< _Tp, _Alloc > &__rhs) noexcept(/∗conditional ∗/)
• template<typename _Key , typename _Tp , typename _Compare , typename _Allocator >
void swap (map< _Key, _Tp, _Compare, _Allocator > &__lhs, map< _Key, _Tp, _Compare, _Allocator > &__rhs)
noexcept(/∗conditional ∗/)
• template<typename _Key , typename _Tp , typename _Compare , typename _Allocator >
void swap (multimap< _Key, _Tp, _Compare, _Allocator > &__lhs, multimap< _Key, _Tp, _Compare, _Allocator
> &__rhs) noexcept(/∗conditional ∗/)
• template<typename _Key , typename _Compare , typename _Allocator >
void swap (multiset< _Key, _Compare, _Allocator > &__x, multiset< _Key, _Compare, _Allocator > &__←-
y) noexcept(/∗conditional ∗/)
• template<typename _Key , typename _Compare , typename _Allocator >
void swap (set< _Key, _Compare, _Allocator > &__x, set< _Key, _Compare, _Allocator > &__←-
y) noexcept(/∗conditional ∗/)
• template<typename _Key , typename _Tp , typename _Hash , typename _Pred , typename _Alloc >
void swap (unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, unordered_map< _Key, _Tp, _Hash,
_Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
• template<typename _Key , typename _Tp , typename _Hash , typename _Pred , typename _Alloc >
void swap (unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, unordered_multimap< _Key, _Tp,
_Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
• template<typename _Value , typename _Hash , typename _Pred , typename _Alloc >
void swap (unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__x, unordered_multiset< _Value, _Hash,
_Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
• template<typename _Value , typename _Hash , typename _Pred , typename _Alloc >
void swap (unordered_set< _Value, _Hash, _Pred, _Alloc > &__x, unordered_set< _Value, _Hash, _Pred, _←-
Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
• template<typename _Tp , typename _Alloc >
constexpr void swap (vector< _Tp, _Alloc > &__lhs, vector< _Tp, _Alloc > &__rhs) noexcept(/∗conditional ∗/)
• template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _Require←-
Allocator<_Allocator>>
unordered_map (_InputIterator, _InputIterator, _Allocator) -> unordered_map< __iter_key_t< _InputIterator >,
__iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator
> >, _Allocator >
• template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _Require←-
Allocator<_Allocator>>
unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type, _Allocator) ->
unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _Input←-
Iterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
• template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type, _Hash, ←-
_Allocator) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash,
equal_to< __iter_key_t< _InputIterator > >, _Allocator >
Generated by Doxygen
4.11 std::__debug Namespace Reference 645
Generated by Doxygen
646
unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type, _Hash,
_Allocator) -> unordered_multimap< _Key, _Tp, _Hash, equal_to< _Key >, _Allocator >
• template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Allocator
= allocator<pair<const _Key, _Tp>>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>,
typename = _RequireAllocator<_Allocator>>
unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type={}, ←-
_Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multimap< _Key, _Tp, _Hash, _Pred,
_Allocator >
• template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _Require←-
Allocator<_Allocator>>
unordered_multiset (_InputIterator, _InputIterator, unordered_multiset< int >::size_type, _Allocator) ->
unordered_multiset< typename iterator_traits< _InputIterator >::value_type, hash< typename iterator_traits<
_InputIterator >::value_type >, equal_to< typename iterator_traits< _InputIterator >::value_type >, _Allocator
>
• template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
unordered_multiset (_InputIterator, _InputIterator, unordered_multiset< int >::size_type, _Hash, _Allocator) -
> unordered_multiset< typename iterator_traits< _InputIterator >::value_type, _Hash, equal_to< typename
iterator_traits< _InputIterator >::value_type >, _Allocator >
• template<typename _InputIterator , typename _Hash = hash<typename iterator_traits<_InputIterator>::value_type>, typename _Pred
= equal_to<typename iterator_traits<_InputIterator>::value_type>, typename _Allocator = allocator<typename iterator_traits<_Input←-
Iterator>::value_type>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename
= _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
unordered_multiset (_InputIterator, _InputIterator, unordered_multiset< int >::size_type={}, _Hash=_Hash(),
_Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multiset< typename iterator_traits< _InputIterator >←-
::value_type, _Hash, _Pred, _Allocator >
• template<typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
unordered_multiset (initializer_list< _Tp >, unordered_multiset< int >::size_type, _Allocator) -> unordered←-
_multiset< _Tp, hash< _Tp >, equal_to< _Tp >, _Allocator >
• template<typename _Tp , typename _Hash , typename _Allocator , typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = ←-
_RequireAllocator<_Allocator>>
unordered_multiset (initializer_list< _Tp >, unordered_multiset< int >::size_type, _Hash, _Allocator) ->
unordered_multiset< _Tp, _Hash, equal_to< _Tp >, _Allocator >
• template<typename _Tp , typename _Hash = hash<_Tp>, typename _Pred = equal_to<_Tp>, typename _Allocator = allocator<_Tp>,
typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_←-
Allocator>>
unordered_multiset (initializer_list< _Tp >, unordered_multiset< int >::size_type={}, _Hash=_Hash(), _←-
Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multiset< _Tp, _Hash, _Pred, _Allocator >
• template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _Require←-
Allocator<_Allocator>>
unordered_set (_InputIterator, _InputIterator, unordered_set< int >::size_type, _Allocator) -> unordered_←-
set< typename iterator_traits< _InputIterator >::value_type, hash< typename iterator_traits< _InputIterator >←-
::value_type >, equal_to< typename iterator_traits< _InputIterator >::value_type >, _Allocator >
• template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
unordered_set (_InputIterator, _InputIterator, unordered_set< int >::size_type, _Hash, _Allocator) ->
unordered_set< typename iterator_traits< _InputIterator >::value_type, _Hash, equal_to< typename
iterator_traits< _InputIterator >::value_type >, _Allocator >
• template<typename _InputIterator , typename _Hash = hash<typename iterator_traits<_InputIterator>::value_type>, typename _Pred
= equal_to<typename iterator_traits<_InputIterator>::value_type>, typename _Allocator = allocator<typename iterator_traits<_Input←-
Iterator>::value_type>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename
= _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
unordered_set (_InputIterator, _InputIterator, unordered_set< int >::size_type={}, _Hash=_Hash(), _Pred=_←-
Generated by Doxygen
4.12 std::__detail Namespace Reference 647
swap()
• struct _BracketMatcher
• class _Compiler
• class _Executor
• struct _List_node_base
• struct _List_node_header
• struct _Quoted_string
• class _Scanner
• class _StateSeq
Generated by Doxygen
648
Typedefs
• using __bare_timed_wait
• using __bare_wait
• template<typename _Tp , typename _Up >
using __cmp3way_res_t
• using __enters_timed_wait
• using __enters_wait
• using __platform_wait_t
• template<typename _Tp >
using __unsigned_least_t
• using __wait_clock_t
• template<typename _CharT >
using _Matcher
• typedef long _StateIdT
Enumerations
Functions
Generated by Doxygen
4.12 std::__detail Namespace Reference 649
Generated by Doxygen
650
Variables
__from_chars_alnum()
__from_chars_pow2_base()
Generated by Doxygen
4.13 std::__parallel Namespace Reference 651
operator<<() [1/2]
operator<<() [2/2]
operator>>()
• struct _CRandNumber
Functions
Generated by Doxygen
652
• template<typename _IIter , typename _OIter , typename _BinaryOper , typename _Tag1 , typename _Tag2 >
_OIter __adjacent_difference_switch (_IIter, _IIter, _OIter, _BinaryOper, _Tag1, _Tag2)
• template<typename _IIter , typename _OIter , typename _BinaryOper >
_OIter __adjacent_difference_switch (_IIter, _IIter, _OIter, _BinaryOper, random_access_iterator_tag,
random_access_iterator_tag, __gnu_parallel::_Parallelism __parallelism=__gnu_parallel::parallel_unbalanced)
• template<typename _FIter , typename _BiPredicate , typename _IterTag >
_FIter __adjacent_find_switch (_FIter, _FIter, _BiPredicate, _IterTag)
• template<typename _FIter , typename _IterTag >
_FIter __adjacent_find_switch (_FIter, _FIter, _IterTag)
• template<typename _FIterator , typename _BinaryPredicate , typename _IteratorTag >
_FIterator __adjacent_find_switch (_FIterator __begin, _FIterator __end, _BinaryPredicate __pred, _Iterator←-
Tag)
• template<typename _FIterator , typename _IteratorTag >
_FIterator __adjacent_find_switch (_FIterator __begin, _FIterator __end, _IteratorTag)
• template<typename _RAIter , typename _BinaryPredicate >
_RAIter __adjacent_find_switch (_RAIter __begin, _RAIter __end, _BinaryPredicate __pred, random_access_iterator_tag)
• template<typename _RAIter >
_RAIter __adjacent_find_switch (_RAIter __begin, _RAIter __end, random_access_iterator_tag)
• template<typename _RAIter , typename _BiPredicate >
_RAIter __adjacent_find_switch (_RAIter, _RAIter, _BiPredicate, random_access_iterator_tag)
• template<typename _IIter , typename _Predicate , typename _IteratorTag >
iterator_traits< _IIter >::difference_type __count_if_switch (_IIter __begin, _IIter __end, _Predicate __pred,
_IteratorTag)
• template<typename _IIter , typename _Predicate , typename _IterTag >
iterator_traits< _IIter >::difference_type __count_if_switch (_IIter, _IIter, _Predicate, _IterTag)
• template<typename _RAIter , typename _Predicate >
iterator_traits< _RAIter >::difference_type __count_if_switch (_RAIter __begin, _RAIter __end, _Predicate _←-
_pred, random_access_iterator_tag, __gnu_parallel::_Parallelism __parallelism_tag)
• template<typename _IIter , typename _Tp , typename _IteratorTag >
iterator_traits< _IIter >::difference_type __count_switch (_IIter __begin, _IIter __end, const _Tp &__value, _←-
IteratorTag)
• template<typename _IIter , typename _Tp , typename _IterTag >
iterator_traits< _IIter >::difference_type __count_switch (_IIter, _IIter, const _Tp &, _IterTag)
• template<typename _RAIter , typename _Tp >
iterator_traits< _RAIter >::difference_type __count_switch (_RAIter __begin, _RAIter __end, const _Tp &__←-
value, random_access_iterator_tag, __gnu_parallel::_Parallelism __parallelism_tag)
• template<typename _IIter1 , typename _IIter2 , typename _Predicate , typename _IteratorTag1 , typename _IteratorTag2 >
bool __equal_switch (_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, _Predicate __pred,
_IteratorTag1, _IteratorTag2)
• template<typename _RAIter1 , typename _RAIter2 , typename _Predicate >
bool __equal_switch (_RAIter1 __begin1, _RAIter1 __end1, _RAIter2 __begin2, _RAIter2 __end2, _Predicate
__pred, random_access_iterator_tag, random_access_iterator_tag)
• template<typename _IIter , typename _FIterator , typename _BinaryPredicate , typename _IteratorTag1 , typename _IteratorTag2 >
_IIter __find_first_of_switch (_IIter __begin1, _IIter __end1, _FIterator __begin2, _FIterator __end2, _Binary←-
Predicate __comp, _IteratorTag1, _IteratorTag2)
• template<typename _IIter , typename _FIterator , typename _IteratorTag1 , typename _IteratorTag2 >
_IIter __find_first_of_switch (_IIter __begin1, _IIter __end1, _FIterator __begin2, _FIterator __end2, _Iterator←-
Tag1, _IteratorTag2)
• template<typename _IIter , typename _FIter , typename _BiPredicate , typename _IterTag1 , typename _IterTag2 >
_IIter __find_first_of_switch (_IIter, _IIter, _FIter, _FIter, _BiPredicate, _IterTag1, _IterTag2)
• template<typename _IIter , typename _FIter , typename _IterTag1 , typename _IterTag2 >
_IIter __find_first_of_switch (_IIter, _IIter, _FIter, _FIter, _IterTag1, _IterTag2)
Generated by Doxygen
4.13 std::__parallel Namespace Reference 653
Generated by Doxygen
654
• template<typename _IIter1 , typename _IIter2 , typename _Predicate , typename _IterTag1 , typename _IterTag2 >
bool __lexicographical_compare_switch (_IIter1, _IIter1, _IIter2, _IIter2, _Predicate, _IterTag1, _IterTag2)
• template<typename _RAIter1 , typename _RAIter2 , typename _Predicate >
bool __lexicographical_compare_switch (_RAIter1 __begin1, _RAIter1 __end1, _RAIter2 __begin2, _RAIter2
__end2, _Predicate __pred, random_access_iterator_tag, random_access_iterator_tag)
• template<typename _FIter , typename _Compare , typename _IterTag >
_FIter __max_element_switch (_FIter, _FIter, _Compare, _IterTag)
• template<typename _FIterator , typename _Compare , typename _IteratorTag >
_FIterator __max_element_switch (_FIterator __begin, _FIterator __end, _Compare __comp, _IteratorTag)
• template<typename _RAIter , typename _Compare >
_RAIter __max_element_switch (_RAIter __begin, _RAIter __end, _Compare __comp, random_access_iterator_tag,
__gnu_parallel::_Parallelism __parallelism_tag)
• template<typename _IIter1 , typename _IIter2 , typename _OutputIterator , typename _Compare , typename _IteratorTag1 , typename _←-
IteratorTag2 , typename _IteratorTag3 >
_OutputIterator __merge_switch (_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, _Output←-
Iterator __result, _Compare __comp, _IteratorTag1, _IteratorTag2, _IteratorTag3)
• template<typename _IIter1 , typename _IIter2 , typename _OutputIterator , typename _Compare >
_OutputIterator __merge_switch (_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, ←-
_OutputIterator __result, _Compare __comp, random_access_iterator_tag, random_access_iterator_tag,
random_access_iterator_tag)
• template<typename _IIter1 , typename _IIter2 , typename _OIter , typename _Compare , typename _IterTag1 , typename _IterTag2 , type-
name _IterTag3 >
_OIter __merge_switch (_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare, _IterTag1, _IterTag2, _IterTag3)
• template<typename _IIter1 , typename _IIter2 , typename _OIter , typename _Compare >
_OIter __merge_switch (_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare, random_access_iterator_tag,
random_access_iterator_tag, random_access_iterator_tag)
• template<typename _FIter , typename _Compare , typename _IterTag >
_FIter __min_element_switch (_FIter, _FIter, _Compare, _IterTag)
• template<typename _FIterator , typename _Compare , typename _IteratorTag >
_FIterator __min_element_switch (_FIterator __begin, _FIterator __end, _Compare __comp, _IteratorTag)
• template<typename _RAIter , typename _Compare >
_RAIter __min_element_switch (_RAIter __begin, _RAIter __end, _Compare __comp, random_access_iterator_tag,
__gnu_parallel::_Parallelism __parallelism_tag)
• template<typename _IIter1 , typename _IIter2 , typename _Predicate , typename _IteratorTag1 , typename _IteratorTag2 >
pair< _IIter1, _IIter2 > __mismatch_switch (_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2,
_Predicate __pred, _IteratorTag1, _IteratorTag2)
• template<typename _IIter1 , typename _IIter2 , typename _Predicate , typename _IteratorTag1 , typename _IteratorTag2 >
pair< _IIter1, _IIter2 > __mismatch_switch (_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _Predicate _←-
_pred, _IteratorTag1, _IteratorTag2)
• template<typename _IIter1 , typename _IIter2 , typename _Predicate , typename _IterTag1 , typename _IterTag2 >
pair< _IIter1, _IIter2 > __mismatch_switch (_IIter1, _IIter1, _IIter2, _Predicate, _IterTag1, _IterTag2)
• template<typename _RAIter1 , typename _RAIter2 , typename _Predicate >
pair< _RAIter1, _RAIter2 > __mismatch_switch (_RAIter1 __begin1, _RAIter1 __end1, _RAIter2 __begin2,
_Predicate __pred, random_access_iterator_tag, random_access_iterator_tag)
• template<typename _RAIter1 , typename _RAIter2 , typename _Predicate >
pair< _RAIter1, _RAIter2 > __mismatch_switch (_RAIter1 __begin1, _RAIter1 __end1, _RAIter2 __begin2,
_RAIter2 __end2, _Predicate __pred, random_access_iterator_tag, random_access_iterator_tag)
• template<typename _IIter , typename _OutputIterator , typename _BinaryOperation , typename _IteratorTag1 , typename _IteratorTag2 >
_OutputIterator __partial_sum_switch (_IIter __begin, _IIter __end, _OutputIterator __result, _BinaryOperation
__bin_op, _IteratorTag1, _IteratorTag2)
• template<typename _IIter , typename _OutputIterator , typename _BinaryOperation >
_OutputIterator __partial_sum_switch (_IIter __begin, _IIter __end, _OutputIterator __result, _BinaryOperation
__bin_op, random_access_iterator_tag, random_access_iterator_tag)
Generated by Doxygen
4.13 std::__parallel Namespace Reference 655
• template<typename _IIter , typename _OIter , typename _BinaryOper , typename _Tag1 , typename _Tag2 >
_OIter __partial_sum_switch (_IIter, _IIter, _OIter, _BinaryOper, _Tag1, _Tag2)
• template<typename _IIter , typename _OIter , typename _BinaryOper >
_OIter __partial_sum_switch (_IIter, _IIter, _OIter, _BinaryOper, random_access_iterator_tag, random_access_iterator_tag)
• template<typename _FIter , typename _Predicate , typename _IterTag >
_FIter __partition_switch (_FIter, _FIter, _Predicate, _IterTag)
• template<typename _FIterator , typename _Predicate , typename _IteratorTag >
_FIterator __partition_switch (_FIterator __begin, _FIterator __end, _Predicate __pred, _IteratorTag)
• template<typename _RAIter , typename _Predicate >
_RAIter __partition_switch (_RAIter __begin, _RAIter __end, _Predicate __pred, random_access_iterator_tag)
• template<typename _FIter , typename _Predicate , typename _Tp , typename _IterTag >
void __replace_if_switch (_FIter, _FIter, _Predicate, const _Tp &, _IterTag)
• template<typename _FIterator , typename _Predicate , typename _Tp , typename _IteratorTag >
void __replace_if_switch (_FIterator __begin, _FIterator __end, _Predicate __pred, const _Tp &__new_value,
_IteratorTag)
• template<typename _RAIter , typename _Predicate , typename _Tp >
void __replace_if_switch (_RAIter __begin, _RAIter __end, _Predicate __pred, const _Tp &__new_value,
random_access_iterator_tag, __gnu_parallel::_Parallelism __parallelism_tag)
• template<typename _FIter , typename _Tp , typename _IterTag >
void __replace_switch (_FIter, _FIter, const _Tp &, const _Tp &, _IterTag)
• template<typename _FIterator , typename _Tp , typename _IteratorTag >
void __replace_switch (_FIterator __begin, _FIterator __end, const _Tp &__old_value, const _Tp &__new_value,
_IteratorTag)
• template<typename _RAIter , typename _Tp >
void __replace_switch (_RAIter __begin, _RAIter __end, const _Tp &__old_value, const _Tp &__new_value,
random_access_iterator_tag, __gnu_parallel::_Parallelism __parallelism_tag)
• template<typename _FIter , typename _Integer , typename _Tp , typename _BiPredicate , typename _IterTag >
_FIter __search_n_switch (_FIter, _FIter, _Integer, const _Tp &, _BiPredicate, _IterTag)
• template<typename _FIterator , typename _Integer , typename _Tp , typename _BinaryPredicate , typename _IteratorTag >
_FIterator __search_n_switch (_FIterator __begin, _FIterator __end, _Integer __count, const _Tp &__val, _←-
BinaryPredicate __binary_pred, _IteratorTag)
• template<typename _RAIter , typename _Integer , typename _Tp , typename _BinaryPredicate >
_RAIter __search_n_switch (_RAIter __begin, _RAIter __end, _Integer __count, const _Tp &__val, _Binary←-
Predicate __binary_pred, random_access_iterator_tag)
• template<typename _RAIter , typename _Integer , typename _Tp , typename _BiPredicate >
_RAIter __search_n_switch (_RAIter, _RAIter, _Integer, const _Tp &, _BiPredicate, random_access_iterator_tag)
• template<typename _FIter1 , typename _FIter2 , typename _BiPredicate , typename _IterTag1 , typename _IterTag2 >
_FIter1 __search_switch (_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate, _IterTag1, _IterTag2)
• template<typename _FIter1 , typename _FIter2 , typename _IterTag1 , typename _IterTag2 >
_FIter1 __search_switch (_FIter1, _FIter1, _FIter2, _FIter2, _IterTag1, _IterTag2)
• template<typename _FIterator1 , typename _FIterator2 , typename _BinaryPredicate , typename _IteratorTag1 , typename _IteratorTag2 >
_FIterator1 __search_switch (_FIterator1 __begin1, _FIterator1 __end1, _FIterator2 __begin2, _FIterator2 __←-
end2, _BinaryPredicate __pred, _IteratorTag1, _IteratorTag2)
• template<typename _FIterator1 , typename _FIterator2 , typename _IteratorTag1 , typename _IteratorTag2 >
_FIterator1 __search_switch (_FIterator1 __begin1, _FIterator1 __end1, _FIterator2 __begin2, _FIterator2 __←-
end2, _IteratorTag1, _IteratorTag2)
• template<typename _RAIter1 , typename _RAIter2 , typename _BinaryPredicate >
_RAIter1 __search_switch (_RAIter1 __begin1, _RAIter1 __end1, _RAIter2 __begin2, _RAIter2 __end2, _←-
BinaryPredicate __pred, random_access_iterator_tag, random_access_iterator_tag)
• template<typename _RAIter1 , typename _RAIter2 >
_RAIter1 __search_switch (_RAIter1 __begin1, _RAIter1 __end1, _RAIter2 __begin2, _RAIter2 __end2,
random_access_iterator_tag, random_access_iterator_tag)
Generated by Doxygen
656
Generated by Doxygen
4.13 std::__parallel Namespace Reference 657
Generated by Doxygen
658
Generated by Doxygen
4.13 std::__parallel Namespace Reference 659
Generated by Doxygen
660
Generated by Doxygen
4.13 std::__parallel Namespace Reference 661
Generated by Doxygen
662
Generated by Doxygen
4.13 std::__parallel Namespace Reference 663
Generated by Doxygen
664
Generated by Doxygen
4.13 std::__parallel Namespace Reference 665
Generated by Doxygen
666
Generated by Doxygen
4.13 std::__parallel Namespace Reference 667
Generated by Doxygen
668
search()
Parameters
Returns
__searcher(__first,__last).first
• class duration
• struct duration_values
• class gps_clock
• class hh_mm_ss
• struct steady_clock
Generated by Doxygen
4.14 std::chrono Namespace Reference 669
• struct system_clock
• class tai_clock
• class time_point
• struct treat_as_floating_point
• class tzdb_list
• class utc_clock
Typedefs
• using days
• using file_clock
• template<typename _Duration >
using file_time
• using gps_seconds
• template<typename _Duration >
using gps_time
• using high_resolution_clock
• using hours
• using local_days
• using local_seconds
• template<typename _Duration >
using local_time
• using microseconds
• using milliseconds
• using minutes
• using months
• using nanoseconds
• using seconds
• using sys_days
• using sys_seconds
• template<typename _Duration >
using sys_time
• using tai_seconds
• template<typename _Duration >
using tai_time
• using utc_seconds
• template<typename _Duration >
using utc_time
• using weeks
• using years
• using zoned_seconds
Enumerations
Generated by Doxygen
670
Functions
Generated by Doxygen
4.14 std::chrono Namespace Reference 671
Generated by Doxygen
672
Generated by Doxygen
4.14 std::chrono Namespace Reference 673
Generated by Doxygen
674
Variables
Generated by Doxygen
4.14 std::chrono Namespace Reference 675
Generated by Doxygen
676
• class decimal128
• class decimal32
• class decimal64
Functions
Generated by Doxygen
4.15 std::decimal Namespace Reference 677
Generated by Doxygen
678
Generated by Doxygen
4.15 std::decimal Namespace Reference 679
Generated by Doxygen
680
Generated by Doxygen
4.15 std::decimal Namespace Reference 681
Generated by Doxygen
682
Generated by Doxygen
4.15 std::decimal Namespace Reference 683
Generated by Doxygen
684
Generated by Doxygen
4.16 std::experimental Namespace Reference 685
decimal32_to_long_long()
• class any
• class bad_any_cast
• class bad_optional_access
• class basic_string_view
• struct in_place_t
• struct nullopt_t
• class optional
• class ostream_joiner
• struct owner_less< shared_ptr< _Tp > >
• struct owner_less< weak_ptr< _Tp > >
• class propagate_const
Typedefs
• template<typename _RAIter , typename _Hash , typename _Pred , typename _Val = typename iterator_traits<_RAIter>::value_type, type-
name _Diff = typename iterator_traits<_RAIter>::difference_type>
using __boyer_moore_base_t
• template<typename _Tp >
using __propagate_const_elem_type
• using erased_type
• using string_view
• using u16string_view
• using u32string_view
• using wstring_view
Generated by Doxygen
686
Functions
Generated by Doxygen
4.16 std::experimental Namespace Reference 687
Generated by Doxygen
688
Generated by Doxygen
4.16 std::experimental Namespace Reference 689
Generated by Doxygen
690
Generated by Doxygen
4.16 std::experimental Namespace Reference 691
Generated by Doxygen
692
Variables
Generated by Doxygen
4.16 std::experimental Namespace Reference 693
Generated by Doxygen
694
Generated by Doxygen
4.16 std::experimental Namespace Reference 695
• template<typename... _Bn>
constexpr bool conjunction_v
• template<typename... _Bn>
constexpr bool disjunction_v
• template<typename _Pp >
constexpr bool negation_v
• template<typename... >
using void_t
• template<typename _Default , template< typename... > class _Op, typename... _Args>
using detected_or
• template<typename _Default , template< typename... > class _Op, typename... _Args>
using detected_or_t
• template<template< typename... > class _Op, typename... _Args>
using detected_t
• template<template< typename... > class _Op, typename... _Args>
using is_detected
• template<typename _Expected , template< typename... > class _Op, typename... _Args>
using is_detected_exact
• template<typename _To , template< typename... > class _Op, typename... _Args>
using is_detected_convertible
• template<template< typename... > class _Op, typename... _Args>
constexpr bool is_detected_v
• template<typename _Expected , template< typename... > class _Op, typename... _Args>
constexpr bool is_detected_exact_v
• template<typename _To , template< typename... > class _Op, typename... _Args>
constexpr bool is_detected_convertible_v
Generated by Doxygen
696
gcd()
get_deleter()
lcm()
make_boyer_moore_horspool_searcher()
make_boyer_moore_searcher()
make_default_searcher()
Generated by Doxygen
4.17 std::filesystem Namespace Reference 697
_ForwardIterator __pat_last,
_BinaryPredicate __pred = _BinaryPredicate()) [inline]
Generator function for default_searcher.
make_ostream_joiner()
not_fn()
sample()
is_bind_expression_v
is_placeholder_v
• class directory_entry
• class directory_iterator
• class file_status
• class filesystem_error
• class path
Generated by Doxygen
698
• class recursive_directory_iterator
• struct space_info
Typedefs
• using file_time_type
Enumerations
Functions
Generated by Doxygen
4.17 std::filesystem Namespace Reference 699
• void create_symlink (const path &__to, const path &__new_symlink, error_code &__ec) noexcept
• path current_path ()
• void current_path (const path &__p)
• void current_path (const path &__p, error_code &__ec) noexcept
• path current_path (error_code &__ec)
• bool equivalent (const path &__p1, const path &__p2)
• bool equivalent (const path &__p1, const path &__p2, error_code &__ec) noexcept
• bool exists (const path &__p)
• bool exists (const path &__p, error_code &__ec) noexcept
• bool exists (file_status) noexcept
• uintmax_t file_size (const path &)
• uintmax_t file_size (const path &, error_code &) noexcept
• uintmax_t hard_link_count (const path &)
• uintmax_t hard_link_count (const path &, error_code &) noexcept
• size_t hash_value (const path &__p) noexcept
• bool is_block_file (const path &__p)
• bool is_block_file (const path &__p, error_code &__ec) noexcept
• bool is_block_file (file_status __s) noexcept
• bool is_character_file (const path &__p)
• bool is_character_file (const path &__p, error_code &__ec) noexcept
• bool is_character_file (file_status __s) noexcept
• bool is_directory (const path &__p)
• bool is_directory (const path &__p, error_code &__ec) noexcept
• bool is_directory (file_status __s) noexcept
• bool is_empty (const path &__p)
• bool is_empty (const path &__p, error_code &__ec)
• bool is_fifo (const path &__p)
• bool is_fifo (const path &__p, error_code &__ec) noexcept
• bool is_fifo (file_status __s) noexcept
• bool is_other (const path &__p)
• bool is_other (const path &__p, error_code &__ec) noexcept
• bool is_other (file_status) noexcept
• bool is_regular_file (const path &__p)
• bool is_regular_file (const path &__p, error_code &__ec) noexcept
• bool is_regular_file (file_status) noexcept
• bool is_socket (const path &__p)
• bool is_socket (const path &__p, error_code &__ec) noexcept
• bool is_socket (file_status __s) noexcept
• bool is_symlink (const path &__p)
• bool is_symlink (const path &__p, error_code &__ec) noexcept
• bool is_symlink (file_status) noexcept
• file_time_type last_write_time (const path &)
• file_time_type last_write_time (const path &, error_code &) noexcept
• void last_write_time (const path &__p, file_time_type __new_time)
• void last_write_time (const path &__p, file_time_type __new_time, error_code &__ec) noexcept
• copy_options & operator&= (copy_options &__x, copy_options __y) noexcept
• constexpr copy_options operator∧ (copy_options __x, copy_options __y) noexcept
• copy_options & operator∧ = (copy_options &__x, copy_options __y) noexcept
• constexpr copy_options operator| (copy_options __x, copy_options __y) noexcept
• copy_options & operator|= (copy_options &__x, copy_options __y) noexcept
• constexpr copy_options operator∼ (copy_options __x) noexcept
Generated by Doxygen
700
• void permissions (const path &, perms, perm_options, error_code &) noexcept
• void permissions (const path &__p, perms __prms, error_code &__ec) noexcept
• void permissions (const path &__p, perms __prms, perm_options __opts=perm_options::replace)
• path proximate (const path &__p, const path &__base, error_code &__ec)
• path proximate (const path &__p, const path &__base=current_path())
• path proximate (const path &__p, error_code &__ec)
• path read_symlink (const path &__p)
• path read_symlink (const path &__p, error_code &__ec)
• path relative (const path &__p, const path &__base, error_code &__ec)
• path relative (const path &__p, const path &__base=current_path())
• path relative (const path &__p, error_code &__ec)
• bool remove (const path &, error_code &) noexcept
• bool remove (const path &__p)
• uintmax_t remove_all (const path &)
• uintmax_t remove_all (const path &, error_code &)
• void rename (const path &__from, const path &__to)
• void rename (const path &__from, const path &__to, error_code &__ec) noexcept
• void resize_file (const path &__p, uintmax_t __size)
• void resize_file (const path &__p, uintmax_t __size, error_code &__ec) noexcept
• space_info space (const path &__p)
• space_info space (const path &__p, error_code &__ec) noexcept
• file_status status (const path &)
• file_status status (const path &, error_code &) noexcept
• bool status_known (file_status) noexcept
• void swap (path &__lhs, path &__rhs) noexcept
• file_status symlink_status (const path &)
• file_status symlink_status (const path &, error_code &) noexcept
• path temp_directory_path ()
• path temp_directory_path (error_code &__ec)
• template<typename _InputIterator , typename _Require = __detail::_Path2<_InputIterator>, typename _CharT = __detail::__value_type←-
_is_char_or_char8_t<_InputIterator>>
path u8path (_InputIterator __first, _InputIterator __last)
• template<typename _Source , typename _Require = __detail::_Path<_Source>, typename _CharT = __detail::__value_type_is_char_or←-
_char8_t<_Source>>
path u8path (const _Source &__source)
• path weakly_canonical (const path &__p)
• path weakly_canonical (const path &__p, error_code &__ec)
Generated by Doxygen
4.18 std::literals Namespace Reference 701
• namespace chrono_literals
Functions
Generated by Doxygen
702
• using std::chrono_literals::operator""s;
The result of these suffixes on an integer literal is one of the standard typedefs such as std::chrono::hours.
The result on a floating-point literal is a duration type with the specified tick period and an unspecified floating-point
representation, for example 1.5e2ms might be equivalent to chrono::duration<long double, chrono←-
::milli>(1.5e2).
Since
C+14
Generated by Doxygen
4.20 std::placeholders Namespace Reference 703
Since
C++11
Generated by Doxygen
704
Matching a regular expression against a sequence of characters [first, last) proceeds according to the rules of the
grammar specified for the regular expression object, modified according to the effects listed below for any bitmask
elements set.
Generated by Doxygen
4.21 std::regex_constants Namespace Reference 705
• enum error_type {
_S_error_collate , _S_error_ctype , _S_error_escape , _S_error_backref ,
_S_error_brack , _S_error_paren , _S_error_brace , _S_error_badbrace ,
_S_error_range , _S_error_space , _S_error_badrepeat , _S_error_complexity ,
_S_error_stack , _S_null , _S_grammar }
• constexpr error_type error_collate (_S_error_collate)
• constexpr error_type error_ctype (_S_error_ctype)
• constexpr error_type error_escape (_S_error_escape)
• constexpr error_type error_backref (_S_error_backref)
• constexpr error_type error_brack (_S_error_brack)
• constexpr error_type error_paren (_S_error_paren)
• constexpr error_type error_brace (_S_error_brace)
• constexpr error_type error_badbrace (_S_error_badbrace)
• constexpr error_type error_range (_S_error_range)
• constexpr error_type error_space (_S_error_space)
• constexpr error_type error_badrepeat (_S_error_badrepeat)
• constexpr error_type error_complexity (_S_error_complexity)
• constexpr error_type error_stack (_S_error_stack)
ISO C++ 2011 namespace for options and flags used with std::regex.
error_type
enum std::regex_constants::error_type
The expression contained an invalid collating element name.
match_flag_type
syntax_option_type
error_backref()
error_type std::regex_constants::error_backref (
_S_error_backref ) [inline], [constexpr]
The expression contained an invalid back reference.
Generated by Doxygen
706
error_badbrace()
error_type std::regex_constants::error_badbrace (
_S_error_badbrace ) [inline], [constexpr]
The expression contained an invalid range in a {} expression.
error_badrepeat()
error_type std::regex_constants::error_badrepeat (
_S_error_badrepeat ) [inline], [constexpr]
One of ∗?+{ was not preceded by a valid regular expression.
error_brace()
error_type std::regex_constants::error_brace (
_S_error_brace ) [inline], [constexpr]
The expression contained mismatched { and }
error_brack()
error_type std::regex_constants::error_brack (
_S_error_brack ) [inline], [constexpr]
The expression contained mismatched [ and ].
error_collate()
error_type std::regex_constants::error_collate (
_S_error_collate ) [inline], [constexpr]
The expression contained an invalid collating element name.
error_complexity()
error_type std::regex_constants::error_complexity (
_S_error_complexity ) [inline], [constexpr]
The complexity of an attempted match against a regular expression exceeded a pre-set level.
error_ctype()
error_type std::regex_constants::error_ctype (
_S_error_ctype ) [inline], [constexpr]
The expression contained an invalid character class name.
error_escape()
error_type std::regex_constants::error_escape (
_S_error_escape ) [inline], [constexpr]
The expression contained an invalid escaped character, or a trailing escape.
error_paren()
error_type std::regex_constants::error_paren (
_S_error_paren ) [inline], [constexpr]
The expression contained mismatched ( and ).
Generated by Doxygen
4.21 std::regex_constants Namespace Reference 707
error_range()
error_type std::regex_constants::error_range (
_S_error_range ) [inline], [constexpr]
The expression contained an invalid character range, such as [b-a] in most encodings.
error_space()
error_type std::regex_constants::error_space (
_S_error_space ) [inline], [constexpr]
There was insufficient memory to convert the expression into a finite state machine.
error_stack()
error_type std::regex_constants::error_stack (
_S_error_stack ) [inline], [constexpr]
There was insufficient memory to determine whether the regular expression could match the specified character se-
quence.
operator&() [1/2]
match_flag_type std::regex_constants::operator& (
match_flag_type __a,
match_flag_type __b) [constexpr], [noexcept]
This is a bitmask type indicating regex matching rules.
The match_flag_type is implementation defined but it is valid to perform bitwise operations on these values and
expect the right thing to happen.
operator&() [2/2]
syntax_option_type std::regex_constants::operator& (
syntax_option_type __a,
syntax_option_type __b) [constexpr], [noexcept]
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type is implementation defined but it is valid to perform bitwise operations on these values
and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript, basic, extended,
awk, grep, egrep set.
operator&=() [1/2]
operator&=() [2/2]
Generated by Doxygen
708
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript, basic, extended,
awk, grep, egrep set.
operator∧ () [1/2]
match_flag_type std::regex_constants::operator∧ (
match_flag_type __a,
match_flag_type __b) [constexpr], [noexcept]
This is a bitmask type indicating regex matching rules.
The match_flag_type is implementation defined but it is valid to perform bitwise operations on these values and
expect the right thing to happen.
operator∧ () [2/2]
syntax_option_type std::regex_constants::operator∧ (
syntax_option_type __a,
syntax_option_type __b) [constexpr], [noexcept]
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type is implementation defined but it is valid to perform bitwise operations on these values
and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript, basic, extended,
awk, grep, egrep set.
operator"|() [1/2]
match_flag_type std::regex_constants::operator| (
match_flag_type __a,
match_flag_type __b) [constexpr], [noexcept]
This is a bitmask type indicating regex matching rules.
The match_flag_type is implementation defined but it is valid to perform bitwise operations on these values and
expect the right thing to happen.
operator"|() [2/2]
syntax_option_type std::regex_constants::operator| (
Generated by Doxygen
4.21 std::regex_constants Namespace Reference 709
syntax_option_type __a,
syntax_option_type __b) [constexpr], [noexcept]
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type is implementation defined but it is valid to perform bitwise operations on these values
and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript, basic, extended,
awk, grep, egrep set.
operator"|=() [1/2]
operator"|=() [2/2]
operator∼() [1/2]
match_flag_type std::regex_constants::operator∼ (
match_flag_type __a) [constexpr], [noexcept]
This is a bitmask type indicating regex matching rules.
The match_flag_type is implementation defined but it is valid to perform bitwise operations on these values and
expect the right thing to happen.
operator∼() [2/2]
syntax_option_type std::regex_constants::operator∼ (
syntax_option_type __a) [constexpr], [noexcept]
This is a bitmask type indicating how to interpret the regex.
The syntax_option_type is implementation defined but it is valid to perform bitwise operations on these values
and expect the right thing to happen.
A valid value of type syntax_option_type shall have exactly one of the elements ECMAScript, basic, extended,
awk, grep, egrep set.
__multiline
__polynomial
Generated by Doxygen
710
Extension: Ensure both space complexity of compiled regex and time complexity execution are not exponential. If
specified in a regex with back-references, the exception regex_constants::error_complexity will be thrown.
awk
basic
collate
ECMAScript
egrep
extended
format_default
Generated by Doxygen
4.21 std::regex_constants Namespace Reference 711
• $‘ The portion of string that precedes the matched substring. This would be match_results::prefix().
• $’ The portion of string that follows the matched substring. This would be match_results::suffix().
• $n The nth capture, where n is in [1,9] and $n is not followed by a decimal digit. If n <= match_results←-
::size() and the nth capture is undefined, use the empty string instead. If n > match_results::size(), the result is
implementation-defined.
• $nn The nnth capture, where nn is a two-digit decimal number on [01, 99]. If nn <= match_results::size() and the
nth capture is undefined, use the empty string instead. If nn > match_results::size(), the result is implementation-
defined.
format_first_only
format_no_copy
format_sed
grep
icase
match_any
match_continuous
Generated by Doxygen
712
match_default
match_not_bol
match_not_bow
match_not_eol
match_not_eow
match_not_null
match_prev_avail
multiline
Since
C++17
nosubs
Generated by Doxygen
4.22 std::rel_ops Namespace Reference 713
optimize
operator"!=()
Parameters
_←- A thing.
_x
_←- Another thing.
_y
Returns
__x != __y
operator<=()
Generated by Doxygen
714
Generated by Doxygen
4.22 std::rel_ops Namespace Reference 715
Parameters
_←- A thing.
_x
_←- Another thing.
_y
Returns
operator>()
Parameters
_←- A thing.
_x
_←- Another thing.
_y
Returns
operator>=()
Parameters
_←- A thing.
_x
_←- Another thing.
_y
Returns
Generated by Doxygen
716
ISO C++ 2011 namespace for interacting with the current thread.
C++11 30.3.2 [thread.thread.this] Namespace this_thread.
get_id()
sleep_for()
sleep_until()
yield()
• namespace __detail
Functions
Generated by Doxygen
4.24 std::tr1 Namespace Reference 717
• long double assoc_laguerrel (unsigned int __n, unsigned int __m, long double __x)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type assoc_legendre (unsigned int __l, unsigned int __m, _Tp __x)
• float assoc_legendref (unsigned int __l, unsigned int __m, float __x)
• long double assoc_legendrel (unsigned int __l, unsigned int __m, long double __x)
• template<typename _Tpx , typename _Tpy >
__gnu_cxx::__promote_2< _Tpx, _Tpy >::__type beta (_Tpx __x, _Tpy __y)
• float betaf (float __x, float __y)
• long double betal (long double __x, long double __y)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type comp_ellint_1 (_Tp __k)
• float comp_ellint_1f (float __k)
• long double comp_ellint_1l (long double __k)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type comp_ellint_2 (_Tp __k)
• float comp_ellint_2f (float __k)
• long double comp_ellint_2l (long double __k)
• template<typename _Tp , typename _Tpn >
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type comp_ellint_3 (_Tp __k, _Tpn __nu)
• float comp_ellint_3f (float __k, float __nu)
• long double comp_ellint_3l (long double __k, long double __nu)
• template<typename _Tp >
std::complex< typename __gnu_cxx::__promote< _Tp >::__type > conj (_Tp __x)
• template<typename _Tp >
std::complex< _Tp > conj (const std::complex< _Tp > &__z)
• template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_i (_Tpnu __nu, _Tp __x)
• float cyl_bessel_if (float __nu, float __x)
• long double cyl_bessel_il (long double __nu, long double __x)
• template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_j (_Tpnu __nu, _Tp __x)
• float cyl_bessel_jf (float __nu, float __x)
• long double cyl_bessel_jl (long double __nu, long double __x)
• template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_k (_Tpnu __nu, _Tp __x)
• float cyl_bessel_kf (float __nu, float __x)
• long double cyl_bessel_kl (long double __nu, long double __x)
• template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_neumann (_Tpnu __nu, _Tp __x)
• float cyl_neumannf (float __nu, float __x)
• long double cyl_neumannl (long double __nu, long double __x)
• template<typename _Tp , typename _Tpp >
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_1 (_Tp __k, _Tpp __phi)
• float ellint_1f (float __k, float __phi)
• long double ellint_1l (long double __k, long double __phi)
• template<typename _Tp , typename _Tpp >
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_2 (_Tp __k, _Tpp __phi)
• float ellint_2f (float __k, float __phi)
• long double ellint_2l (long double __k, long double __phi)
• template<typename _Tp , typename _Tpn , typename _Tpp >
__gnu_cxx::__promote_3< _Tp, _Tpn, _Tpp >::__type ellint_3 (_Tp __k, _Tpn __nu, _Tpp __phi)
• float ellint_3f (float __k, float __nu, float __phi)
Generated by Doxygen
718
• long double ellint_3l (long double __k, long double __nu, long double __phi)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type expint (_Tp __x)
• float expintf (float __x)
• long double expintl (long double __x)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type fabs (_Tp __x)
• template<typename _Tp >
std::complex< _Tp > fabs (const std::complex< _Tp > &__z)
• float fabs (float __x)
• long double fabs (long double __x)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type hermite (unsigned int __n, _Tp __x)
• float hermitef (unsigned int __n, float __x)
• long double hermitel (unsigned int __n, long double __x)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type laguerre (unsigned int __n, _Tp __x)
• float laguerref (unsigned int __n, float __x)
• long double laguerrel (unsigned int __n, long double __x)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type legendre (unsigned int __n, _Tp __x)
• float legendref (unsigned int __n, float __x)
• long double legendrel (unsigned int __n, long double __x)
• template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > polar (const _Tp &__rho, const _Up
&__theta)
• template<typename _Tp , typename _Up >
__gnu_cxx::__promote_2< _Tp, _Up >::__type pow (_Tp __x, _Up __y)
• template<typename _Tp >
std::complex< _Tp > pow (const _Tp &__x, const std::complex< _Tp > &__y)
• template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > pow (const _Tp &__x, const
std::complex< _Up > &__y)
• template<typename _Tp >
std::complex< _Tp > pow (const std::complex< _Tp > &__x, const _Tp &__y)
• template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > pow (const std::complex< _Tp >
&__x, const _Up &__y)
• template<typename _Tp >
std::complex< _Tp > pow (const std::complex< _Tp > &__x, const std::complex< _Tp > &__y)
• template<typename _Tp , typename _Up >
std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > pow (const std::complex< _Tp >
&__x, const std::complex< _Up > &__y)
• float pow (float __x, float __y)
• long double pow (long double __x, long double __y)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type riemann_zeta (_Tp __x)
• float riemann_zetaf (float __x)
• long double riemann_zetal (long double __x)
• template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type sph_bessel (unsigned int __n, _Tp __x)
• float sph_besself (unsigned int __n, float __x)
Generated by Doxygen
4.25 std::tr1::__detail Namespace Reference 719
• namespace __detail
Classes
• struct __dynamic_bitset_base
• struct __reflection_typelist
• struct __reflection_typelist< _First, _Rest... >
• struct __reflection_typelist<>
• struct bases
• class bool_set
• struct direct_bases
• class dynamic_bitset
Functions
Generated by Doxygen
720
Generated by Doxygen
5 Class Documentation 721
5 Class Documentation
5.1 __gnu_parallel::__accumulate_binop_reduct< _BinOp > Struct Template Reference
#include <for_each_selectors.h>
Public Attributes
template<typename _BinOp>
struct __gnu_parallel::__accumulate_binop_reduct< _BinOp >
• for_each_selectors.h
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__accumulate
_selector< _It >
Public Attributes
• _It _M_finish_iterator
Generated by Doxygen
722
template<typename _It>
struct __gnu_parallel::__accumulate_selector< _It >
std::accumulate() selector.
operator()()
Parameters
Returns
_M_finish_iterator
• for_each_selectors.h
Generated by Doxygen
5.4 __gnu_parallel::__adjacent_find_selector Struct Reference 723
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__adjacent
_difference_selector< _It >
Public Attributes
• _It _M_finish_iterator
template<typename _It>
struct __gnu_parallel::__adjacent_difference_selector< _It >
_M_finish_iterator
• for_each_selectors.h
Generated by Doxygen
724
__gnu_parallel::__generic
_find_selector
__gnu_parallel::__adjacent
_find_selector
_M_sequential_algorithm()
Parameters
References std::make_pair().
Generated by Doxygen
5.5 __gnu_cxx::__alloc_traits< _Alloc, typename > Struct Template Reference 725
operator()()
Parameters
The documentation for this struct was generated from the following file:
• find_selectors.h
std::allocator_traits
< _Alloc >
__gnu_cxx::__alloc
_traits< _Alloc, typename >
Public Types
Generated by Doxygen
726
• using propagate_on_container_swap
• using rebind_alloc
• using rebind_traits
• typedef value_type & reference
• typedef _Base_type::size_type size_type
• typedef _Base_type::value_type value_type
• using void_pointer
const_void_pointer
is_always_equal
Generated by Doxygen
5.5 __gnu_cxx::__alloc_traits< _Alloc, typename > Struct Template Reference 727
propagate_on_container_copy_assignment
propagate_on_container_move_assignment
propagate_on_container_swap
void_pointer
allocate() [1/2]
Parameters
_←- An allocator.
_a
_←- The number of objects to allocate space for.
_n
Calls a.allocate(n)
allocate() [2/2]
Parameters
__a An allocator.
__n The number of objects to allocate space for.
__hint Aid to locality.
Generated by Doxygen
728
Returns
construct()
Parameters
__a An allocator.
__p Pointer to memory of suitable size and alignment for Tp
__args Constructor arguments.
deallocate()
Parameters
_←- An allocator.
_a
_←- Pointer to the memory to deallocate.
_p
_←- The number of objects space was allocated for.
_n
Calls a.deallocate(p, n)
destroy()
Parameters
_←- An allocator.
_a
_←- Pointer to the object to destroy
_p
Generated by Doxygen
5.6 std::__basic_future< _Res > Class Template Reference 729
max_size()
Parameters
_←- An allocator.
_a
Returns
__a.max_size() or numeric_limits<size_type>::max()
select_on_container_copy_construction()
Parameters
__rhs An allocator.
Returns
__rhs.select_on_container_copy_construction() or __rhs
• ext/alloc_traits.h
Generated by Doxygen
730
std::__basic_future
< _Res >
std::shared_future
std::future< _Res >
< _Res >
Protected Types
template<typename _Res>
class std::__basic_future< _Res >
Generated by Doxygen
5.7 __gnu_parallel::__binder1st< _Operation, _FirstArgumentType, _SecondArgumentType, _ResultType >
Class Template Reference 731
_M_get_result()
• future
std::unary_function
< _SecondArgumentType,
_ResultType >
__gnu_parallel::__binder1st
< _Operation, _FirstArgumentType,
_SecondArgumentType, _ResultType >
Public Types
Protected Attributes
• _Operation _M_op
• _FirstArgumentType _M_value
Generated by Doxygen
732
argument_type
result_type
• base.h
std::unary_function
< _FirstArgumentType,
_ResultType >
__gnu_parallel::__binder2nd
< _Operation, _FirstArgumentType,
_SecondArgumentType, _ResultType >
Public Types
Generated by Doxygen
5.9 std::__codecvt_abstract_base< _InternT, _ExternT, _StateT > Class Template Reference 733
Protected Attributes
• _Operation _M_op
• _SecondArgumentType _M_value
argument_type
result_type
• base.h
Generated by Doxygen
734
std::locale::facet std::codecvt_base
std::__codecvt_abstract
_base< _InternT, _ExternT,
_StateT >
std::codecvt< _InternT,
_ExternT, _StateT >
std::codecvt_byname
< _InternT, _ExternT,
_StateT >
Public Types
Generated by Doxygen
5.9 std::__codecvt_abstract_base< _InternT, _ExternT, _StateT > Class Template Reference 735
do_out()
Implemented in std::codecvt< _InternT, _ExternT, _StateT >, std::codecvt< _Elem, char, mbstate_t >, std::codecvt< _InternT, _ExternT,
std::codecvt< char, char, mbstate_t >, std::codecvt< char16_t, char, mbstate_t >, std::codecvt< char32_t, char, mbstate_t >,
and std::codecvt< wchar_t, char, mbstate_t >.
Referenced by std::__codecvt_abstract_base< _InternT, _ExternT, _StateT >::out().
Generated by Doxygen
736
in()
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
out()
Generated by Doxygen
5.9 std::__codecvt_abstract_base< _InternT, _ExternT, _StateT > Class Template Reference 737
The characters in [from,from_end) are converted and written to [to,to_end). from_next and to_next are set to point to the
character following the last successfully converted character, respectively. If the result needed no conversion, from_next
and to_next are not affected.
The state argument should be initialized if the input is at the beginning and carried from a previous call if continuing
conversion. There are no guarantees about how state is used.
The result returned is a member of codecvt_base::result. If all the input is converted, returns codecvt_base::ok. If
no conversion is necessary, returns codecvt_base::noconv. If the input ends early or there is insufficient space in the
output, returns codecvt_base::partial. Otherwise the conversion failed and codecvt_base::error is returned.
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
unshift()
Parameters
__state Persistent conversion state data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Generated by Doxygen
738
Returns
codecvt_base::result.
The documentation for this class was generated from the following file:
• codecvt.h
• mt_allocator.h
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__count
_if_selector< _It, _Diff >
Public Attributes
• _It _M_finish_iterator
Generated by Doxygen
5.12 __gnu_parallel::__count_selector< _It, _Diff > Struct Template Reference 739
std::count_if () selector.
operator()()
Parameters
_←- Operator.
_o
_←- iterator referencing object.
_i
Returns
_M_finish_iterator
• for_each_selectors.h
Generated by Doxygen
740
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__count
_selector< _It, _Diff >
Public Attributes
• _It _M_finish_iterator
std::count() selector.
operator()()
Parameters
Generated by Doxygen
5.13 std::__ctype_abstract_base< _CharT > Class Template Reference 741
Returns
_M_finish_iterator
• for_each_selectors.h
std::locale::facet std::ctype_base
std::__ctype_abstract
_base< _CharT >
std::ctype_byname<
_CharT >
Public Types
• const char_type ∗ is (const char_type ∗__lo, const char_type ∗__hi, mask ∗__vec) const
Generated by Doxygen
742
Generated by Doxygen
5.13 std::__ctype_abstract_base< _CharT > Class Template Reference 743
template<typename _CharT>
class std::__ctype_abstract_base< _CharT >
char_type
do_is() [1/2]
Parameters
Returns
__hi.
do_is() [2/2]
Generated by Doxygen
744
Parameters
Returns
(M & __m) != 0.
do_narrow() [1/2]
Parameters
__c The char_type to convert.
__dfault Char to return if conversion fails.
Returns
do_narrow() [2/2]
Generated by Doxygen
5.13 std::__ctype_abstract_base< _CharT > Class Template Reference 745
Parameters
Returns
__hi.
do_scan_is()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
do_scan_not()
Generated by Doxygen
746
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
do_tolower() [1/2]
Parameters
Returns
__hi.
do_tolower() [2/2]
Generated by Doxygen
5.13 std::__ctype_abstract_base< _CharT > Class Template Reference 747
Parameters
_←- The char_type to convert.
_c
Returns
do_toupper() [1/2]
Parameters
Returns
__hi.
do_toupper() [2/2]
Parameters
_←- The char_type to convert.
_c
Generated by Doxygen
748
Returns
do_widen() [1/2]
Parameters
_←- The char to convert.
_c
Returns
do_widen() [2/2]
Parameters
_←- Pointer to start range.
_lo
_←- Pointer to end of range.
_hi
_←- Pointer to the destination array.
_to
Returns
__hi.
Generated by Doxygen
5.13 std::__ctype_abstract_base< _CharT > Class Template Reference 749
is() [1/2]
Parameters
Returns
__hi.
is() [2/2]
Parameters
Returns
(M & __m) != 0.
narrow() [1/2]
Generated by Doxygen
750
This function converts the char_type to char using the simplest reasonable transformation. If the conversion fails, dfault
is returned instead. It does so by returning ctype<char_type>::do_narrow(__c).
Note: this is not what you want for codepage conversions. See codecvt for that.
Generated by Doxygen
5.13 std::__ctype_abstract_base< _CharT > Class Template Reference 751
Parameters
__c The char_type to convert.
__dfault Char to return if conversion fails.
Returns
narrow() [2/2]
Parameters
Returns
__hi.
scan_is()
Generated by Doxygen
752
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
scan_not()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to first char in range.
_lo
_←- Pointer to end of range.
_hi
Returns
tolower() [1/2]
Parameters
Generated by Doxygen
5.13 std::__ctype_abstract_base< _CharT > Class Template Reference 753
Returns
__hi.
tolower() [2/2]
Parameters
_←- The char_type to convert.
_c
Returns
toupper() [1/2]
Parameters
Returns
__hi.
Generated by Doxygen
754
toupper() [2/2]
Parameters
_←- The char_type to convert.
_c
Returns
widen() [1/2]
Parameters
_←- The char to convert.
_c
Returns
widen() [2/2]
Generated by Doxygen
5.14 std::tr2::__dynamic_bitset_base< _WordT, _Alloc > Struct Template Reference 755
Parameters
Returns
__hi.
• locale_facets.h
std::tr2::__dynamic
_bitset_base< _WordT,
_Alloc >
std::tr2::dynamic_bitset
< _WordT, _Alloc >
Public Types
Generated by Doxygen
756
Public Attributes
Generated by Doxygen
5.15 __gnu_parallel::__fill_selector< _It > Struct Template Reference 757
_M_w
• dynamic_bitset
• dynamic_bitset.tcc
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__fill
_selector< _It >
Public Attributes
• _It _M_finish_iterator
template<typename _It>
struct __gnu_parallel::__fill_selector< _It >
std::fill() selector.
Generated by Doxygen
758
operator()()
Parameters
_M_finish_iterator
• for_each_selectors.h
__gnu_parallel::__generic
_find_selector
__gnu_parallel::__find
_first_of_selector< _FIterator >
Generated by Doxygen
5.16 __gnu_parallel::__find_first_of_selector< _FIterator > Struct Template Reference 759
Public Attributes
• _FIterator _M_begin
• _FIterator _M_end
template<typename _FIterator>
struct __gnu_parallel::__find_first_of_selector< _FIterator >
_M_sequential_algorithm()
Parameters
References std::make_pair().
operator()()
Parameters
Generated by Doxygen
760
Parameters
__pred Find predicate.
The documentation for this struct was generated from the following file:
• find_selectors.h
__gnu_parallel::__generic
_find_selector
__gnu_parallel::__find
_if_selector
Test predicate on a single element, used for std::find() and std::find_if ().
_M_sequential_algorithm()
Generated by Doxygen
5.18 __gnu_parallel::__for_each_selector< _It > Struct Template Reference 761
Parameters
References std::make_pair().
operator()()
Parameters
The documentation for this struct was generated from the following file:
• find_selectors.h
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__for
_each_selector< _It >
Generated by Doxygen
762
Public Attributes
• _It _M_finish_iterator
template<typename _It>
struct __gnu_parallel::__for_each_selector< _It >
std::for_each() selector.
operator()()
Parameters
_←- Operator.
_o
_←- iterator referencing object.
_i
_M_finish_iterator
• for_each_selectors.h
• cxxabi_forced.h
Generated by Doxygen
5.20 __gnu_parallel::__generate_selector< _It > Struct Template Reference 763
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__generate
_selector< _It >
Public Attributes
• _It _M_finish_iterator
template<typename _It>
struct __gnu_parallel::__generate_selector< _It >
std::generate() selector.
operator()()
Parameters
_←- Operator.
_o
_←- iterator referencing object.
_i
Generated by Doxygen
764
_M_finish_iterator
• for_each_selectors.h
__gnu_parallel::__adjacent
_find_selector
__gnu_parallel::__find
_first_of_selector< _FIterator >
__gnu_parallel::__generic
_find_selector
__gnu_parallel::__find
_if_selector
__gnu_parallel::__mismatch
_selector
• find_selectors.h
Generated by Doxygen
5.22 __gnu_parallel::__generic_for_each_selector< _It > Struct Template Reference 765
__gnu_parallel::__accumulate
_selector< _It >
__gnu_parallel::__adjacent
_difference_selector< _It >
__gnu_parallel::__count
_if_selector< _It, _Diff >
__gnu_parallel::__count
_selector< _It, _Diff >
__gnu_parallel::__fill
_selector< _It >
__gnu_parallel::__for
_each_selector< _It >
__gnu_parallel::__generic __gnu_parallel::__generate
_for_each_selector< _It > _selector< _It >
__gnu_parallel::__identity
_selector< _It >
__gnu_parallel::__inner
_product_selector< _It,
_It2, _Tp >
__gnu_parallel::__replace
_if_selector< _It, _Op, _Tp >
__gnu_parallel::__replace
_selector< _It, _Tp >
__gnu_parallel::__transform1
_selector< _It >
__gnu_parallel::__transform2
_selector< _It >
Public Attributes
• _It _M_finish_iterator
Generated by Doxygen
766
template<typename _It>
struct __gnu_parallel::__generic_for_each_selector< _It >
_M_finish_iterator
• for_each_selectors.h
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__identity
_selector< _It >
Public Attributes
• _It _M_finish_iterator
template<typename _It>
struct __gnu_parallel::__identity_selector< _It >
Generated by Doxygen
5.24 __gnu_parallel::__inner_product_selector< _It, _It2, _Tp > Struct Template Reference 767
operator()()
Parameters
Returns
Passed iterator.
_M_finish_iterator
• for_each_selectors.h
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__inner
_product_selector< _It,
_It2, _Tp >
Generated by Doxygen
768
Public Attributes
• _It __begin1_iterator
• _It2 __begin2_iterator
• _It _M_finish_iterator
std::inner_product() selector.
__inner_product_selector()
Parameters
operator()()
Parameters
Returns
Generated by Doxygen
5.25 std::__is_fast_hash< _Hash > Struct Template Reference 769
__begin1_iterator
__begin2_iterator
_M_finish_iterator
• for_each_selectors.h
template<typename _Hash>
struct std::__is_fast_hash< _Hash >
• functional_hash.h
template<typename _Tp>
struct std::__is_location_invariant< _Tp >
Trait identifying "location-invariant" types, meaning that the address of the object (or any of its members) will not escape.
Trivially copyable types are location-invariant and users can specialize this trait for other types.
The documentation for this struct was generated from the following file:
• std_function.h
Generated by Doxygen
770
Public Attributes
• for_each_selectors.h
Public Attributes
• for_each_selectors.h
Public Types
Generated by Doxygen
5.30 __gnu_parallel::__mismatch_selector Struct Reference 771
template<typename _Tp>
class __gnu_cxx::__detail::__mini_vector< _Tp >
3. No Allocator template argument. Uses operator new() to get memory, and operator delete() to free it. Caveat:
The dtor does NOT free the memory allocated, so this a memory-leaking vector!
The documentation for this class was generated from the following file:
• bitmap_allocator.h
__gnu_parallel::__generic
_find_selector
__gnu_parallel::__mismatch
_selector
Generated by Doxygen
772
_M_sequential_algorithm()
Parameters
operator()()
Parameters
The documentation for this struct was generated from the following file:
• find_selectors.h
Generated by Doxygen
5.31 __gnu_cxx::__mt_alloc< _Tp, _Poolp > Class Template Reference 773
__gnu_cxx::__mt_alloc
_base< _Tp >
__gnu_cxx::__mt_alloc
< _Tp, _Poolp >
Public Types
Generated by Doxygen
774
This is a fixed size (power of 2) allocator which - when compiled with thread support - will maintain one freelist per size
per thread plus a global one. Steps are taken to limit the per thread freelist sizes (by returning excess back to the global
list).
Further details: https://gcc.gnu.org/onlinedocs/libstdc++/manual/mt_allocator.html
The documentation for this class was generated from the following file:
• mt_allocator.h
__gnu_cxx::__mt_alloc
_base< _Tp >
__gnu_cxx::__mt_alloc
< _Tp, _Poolp >
Public Types
Generated by Doxygen
5.33 __gnu_parallel::__multiway_merge_3_variant_sentinel_switch< __sentinels, _RAIterIterator, _RAIter3,
_DifferenceTp, _Compare > Struct Template Reference 775
template<typename _Tp>
class __gnu_cxx::__mt_alloc_base< _Tp >
• mt_allocator.h
• multiway_merge.h
• multiway_merge.h
Generated by Doxygen
776
• multiway_merge.h
• multiway_merge.h
• _RAIter3 operator() (_RAIterIterator __seqs_begin, _RAIterIterator __seqs_end, _RAIter3 __target, const type-
name std::iterator_traits< typename std::iterator_traits< _RAIterIterator >::value_type::first_type >::value_type
&__sentinel, _DifferenceTp __length, _Compare __comp)
Generated by Doxygen
5.38 __gnu_parallel::__multiway_merge_k_variant_sentinel_switch< false, __stable, _RAIterIterator,
_RAIter3, _DifferenceTp, _Compare > Struct Template Reference 777
template<bool __sentinels, bool __stable, typename _RAIterIterator, typename _RAIter3, typename _←-
DifferenceTp, typename _Compare>
struct __gnu_parallel::__multiway_merge_k_variant_sentinel_switch< __sentinels, __stable, _RAIterIterator,
_RAIter3, _DifferenceTp, _Compare >
• multiway_merge.h
• _RAIter3 operator() (_RAIterIterator __seqs_begin, _RAIterIterator __seqs_end, _RAIter3 __target, const type-
name std::iterator_traits< typename std::iterator_traits< _RAIterIterator >::value_type::first_type >::value_type
&__sentinel, _DifferenceTp __length, _Compare __comp)
• multiway_merge.h
std::__new_allocator
< _Tp >
Public Types
Generated by Doxygen
778
Friends
template<typename _Tp>
class std::__new_allocator< _Tp >
This is the default base-class implementation of std::allocator, and is also the base-class of the __gnu_cxx←-
::new_allocator extension. You should use either std::allocator or __gnu_cxx::new_allocator
instead of using this directly.
Template Parameters
The documentation for this class was generated from the following file:
• bits/new_allocator.h
Generated by Doxygen
5.40 std::__numeric_limits_base Struct Reference 779
std::__numeric_limits_base
std::numeric_limits
< _Tp >
Part of std::numeric_limits.
The static const members are usable as integral constant expressions.
Note
This is a separate class for purposes of efficiency; you should only access these members as part of an instantia-
tion of the std::numeric_limits class.
Generated by Doxygen
780
digits
digits10
has_denorm
has_denorm_loss
has_infinity
has_quiet_NaN
has_signaling_NaN
is_bounded
is_exact
Generated by Doxygen
5.40 std::__numeric_limits_base Struct Reference 781
is_iec559
is_integer
is_modulo
is_signed
is_specialized
max_digits10
max_exponent
max_exponent10
Generated by Doxygen
782
min_exponent
min_exponent10
radix
round_style
tinyness_before
traps
The documentation for this struct was generated from the following file:
• limits
• mt_allocator.h
Generated by Doxygen
5.42 __gnu_cxx::__pool< _Thread > Class Template Reference 783
template<bool _Thread>
class __gnu_cxx::__pool< _Thread >
• mt_allocator.h
__gnu_cxx::__pool_base
__gnu_cxx::__pool<
false >
Public Types
Generated by Doxygen
784
Protected Attributes
• _Binmap_type ∗ _M_binmap
• bool _M_init
• _Tune _M_options
__gnu_cxx::__pool_base
__gnu_cxx::__pool<
true >
Public Types
Generated by Doxygen
5.45 __gnu_cxx::__pool_alloc< _Tp > Class Template Reference 785
Protected Attributes
• _Binmap_type ∗ _M_binmap
• bool _M_init
• _Tune _M_options
• mt_allocator.h
__gnu_cxx::__pool_alloc_base
__gnu_cxx::__pool_alloc
< _Tp >
Public Types
Generated by Doxygen
786
template<typename _Tp>
class __gnu_cxx::__pool_alloc< _Tp >
• pool_allocator.h
__gnu_cxx::__pool_alloc_base
__gnu_cxx::__pool_alloc
< _Tp >
Protected Types
• enum { _S_align }
• enum { _S_max_bytes }
• enum { _S_free_list_size }
Generated by Doxygen
5.47 __gnu_cxx::__pool_base Struct Reference 787
2. If the clients request an object of size > _S_max_bytes, the resulting object will be obtained directly from new
3. In all other cases, we allocate an object of size exactly _S_round_up(requested_size). Thus the client has enough
size information that we can return the object to the proper free list without permanently losing part of the object.
The documentation for this class was generated from the following file:
• pool_allocator.h
__gnu_cxx::__pool_base
__gnu_cxx::__pool< __gnu_cxx::__pool<
false > true >
Public Types
Generated by Doxygen
788
Protected Attributes
• _Binmap_type ∗ _M_binmap
• bool _M_init
• _Tune _M_options
• mt_allocator.h
Public Types
Generated by Doxygen
5.48 __gnu_cxx::__rc_string_base< _CharT, _Traits, _Alloc > Class Template Reference 789
Protected Types
Generated by Doxygen
790
The reason you want _M_data pointing to the character array and not the _Rep is so that the debugger can see the
string contents. (Probably we should add a non-inline member to get the _Rep for the debugger to use, so users can
check the actual string length.)
Note that the _Rep object is a POD so that you can have a static empty string _Rep object already constructed before
static constructors have run. The reference-count encoding is chosen so that a 0 indicates one reference, so you never
try to destroy the empty-string _Rep object.
All but the last paragraph is considered pretty conventional for a C++ string implementation.
The documentation for this class was generated from the following files:
• rc_string_base.h
• vstring_fwd.h
template<typename... _Elements>
struct std::tr2::__reflection_typelist< _Elements >
See N2965: Type traits and base classes by Michael Spertus Simple typelist. Compile-time list of types.
The documentation for this struct was generated from the following file:
• tr2/type_traits
Public Types
Partial specialization.
The documentation for this struct was generated from the following file:
• tr2/type_traits
Public Types
• tr2/type_traits
Generated by Doxygen
5.52 __gnu_parallel::__replace_if_selector< _It, _Op, _Tp > Struct Template Reference 791
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__replace
_if_selector< _It, _Op, _Tp >
Public Attributes
std::replace() selector.
__replace_if_selector()
Parameters
__new_val Value to replace with.
Generated by Doxygen
792
operator()()
Parameters
_←- Operator.
_o
_←- iterator referencing object.
_i
__new_val
_M_finish_iterator
• for_each_selectors.h
Generated by Doxygen
5.53 __gnu_parallel::__replace_selector< _It, _Tp > Struct Template Reference 793
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__replace
_selector< _It, _Tp >
Public Attributes
std::replace() selector.
__replace_selector()
Parameters
__new_val Value to replace with.
operator()()
Generated by Doxygen
794
Parameters
__new_val
_M_finish_iterator
• for_each_selectors.h
Public Types
• concurrence.h
Generated by Doxygen
5.55 __gnu_parallel::__transform1_selector< _It > Struct Template Reference 795
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__transform1
_selector< _It >
Public Attributes
• _It _M_finish_iterator
template<typename _It>
struct __gnu_parallel::__transform1_selector< _It >
operator()()
Parameters
_←- Operator.
_o
_←- iterator referencing object.
_i
Generated by Doxygen
796
_M_finish_iterator
• for_each_selectors.h
__gnu_parallel::__generic
_for_each_selector< _It >
__gnu_parallel::__transform2
_selector< _It >
Public Attributes
• _It _M_finish_iterator
template<typename _It>
struct __gnu_parallel::__transform2_selector< _It >
operator()()
Generated by Doxygen
5.57 __gnu_parallel::__unary_negate< _Predicate, argument_type > Class Template Reference 797
Parameters
_←- Operator.
_o
_←- iterator referencing object.
_i
_M_finish_iterator
std::unary_function
< argument_type, bool >
__gnu_parallel::__unary
_negate< _Predicate, argument
_type >
Public Types
Generated by Doxygen
798
Protected Attributes
• _Predicate _M_pred
argument_type
result_type
• base.h
Public Types
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 799
Generated by Doxygen
800
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 801
__versa_string() [1/10]
Generated by Doxygen
802
__versa_string() [2/10]
Parameters
__versa_string() [3/10]
Parameters
The newly-constructed string contains the exact contents of __str. The contents of __str are a valid, but unspecified
string.
__versa_string() [4/10]
Parameters
__versa_string() [5/10]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 803
Parameters
__versa_string() [6/10]
Parameters
__versa_string() [7/10]
Parameters
NB: __s must have at least __n characters, '\0' has no special meaning.
__versa_string() [8/10]
Generated by Doxygen
804
Parameters
__versa_string() [9/10]
Parameters
__versa_string() [10/10]
Parameters
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 805
∼__versa_string()
template<typename _CharT , typename _Traits = std::char_traits<_CharT>, typename _Alloc = std←-
::allocator<_CharT>, template< typename, typename, typename > class _Base = __sso_string_base>
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::∼__versa_string () [inline], [noexcept]
Destroy the string instance.
append() [1/7]
Parameters
Returns
append() [2/7]
Parameters
__str The string to append.
Returns
append() [3/7]
Generated by Doxygen
806
Parameters
__str The string to append.
__pos Index of the first character of str to append.
__n The number of characters to append.
Returns
Exceptions
This function appends __n characters from __str starting at __pos to this string. If __n is is larger than the number of
available characters in __str, the remainder of __str is appended.
append() [4/7]
Parameters
Returns
append() [5/7]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 807
Parameters
Returns
append() [6/7]
Parameters
Returns
append() [7/7]
Parameters
Returns
Generated by Doxygen
808
assign() [1/8]
Parameters
Returns
This function sets this string to the exact contents of __str. __str is a valid, but unspecified string.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::swap().
assign() [2/8]
Parameters
Returns
assign() [3/8]
Parameters
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 809
Returns
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::assign(), __gnu_cxx::__versa_string< _CharT, _Traits, _Al
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::operator=(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >
and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::operator=().
assign() [4/8]
Parameters
__str The string to use.
__pos Index of the first character of str.
__n Number of characters to use.
Returns
Exceptions
This function sets this string to the substring of __str consisting of __n characters at __pos. If __n is is larger than the
number of available characters in __str, the remainder of __str is used.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().
assign() [5/8]
Parameters
Returns
This function sets the value of this string to the value of __s. The data is copied, so there is no dependence on __s once
the function returns.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().
Generated by Doxygen
810
assign() [6/8]
Parameters
Returns
This function sets the value of this string to the first __n characters of __s. If __n is is larger than the number of available
characters in __s, the remainder of __s is used.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().
assign() [7/8]
Parameters
Returns
This function sets the value of this string to __n copies of character __c.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().
assign() [8/8]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 811
Parameters
Returns
at() [1/2]
Parameters
Returns
Exceptions
This function provides for safer data access. The parameter is first checked that it is in the range of the string. The
function throws out_of_range if the check fails. Success results in unsharing the string.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().
at() [2/2]
Parameters
Returns
Generated by Doxygen
812
Exceptions
This function provides for safer data access. The parameter is first checked that it is in the range of the string. The
function throws out_of_range if the check fails.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().
back() [1/2]
back() [2/2]
begin() [1/2]
begin() [2/2]
c_str()
capacity()
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 813
cbegin()
cend()
clear()
compare() [1/6]
Parameters
Returns
Returns an integer < 0 if this string is ordered before __str, 0 if their values are equivalent, or > 0 if this string is ordered
after __str. Determines the effective length rlen of the strings to compare as the smallest of size() and str.size(). The
function then compares the two strings by calling traits::compare(data(), str.data(),rlen). If the result of the comparison
is nonzero returns it, otherwise the shorter one is ordered first.
References std::min(), and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().
compare() [2/6]
Generated by Doxygen
814
Parameters
Returns
Returns an integer < 0 if this string is ordered before __s, 0 if their values are equivalent, or > 0 if this string is ordered
after __s. Determines the effective length rlen of the strings to compare as the smallest of size() and the length of a
string constructed from __s. The function then compares the two strings by calling traits::compare(data(),s,rlen). If the
result of the comparison is nonzero returns it, otherwise the shorter one is ordered first.
References std::min().
compare() [3/6]
Parameters
Returns
Form the substring of this string from the __n characters starting at __pos. Returns an integer < 0 if the substring
is ordered before __str, 0 if their values are equivalent, or > 0 if the substring is ordered after __str. Determines the
effective length rlen of the strings to compare as the smallest of the length of the substring and __str.size(). The function
then compares the two strings by calling traits::compare(substring.data(),str.data(),rlen). If the result of the comparison
is nonzero returns it, otherwise the shorter one is ordered first.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::data(), std::min(), and __gnu_cxx::__versa_string< _CharT, _
compare() [4/6]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 815
Parameters
Returns
Form the substring of this string from the __n1 characters starting at __pos. Returns an integer < 0 if the substring is
ordered before __s, 0 if their values are equivalent, or > 0 if the substring is ordered after __s. Determines the effective
length rlen of the strings to compare as the smallest of the length of the substring and the length of a string constructed
from __s. The function then compares the two string by calling traits::compare(substring.data(),s,rlen). If the result of
the comparison is nonzero returns it, otherwise the shorter one is ordered first.
References std::min().
compare() [5/6]
Parameters
Returns
Form the substring of this string from the __n1 characters starting at __pos. Form a string from the first __n2 characters
of __s. Returns an integer < 0 if this substring is ordered before the string from __s, 0 if their values are equivalent, or
> 0 if this substring is ordered after the string from __s. Determines the effective length rlen of the strings to compare
as the smallest of the length of the substring and __n2. The function then compares the two strings by calling traits←-
::compare(substring.data(),__s,rlen). If the result of the comparison is nonzero returns it, otherwise the shorter one is
ordered first.
NB: __s must have at least n2 characters, \0 has no special meaning.
References std::min().
compare() [6/6]
Generated by Doxygen
816
size_type __pos1,
size_type __n1,
const __versa_string< _CharT, _Traits, _Alloc, _Base > & __str,
size_type __pos2,
size_type __n2) const
Compare substring to a substring.
Parameters
Returns
Form the substring of this string from the __n1 characters starting at __pos1. Form the substring of __str from the
__n2 characters starting at __pos2. Returns an integer < 0 if this substring is ordered before the substring of __str,
0 if their values are equivalent, or > 0 if this substring is ordered after the substring of __str. Determines the effective
length rlen of the strings to compare as the smallest of the lengths of the substrings. The function then compares the
two strings by calling traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen). If the result of the comparison is
nonzero returns it, otherwise the shorter one is ordered first.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::data(), and std::min().
copy()
Parameters
Returns
Exceptions
Copies up to __n characters starting at __pos into the C string s. If __pos is greater than size(), out_of_range is thrown.
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 817
crbegin()
crend()
data()
empty()
end() [1/2]
end() [2/2]
Generated by Doxygen
818
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::crbegin(), __gnu_cxx::__versa_string< _CharT, _Traits, _A
and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::rbegin().
erase() [1/3]
Parameters
Returns
Removes the characters in the range [first,last) from this string. The value of the string doesn't change if an error is
thrown.
erase() [2/3]
Parameters
Returns
Removes the character at __position from this string. The value of the string doesn't change if an error is thrown.
erase() [3/3]
Parameters
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 819
Returns
Exceptions
Removes __n characters from this string starting at __pos. The length of the string is reduced by __n. If there are < __n
characters to remove, the remainder of the string is truncated. If __p is beyond end of string, out_of_range is thrown.
The value of the string doesn't change if an error is thrown.
Referenced by std::getline().
find() [1/4]
Parameters
Returns
Starting from __pos, searches forward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
find() [2/4]
Parameters
Returns
Starting from __pos, searches forward for value of __str within this string. If found, returns the index where it begins. If
not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find().
Generated by Doxygen
820
find() [3/4]
Parameters
Returns
Starting from __pos, searches forward for the first __n characters in __s within this string. If found, returns the index
where it begins. If not found, returns npos.
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc
and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_first_of().
find() [4/4]
Parameters
Returns
Starting from __pos, searches forward for the value of __s within this string. If found, returns the index where it begins.
If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find().
find_first_not_of() [1/4]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 821
_CharT __c,
size_type __pos = 0) const [noexcept]
Find position of a different character.
Generated by Doxygen
822
Parameters
Returns
Starting from __pos, searches forward for a character other than __c within this string. If found, returns the index where
it was found. If not found, returns npos.
find_first_not_of() [2/4]
Parameters
Returns
Starting from __pos, searches forward for a character not contained in __str within this string. If found, returns the index
where it was found. If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_first_not_of().
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_first_not_of(), and __gnu_cxx::__versa_string< _Char
find_first_not_of() [3/4]
Parameters
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 823
Returns
Starting from __pos, searches forward for a character not contained in the first __n characters of __s within this string.
If found, returns the index where it was found. If not found, returns npos.
find_first_not_of() [4/4]
Parameters
Returns
Starting from __pos, searches forward for a character not contained in __s within this string. If found, returns the index
where it was found. If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_first_not_of().
find_first_of() [1/4]
Parameters
Returns
Starting from __pos, searches forward for the character __c within this string. If found, returns the index where it was
found. If not found, returns npos.
Note: equivalent to find(c, pos).
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find().
Generated by Doxygen
824
find_first_of() [2/4]
Parameters
Returns
Starting from __pos, searches forward for one of the characters of __str within this string. If found, returns the index
where it was found. If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_first_of().
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_first_of(), and __gnu_cxx::__versa_string< _CharT, _T
find_first_of() [3/4]
Parameters
Returns
Starting from __pos, searches forward for one of the first __n characters of __s within this string. If found, returns the
index where it was found. If not found, returns npos.
find_first_of() [4/4]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 825
Parameters
Returns
Starting from __pos, searches forward for one of the characters of __s within this string. If found, returns the index
where it was found. If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_first_of().
find_last_not_of() [1/4]
Parameters
Returns
Starting from __pos, searches backward for a character other than __c within this string. If found, returns the index
where it was found. If not found, returns npos.
find_last_not_of() [2/4]
Parameters
Returns
Starting from __pos, searches backward for a character not contained in __str within this string. If found, returns the
index where it was found. If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_last_not_of().
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_last_not_of(), and __gnu_cxx::__versa_string< _Char
Generated by Doxygen
826
find_last_not_of() [3/4]
Parameters
Returns
Starting from __pos, searches backward for a character not contained in the first __n characters of __s within this string.
If found, returns the index where it was found. If not found, returns npos.
find_last_not_of() [4/4]
Parameters
Returns
Starting from __pos, searches backward for a character not contained in __s within this string. If found, returns the
index where it was found. If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_last_not_of().
find_last_of() [1/4]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 827
Parameters
Returns
Starting from __pos, searches backward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
Note: equivalent to rfind(c, pos).
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::rfind().
find_last_of() [2/4]
Parameters
Returns
Starting from __pos, searches backward for one of the characters of __str within this string. If found, returns the index
where it was found. If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_last_of().
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_last_of(), and __gnu_cxx::__versa_string< _CharT, _T
find_last_of() [3/4]
Parameters
Generated by Doxygen
828
Returns
Starting from __pos, searches backward for one of the first __n characters of __s within this string. If found, returns the
index where it was found. If not found, returns npos.
find_last_of() [4/4]
Parameters
Returns
Starting from __pos, searches backward for one of the characters of __s within this string. If found, returns the index
where it was found. If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_last_of().
front() [1/2]
front() [2/2]
get_allocator()
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 829
insert() [1/9]
Parameters
Returns
Exceptions
Inserts character __c at position referenced by __p. If adding character causes the length to exceed max_size(),
length_error is thrown. If __p is beyond end of string, out_of_range is thrown. The value of the string doesn't change if
an error is thrown.
insert() [2/9]
Parameters
Returns
Exceptions
Generated by Doxygen
830
Inserts characters in range [beg,end). If adding characters causes the length to exceed max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
insert() [3/9]
Parameters
Returns
Exceptions
Inserts __n copies of character __c starting at the position referenced by iterator __p. If adding characters causes the
length to exceed max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::insert().
insert() [4/9]
Parameters
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 831
Returns
Exceptions
insert() [5/9]
Parameters
Returns
Exceptions
Inserts the first __n characters of __s starting at __pos. If adding characters causes the length to exceed max_size(),
length_error is thrown. If __pos is beyond end(), out_of_range is thrown. The value of the string doesn't change if an
error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
insert() [6/9]
Parameters
Generated by Doxygen
832
Returns
Exceptions
Inserts the first __n characters of __s starting at __pos. If adding characters causes the length to exceed max_size(),
length_error is thrown. If __pos is beyond end(), out_of_range is thrown. The value of the string doesn't change if an
error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
insert() [7/9]
Parameters
__pos Index in string to insert at.
__n Number of characters to insert
__c The character to insert.
Returns
Exceptions
Inserts __n copies of character __c starting at index __pos. If adding characters causes the length to exceed max_←-
size(), length_error is thrown. If __pos > length(), out_of_range is thrown. The value of the string doesn't change if an
error is thrown.
insert() [8/9]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 833
Parameters
Returns
Exceptions
Inserts value of __str starting at __pos1. If adding characters causes the length to exceed max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
insert() [9/9]
Parameters
Returns
Exceptions
Starting at __pos1, insert __n character of __str beginning with __pos2. If adding characters causes the length to
exceed max_size(), length_error is thrown. If __pos1 is beyond the end of this string or __pos2 is beyond the end of
__str, out_of_range is thrown. The value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
Generated by Doxygen
834
length()
max_size()
operator+=() [1/4]
Parameters
_←- The character to append.
_c
Returns
operator+=() [2/4]
Parameters
__str The string to append.
Returns
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 835
operator+=() [3/4]
Parameters
Returns
operator+=() [4/4]
Parameters
Returns
operator=() [1/5]
Parameters
The contents of __str are moved into this string (without copying). __str is a valid, but unspecified string.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::swap().
Generated by Doxygen
836
operator=() [2/5]
Parameters
operator=() [3/5]
Parameters
operator=() [4/5]
Parameters
operator=() [5/5]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 837
Parameters
←- std::initializer_list.
_←-
←-
_←-
l
operator[]() [1/2]
Parameters
Returns
This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and
out_of_range lookups are not defined. (For checked lookups see at().)
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::back(), __gnu_cxx::__versa_string< _CharT, _Traits, _Allo
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::front(), and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >
operator[]() [2/2]
Parameters
Returns
This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and
out_of_range lookups are not defined. (For checked lookups see at().) Unshares the string.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().
Generated by Doxygen
838
pop_back()
push_back()
Parameters
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::capacity(), and __gnu_cxx::__versa_string< _CharT, _Traits,
Referenced by __gnu_cxx::operator+(), __gnu_cxx::operator+(), and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::opera
rbegin() [1/2]
rbegin() [2/2]
rend() [1/2]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 839
rend() [2/2]
replace() [1/11]
Parameters
Returns
Exceptions
Removes the characters in the range [i1,i2). In place, characters in the range [k1,k2) are inserted. If the length of result
exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
replace() [2/11]
Parameters
Generated by Doxygen
840
Returns
Exceptions
Removes the characters in the range [i1,i2). In place, the value of __str is inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
replace() [3/11]
Parameters
Returns
Exceptions
Removes the characters in the range [i1,i2). In place, the characters of __s are inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 841
replace() [4/11]
Parameters
Returns
Exceptions
Removes the characters in the range [i1,i2). In place, the first n characters of __s are inserted. If the length of result
exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
replace() [5/11]
Parameters
Generated by Doxygen
842
Returns
Exceptions
Removes the characters in the range [i1,i2). In place, __n copies of __c are inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
replace() [6/11]
Parameters
Returns
Exceptions
Removes the characters in the range [i1,i2). In place, characters in the range [k1,k2) are inserted. If the length of result
exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
replace() [7/11]
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 843
size_type __pos,
size_type __n,
const __versa_string< _CharT, _Traits, _Alloc, _Base > & __str) [inline]
Replace characters with value from another string.
Generated by Doxygen
844
Parameters
Returns
Exceptions
Removes the characters in the range [pos,pos+n) from this string. In place, the value of __str is inserted. If __pos is
beyond end of string, out_of_range is thrown. If the length of the result exceeds max_size(), length_error is thrown. The
value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::append(), __gnu_cxx::__versa_string< _CharT, _Traits, _A
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::insert(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::in
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::insert(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::in
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::insert(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::in
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >:
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >:
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >:
and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
replace() [8/11]
Parameters
Returns
Exceptions
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 845
Removes the characters in the range [pos,pos + n1) from this string. In place, the characters of __s are inserted. If pos
is beyond end of string, out_of_range is thrown. If the length of result exceeds max_size(), length_error is thrown. The
value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
replace() [9/11]
Parameters
Returns
Exceptions
Removes the characters in the range [pos,pos + n1) from this string. In place, the first __n2 characters of __s are
inserted, or all of __s if __n2 is too large. If __pos is beyond end of string, out_of_range is thrown. If the length of result
exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
replace() [10/11]
Generated by Doxygen
846
Parameters
Returns
Exceptions
Removes the characters in the range [pos,pos + n1) from this string. In place, __n2 copies of __c are inserted. If __pos
is beyond end of string, out_of_range is thrown. If the length of result exceeds max_size(), length_error is thrown. The
value of the string doesn't change if an error is thrown.
replace() [11/11]
Parameters
Returns
Exceptions
Removes the characters in the range [pos1,pos1 + n) from this string. In place, the value of __str is inserted. If __pos
is beyond end of string, out_of_range is thrown. If the length of the result exceeds max_size(), length_error is thrown.
The value of the string doesn't change if an error is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::replace().
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 847
reserve()
Parameters
Exceptions
This function attempts to reserve enough memory for the string to hold the specified number of characters. If the number
requested is more than max_size(), length_error is thrown.
The advantage of this function is that if optimal code is a necessity and the user can determine the string length that
will be required, the user can reserve the memory in advance, and thus prevent a possible reallocation of memory and
copying of string data.
Referenced by __gnu_cxx::operator+(), __gnu_cxx::operator+(), __gnu_cxx::operator+(), and __gnu_cxx::__versa_string< _CharT, _Traits
resize() [1/2]
Parameters
This function will resize the string to the specified length. If the new size is smaller than the string's current size the
string is truncated, otherwise the string is extended and new characters are default-constructed. For basic types such
as char, this means setting them to 0.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::resize().
resize() [2/2]
Parameters
Generated by Doxygen
848
Parameters
This function will resize the string to the specified number of characters. If the number is smaller than the string's current
size the string is truncated, otherwise the string is extended and new elements are set to __c.
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::resize().
rfind() [1/4]
Parameters
Returns
Starting from __pos, searches backward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
rfind() [2/4]
Parameters
Returns
Starting from __pos, searches backward for value of __str within this string. If found, returns the index where it begins.
If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::rfind().
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::find_last_of(), __gnu_cxx::__versa_string< _CharT, _Traits
and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::rfind().
Generated by Doxygen
5.58 __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > Class Template Reference 849
rfind() [3/4]
Parameters
Returns
Starting from __pos, searches backward for the first __n characters in __s within this string. If found, returns the index
where it begins. If not found, returns npos.
References std::min().
rfind() [4/4]
Parameters
Returns
Starting from __pos, searches backward for the value of __s within this string. If found, returns the index where it begins.
If not found, returns npos.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::rfind().
shrink_to_fit()
Generated by Doxygen
850
size()
substr()
Parameters
Returns
Exceptions
Construct and return a new string using the __n characters starting at __pos. If the string is too short, use the remainder
of the characters. If __pos is beyond the end of the string, out_of_range is thrown.
References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::__versa_string().
swap()
Generated by Doxygen
5.59 __gnu_debug::_After_nth_from< _Iterator > Class Template Reference 851
Parameters
Exchanges the contents of this string with that of __s in constant time.
Referenced by __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::assign(), and __gnu_cxx::__versa_string< _CharT, _Traits
npos
• vstring.h
• vstring_fwd.h
• vstring.tcc
template<typename _Iterator>
class __gnu_debug::_After_nth_from< _Iterator >
A function object that returns true when the given random access iterator is at least n steps away from the given iterator.
The documentation for this class was generated from the following file:
• safe_sequence.h
Public Types
Generated by Doxygen
852
Public Attributes
template<size_t _Nw>
struct std::_Base_bitset< _Nw >
Base class, general case. It is a class invariant that _Nw will be nonnegative.
See documentation for bitset.
_M_w
template<size_t _Nw>
_WordT std::_Base_bitset< _Nw >::_M_w[_Nw]
0 is the least significant word.
The documentation for this struct was generated from the following file:
• bitset
Generated by Doxygen
5.62 std::_Base_bitset< 1 > Struct Reference 853
Public Types
• bitset
Public Types
Generated by Doxygen
854
Public Attributes
• _WordT _M_w
• bitset
Generated by Doxygen
5.64 std::_Bind< _Signature > Class Template Reference 855
template<typename _Sequence>
struct __gnu_debug::_BeforeBeginHelper< _Sequence >
template<typename _Signature>
class std::_Bind< _Signature >
template<typename _Tp>
class __gnu_cxx::__detail::_Bitmap_counter< _Tp >
The bitmap counter which acts as the bitmap manipulator, and manages the bit-manipulation functions and the searching
and identification functions on the bit-map.
The documentation for this class was generated from the following file:
• bitmap_allocator.h
Generated by Doxygen
856
Public Types
• regex_compiler.h
• regex_compiler.tcc
Public Types
template<typename _ToType>
struct __gnu_cxx::_Caster< _ToType >
These functions are here to allow containers to support non standard pointer types. For normal pointers, these resolve
to the use of the standard cast operation. For other types the functions will perform the appropriate cast to/from the
custom pointer class so long as that class meets the following conditions: 1) has a typedef element_type which names
tehe type it points to. 2) has a get() const method which returns element_type∗. 3) has a constructor which can take
one element_type∗ argument. This type supports the semantics of the pointer cast operators (below.)
The documentation for this struct was generated from the following file:
• cast.h
Generated by Doxygen
5.69 __gnu_cxx::_Char_types< _CharT > Struct Template Reference 857
Public Types
template<typename _CharT>
struct __gnu_cxx::_Char_types< _CharT >
Note
This is an implementation class for the generic version of char_traits. It defines int_type, off_type, pos_type, and
state_type. By default these are unsigned long, streamoff, streampos, and mbstate_t. Users who need a different
set of types, but who don't need to change the definitions of any function defined in char_traits, can specialize
__gnu_cxx::_Char_types while leaving __gnu_cxx::char_traits alone.
The documentation for this struct was generated from the following file:
• char_traits.h
__gnu_pbds::detail __gnu_pbds::detail
::pat_trie_base::_CIter ::pat_trie_base::_Iter
< Node, Leaf, Head, Inode, < Node, Leaf, Head, Inode,
Is_Forward_Iterator > Is_Forward_Iterator >
Public Types
Generated by Doxygen
858
• _CIter (const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other)
• _CIter (node_pointer p_nd=0)
• bool operator!= (const _CIter &other) const
• bool operator!= (const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other) const
• const_reference operator∗ () const
• _CIter & operator++ ()
• _CIter operator++ (int)
• _CIter & operator-- ()
• _CIter operator-- (int)
• const_pointer operator-> () const
• _CIter & operator= (const _CIter &other)
• _CIter & operator= (const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other)
• bool operator== (const _CIter &other) const
• bool operator== (const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other) const
Public Attributes
• node_pointer m_p_nd
template<typename Node, typename Leaf, typename Head, typename Inode, bool Is_Forward_Iterator>
class __gnu_pbds::detail::pat_trie_base::_CIter< Node, Leaf, Head, Inode, Is_Forward_Iterator >
Const iterator.
The documentation for this class was generated from the following file:
• pat_trie_base.hpp
Generated by Doxygen
5.71 std::__detail::_Compiler< _TraitsT > Class Template Reference 859
Public Types
• _Compiler (const _CharT ∗__b, const _CharT ∗__e, const typename _TraitsT::locale_type &__traits, _FlagT
__flags)
• shared_ptr< const _RegexT > _M_get_nfa () noexcept
template<typename _TraitsT>
class std::__detail::_Compiler< _TraitsT >
• regex_compiler.h
• regex_compiler.tcc
• algo.h
Generated by Doxygen
860
std::_Deque_base<
_Tp, _Alloc >
Protected Types
• enum { _S_initial_map_size }
• typedef __gnu_cxx::__alloc_traits< _Tp_alloc_type > _Alloc_traits
• typedef __gnu_cxx::__alloc_traits< _Map_alloc_type > _Map_alloc_traits
• typedef _Alloc_traits::template rebind< _Ptr >::other _Map_alloc_type
• typedef iterator::_Map_pointer _Map_pointer
• typedef _Alloc_traits::pointer _Ptr
• typedef _Alloc_traits::const_pointer _Ptr_const
• typedef __gnu_cxx::__alloc_traits< _Alloc >::template rebind< _Tp >::other _Tp_alloc_type
• typedef _Alloc allocator_type
• typedef _Deque_iterator< _Tp, const _Tp &, _Ptr_const > const_iterator
• typedef _Deque_iterator< _Tp, _Tp &, _Ptr > iterator
Protected Attributes
• _Deque_impl _M_impl
Generated by Doxygen
5.74 std::_Deque_iterator< _Tp, _Ref, _Ptr > Struct Template Reference 861
Deque base class. This class provides the unified face for deque's allocation. This class's constructor and destructor
allocate and deallocate (but do not initialize) storage. This makes exception safety easier.
Nothing in this class ever constructs or destroys an actual Tp element. (Deque handles that itself.) Only/All memory
management is performed here.
_M_initialize_map()
Parameters
Returns
Nothing.
• stl_deque.h
Public Types
Generated by Doxygen
862
Public Attributes
• _Elt_pointer _M_cur
• _Elt_pointer _M_first
• _Elt_pointer _M_last
• _Map_pointer _M_node
Friends
A deque::iterator.
Quite a bit of intelligence here. Much of the functionality of deque is actually passed off to this class. A deque holds
two of these internally, marking its valid range. Access to elements is done as offsets of either of those two, relying on
operator overloading in this class.
All the functions are op overloads except for _M_set_node.
Generated by Doxygen
5.75 __gnu_parallel::_DRandomShufflingGlobalData< _RAIter > Struct Template Reference 863
_M_set_node()
• stl_algobase.h
• stl_deque.h
Public Types
Public Attributes
• _ThreadIndex ∗ _M_bin_proc
• _DifferenceType ∗∗ _M_dist
• int _M_num_bins
• int _M_num_bits
• _RAIter & _M_source
• _DifferenceType ∗ _M_starts
• _ValueType ∗∗ _M_temporaries
template<typename _RAIter>
struct __gnu_parallel::_DRandomShufflingGlobalData< _RAIter >
_DRandomShufflingGlobalData()
Generated by Doxygen
864
_M_bin_proc
_M_dist
_M_num_bins
_M_num_bits
_M_source
_M_starts
_M_temporaries
• random_shuffle.h
Generated by Doxygen
5.76 __gnu_parallel::_DRSSorterPU< _RAIter, _RandomNumberGenerator > Struct Template Reference 865
Public Attributes
• _BinIndex __bins_end
• _BinIndex _M_bins_begin
• int _M_num_threads
• _DRandomShufflingGlobalData< _RAIter > ∗ _M_sd
• uint32_t _M_seed
__bins_end
_M_bins_begin
_M_num_threads
_M_sd
_M_seed
Generated by Doxygen
866
• random_shuffle.h
• for_each_selectors.h
template<typename _Type>
class __gnu_debug::_Equal_to< _Type >
A simple function object that returns true if the passed-in value is equal to the stored value.
The documentation for this class was generated from the following file:
• safe_sequence.h
Generated by Doxygen
5.79 __gnu_parallel::_EqualFromLess< _T1, _T2, _Compare > Class Template Reference 867
std::binary_function
< _T1, _T2, bool >
__gnu_parallel::_EqualFrom
Less< _T1, _T2, _Compare >
Public Types
first_argument_type
result_type
second_argument_type
• base.h
Generated by Doxygen
868
std::binary_function
< _T1, _T2, bool >
__gnu_parallel::_EqualTo
< _T1, _T2 >
Public Types
first_argument_type
result_type
second_argument_type
Generated by Doxygen
5.81 std::__detail::_Executor< _BiIter, _Alloc, _TraitsT, __dfs_mode > Class Template Reference 869
• base.h
Public Types
• _Executor (_BiIter __begin, _BiIter __end, _ResultsVec &__results, const _RegexT &__re, _FlagT __flags)
• bool _M_match ()
• bool _M_search ()
• bool _M_search_from_first ()
Public Attributes
• _BiIter _M_begin
• _ResultsVec _M_cur_results
• _BiIter _M_current
• const _BiIter _M_end
• _FlagT _M_flags
• bool _M_has_sol
• const _NFAT & _M_nfa
• const _RegexT & _M_re
• ::vector< pair< _BiIter, int > > _M_rep_count
• _ResultsVec & _M_results
• _State_info< __search_mode, _ResultsVec > _M_states
• regex.h
• regex_executor.h
• regex_executor.tcc
Generated by Doxygen
870
Public Types
Friends
template<typename _Tp>
class __gnu_cxx::_ExtPtr_allocator< _Tp >
• extptr_allocator.h
Generated by Doxygen
5.84 std::_Function_base Class Reference 871
Public Types
template<typename _Tp>
class __gnu_cxx::__detail::_Ffit_finder< _Tp >
The class which acts as a predicate for applying the first-fit memory allocation policy for the bitmap allocator.
The documentation for this class was generated from the following file:
• bitmap_allocator.h
std::_Function_base
std::function< _Res
(_ArgTypes...)>
Public Types
• using _Manager_type
Public Attributes
• _Any_data _M_functor
• _Manager_type _M_manager
Generated by Doxygen
872
• std_function.h
std::_Fwd_list_base
< _Tp, _Alloc >
std::forward_list<
_Tp, _Alloc >
Public Types
• using const_iterator
• using iterator
• using pointer
Generated by Doxygen
5.86 std::_Fwd_list_const_iterator< _Tp > Struct Template Reference 873
Protected Types
• using _Base_ptr
• using _Node
• using _Node_alloc_traits
• using _Node_alloc_type
• using _Node_ptr
• using _Node_traits
• template<typename... _Args>
_Node_ptr _M_create_node (_Args &&... __args)
• void _M_destroy_node (_Node_ptr __p)
• _Base_ptr _M_erase_after (_Base_ptr __pos)
• _Base_ptr _M_erase_after (_Base_ptr __pos, _Base_ptr __last)
• _Node ∗ _M_get_node ()
• template<typename... _Args>
_Base_ptr _M_insert_after (const_iterator __pos, _Args &&... __args)
• void _M_put_node (_Node_ptr __p)
Protected Attributes
• _Fwd_list_impl _M_impl
• forward_list.h
• forward_list.tcc
Public Types
Generated by Doxygen
874
Friends
template<typename _Tp>
struct std::_Fwd_list_const_iterator< _Tp >
A forward_list::const_iterator.
All the functions are op overloads.
operator==
• forward_list.h
Public Types
Generated by Doxygen
5.88 std::_Fwd_list_node< _Tp > Struct Template Reference 875
Friends
template<typename _Tp>
struct std::_Fwd_list_iterator< _Tp >
A forward_list::iterator.
All the functions are op overloads.
operator==
• forward_list.h
Generated by Doxygen
876
std::_Fwd_list_node_base
std::_Fwd_list_node
< _Tp >
Public Types
• using _Base_ptr
• using _Node_ptr
• _Fwd_list_node_base ∗ _M_base_ptr ()
• const _Fwd_list_node_base ∗ _M_base_ptr () const
• _Node_ptr _M_node_ptr ()
• void _M_reverse_after () noexcept
• _Fwd_list_node_base ∗ _M_transfer_after (_Fwd_list_node_base ∗__begin, _Fwd_list_node_base ∗__end)
noexcept
• const _Tp ∗ _M_valptr () const noexcept
• _Tp ∗ _M_valptr () noexcept
Public Attributes
• _Fwd_list_node_base ∗ _M_next
• __gnu_cxx::__aligned_buffer< _Tp > _M_storage
template<typename _Tp>
struct std::_Fwd_list_node< _Tp >
A helper node class for forward_list. This is just a linked list with uninitialized storage for a data value in each node.
There is a sorting utility method.
The documentation for this struct was generated from the following file:
• forward_list.h
Generated by Doxygen
5.90 __gnu_parallel::_GuardedIterator< _RAIter, _Compare > Class Template Reference 877
std::_Fwd_list_node_base
std::_Fwd_list_node
< _Tp >
Public Types
• using _Base_ptr
Public Attributes
• _Fwd_list_node_base ∗ _M_next
The documentation for this struct was generated from the following file:
• forward_list.h
Generated by Doxygen
878
Friends
• bool operator< (const _GuardedIterator< _RAIter, _Compare > &__bi1, const _GuardedIterator< _RAIter, _←-
Compare > &__bi2)
• bool operator<= (const _GuardedIterator< _RAIter, _Compare > &__bi1, const _GuardedIterator< _RAIter, ←-
_Compare > &__bi2)
_Iterator wrapper supporting an implicit supremum at the end of the sequence, dominating all comparisons.
The implicit supremum comes with a performance cost.
Deriving from _RAIter is not possible since _RAIter need not be a class.
_GuardedIterator()
Parameters
operator _RAIter()
Returns
Wrapped iterator.
Generated by Doxygen
5.90 __gnu_parallel::_GuardedIterator< _RAIter, _Compare > Class Template Reference 879
operator∗()
Returns
Referenced element.
operator++()
Returns
This.
operator<
Parameters
__bi1 First iterator.
__bi2 Second iterator.
Returns
true if less.
operator<=
Parameters
__bi1 First iterator.
__bi2 Second iterator.
Generated by Doxygen
880
Returns
The documentation for this class was generated from the following file:
• multiway_merge.h
__gnu_pbds::detail
::pat_trie_base::_Node
_base< _ATraits, Metadata >
__gnu_pbds::detail
::pat_trie_base::_Head
< _ATraits, Metadata >
Public Types
Public Attributes
• node_pointer m_p_max
• node_pointer m_p_min
• node_pointer m_p_parent
• const node_type m_type
Generated by Doxygen
5.92 __gnu_pbds::detail::pat_trie_base::_Inode< _ATraits, Metadata > Struct Template Reference 881
The documentation for this struct was generated from the following file:
• pat_trie_base.hpp
__gnu_pbds::detail
::pat_trie_base::_Node
_base< _ATraits, Metadata >
__gnu_pbds::detail
::pat_trie_base::_Inode
< _ATraits, Metadata >
Classes
• struct const_iterator
• struct iterator
Public Types
• enum { arr_size }
• typedef detail::rebind_traits< _Alloc, node_pointer > __rebind_np
• typedef base_type::allocator_type _Alloc
• typedef base_type::access_traits access_traits
• typedef _Alloc allocator_type
• typedef _Node_base< _ATraits, Metadata > base_type
• typedef __rebind_np::pointer node_pointer_pointer
• typedef __rebind_np::reference node_pointer_reference
• typedef _Alloc::size_type size_type
• typedef base_type::type_traits type_traits
• typedef type_traits::value_type value_type
Generated by Doxygen
882
Public Attributes
• node_pointer m_p_parent
• const node_type m_type
• pat_trie_base.hpp
The specialization on this type helps resolve the problem of reference to void, and eliminates the need to specialize
_Pointer_adapter for cases of void∗, const void∗, and so on.
The documentation for this struct was generated from the following file:
• pointer.h
Generated by Doxygen
5.94 __gnu_pbds::detail::pat_trie_base::_Iter< Node, Leaf, Head, Inode, Is_Forward_Iterator > Class
Template Reference 883
__gnu_pbds::detail __gnu_pbds::detail
::pat_trie_base::_CIter ::pat_trie_base::_Iter
< Node, Leaf, Head, Inode, < Node, Leaf, Head, Inode,
Is_Forward_Iterator > Is_Forward_Iterator >
Public Types
• _Iter (const _Iter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other)
• _Iter (node_pointer p_nd=0)
• bool operator!= (const _CIter &other) const
• bool operator!= (const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other) const
• reference operator∗ () const
• _Iter & operator++ ()
• _Iter operator++ (int)
• _Iter & operator-- ()
• _Iter operator-- (int)
• pointer operator-> () const
• _Iter & operator= (const _Iter &other)
• _Iter & operator= (const _Iter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other)
• bool operator== (const _CIter &other) const
• bool operator== (const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other) const
Generated by Doxygen
884
Public Attributes
• node_pointer m_p_nd
template<typename Node, typename Leaf, typename Head, typename Inode, bool Is_Forward_Iterator>
class __gnu_pbds::detail::pat_trie_base::_Iter< Node, Leaf, Head, Inode, Is_Forward_Iterator >
Iterator.
The documentation for this class was generated from the following file:
• pat_trie_base.hpp
Public Types
• using difference_type
• using iterator_category
• using pointer
• using reference
• using value_type
Generated by Doxygen
5.96 __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory > Class Template Reference 885
Friends
operator==
• forward_list.h
std::pair< _Iterator1,
_Iterator2 >
__gnu_parallel::_Iterator
Pair< _Iterator1, _Iterator2,
_IteratorCategory >
Public Types
Generated by Doxygen
886
Public Attributes
• _Iterator1 first
• _Iterator2 second
Related Symbols
• constexpr enable_if< __and_< __is_swappable< _Iterator1 >, __is_swappable< _Iterator2 > >::value >::type
swap (pair< _Iterator1, _Iterator2 > &__x, pair< _Iterator1, _Iterator2 > &__y) noexcept(noexcept(__x.swap(←-
__y)))
• constexpr bool operator== (const pair< _Iterator1, _Iterator2 > &__x, const pair< _U1, _U2 > &__y)
• constexpr common_comparison_category_t< __detail::__synth3way_t< _Iterator1, _U1 >, __detail::__←-
synth3way_t< _Iterator2, _U2 > > operator (const pair< _Iterator1, _Iterator2 > &__x, const pair< _U1,
_U2 > &__y)
A pair of iterators. The usual iterator operations are applied to both child iterators.
first_type
Generated by Doxygen
5.96 __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory > Class Template Reference 887
second_type
swap()
operator()
operator==()
bool operator== (
const pair< _Iterator1, _Iterator2 > & __x,
const pair< _U1, _U2 > & __y) [related]
Two pairs are equal iff their members are equal.
swap()
enable_if< __and_< __is_swappable< _Iterator1 >, __is_swappable< _Iterator2 > >::value >::type
swap (
pair< _Iterator1, _Iterator2 > & __x,
pair< _Iterator1, _Iterator2 > & __y) [related]
Swap overload for pairs. Calls std::pair::swap().
Note
This std::swap overload is not declared in C++03 mode, which has performance implications, e.g. see https←-
://gcc.gnu.org/PR38466
first
second
Generated by Doxygen
888
Public Types
• _IteratorTriple (const _Iterator1 &__first, const _Iterator2 &__second, const _Iterator3 &__third)
• operator _Iterator3 () const
• _IteratorTriple operator+ (difference_type __delta) const
• _IteratorTriple & operator++ ()
• const _IteratorTriple operator++ (int)
• difference_type operator- (const _IteratorTriple &__other) const
• _IteratorTriple & operator-- ()
• const _IteratorTriple operator-- (int)
• _IteratorTriple & operator= (const _IteratorTriple &__other)
Public Attributes
• _Iterator1 _M_first
• _Iterator2 _M_second
• _Iterator3 _M_third
A triple of iterators. The usual iterator operations are applied to all three child iterators.
The documentation for this class was generated from the following file:
• iterator.h
Public Types
Public Attributes
Generated by Doxygen
5.99 __gnu_pbds::detail::pat_trie_base::_Leaf< _ATraits, Metadata > Struct Template Reference 889
template<typename _DifferenceTp>
struct __gnu_parallel::_Job< _DifferenceTp >
_M_first
_M_last
_M_load
• workstealing.h
Generated by Doxygen
890
__gnu_pbds::detail
::pat_trie_base::_Node
_base< _ATraits, Metadata >
__gnu_pbds::detail
::pat_trie_base::_Leaf
< _ATraits, Metadata >
Public Types
Public Attributes
• node_pointer m_p_parent
• const node_type m_type
• pat_trie_base.hpp
Generated by Doxygen
5.100 __gnu_parallel::_Less< _T1, _T2 > Struct Template Reference 891
std::binary_function
< _T1, _T2, bool >
__gnu_parallel::_Less
< _T1, _T2 >
Public Types
first_argument_type
result_type
second_argument_type
Generated by Doxygen
892
The documentation for this struct was generated from the following file:
• base.h
std::binary_function
< std::pair< _T1, _T2
>, std::pair< _T1, _T2
>, bool >
__gnu_parallel::_Lexicographic
< _T1, _T2, _Compare >
Public Types
first_argument_type
std::pair< _T1, _T2 > std::binary_function< std::pair< _T1, _T2 >, std::pair< _T1, _T2 >, bool
>::first_argument_type [inherited]
first_argument_type is the type of the first argument
Generated by Doxygen
5.102 __gnu_parallel::_LexicographicReverse< _T1, _T2, _Compare > Class Template Reference 893
result_type
bool std::binary_function< std::pair< _T1, _T2 >, std::pair< _T1, _T2 >, bool >::result_type
[inherited]
result_type is the return type
second_argument_type
std::pair< _T1, _T2 > std::binary_function< std::pair< _T1, _T2 >, std::pair< _T1, _T2 >, bool
>::second_argument_type [inherited]
second_argument_type is the type of the second argument
The documentation for this class was generated from the following file:
• multiseq_selection.h
std::binary_function
< _T1, _T2, bool >
__gnu_parallel::_Lexicographic
Reverse< _T1, _T2, _Compare >
Public Types
Generated by Doxygen
894
first_argument_type
result_type
second_argument_type
• multiseq_selection.h
std::_List_base< _Tp,
_Alloc >
Public Types
Generated by Doxygen
5.104 std::_List_const_iterator< _Tp > Struct Template Reference 895
Protected Types
Protected Attributes
• _List_impl _M_impl
Public Types
Generated by Doxygen
896
Public Attributes
Friends
template<typename _Tp>
struct std::_List_const_iterator< _Tp >
A list::const_iterator.
All the functions are op overloads.
The documentation for this struct was generated from the following files:
• stl_iterator_base_funcs.h
• stl_list.h
Public Types
Generated by Doxygen
5.106 std::_List_node< _Tp > Struct Template Reference 897
Public Attributes
• __detail::_List_node_base ∗ _M_node
Friends
template<typename _Tp>
struct std::_List_iterator< _Tp >
A list::iterator.
All the functions are op overloads.
The documentation for this struct was generated from the following files:
• stl_iterator_base_funcs.h
• stl_list.h
std::__detail::_List
_node_base
Public Types
• _List_node_base ∗ _M_base ()
• const _List_node_base ∗ _M_base () const
• void _M_hook (_List_node_base ∗const __position) noexcept
• _Node_ptr _M_node_ptr ()
• void _M_reverse () noexcept
• void _M_transfer (_List_node_base ∗const __first, _List_node_base ∗const __last) noexcept
• void _M_unhook () noexcept
Generated by Doxygen
898
• _Tp ∗ _M_valptr ()
• _Tp const ∗ _M_valptr () const
Public Attributes
• _List_node_base ∗ _M_next
• _List_node_base ∗ _M_prev
• __gnu_cxx::__aligned_membuf< _Tp > _M_storage
template<typename _Tp>
struct std::_List_node< _Tp >
• stl_list.h
std::__detail::_List
_node_base
std::__detail::_List
std::_List_node< _Tp >
_node_header
Public Types
• _List_node_base ∗ _M_base ()
• const _List_node_base ∗ _M_base () const
• void _M_hook (_List_node_base ∗const __position) noexcept
• void _M_reverse () noexcept
Generated by Doxygen
5.108 std::__detail::_List_node_header Struct Reference 899
Public Attributes
• _List_node_base ∗ _M_next
• _List_node_base ∗ _M_prev
std::__detail::_List
_node_base
std::__detail::_List
_node_header
Public Types
Generated by Doxygen
900
Public Attributes
• _List_node_base ∗ _M_next
• _List_node_base ∗ _M_prev
• size_t _M_size
• stl_list.h
Public Attributes
• _Tp _M_key
• int _M_source
• bool _M_sup
_M_key
_M_source
_M_sup
Generated by Doxygen
5.110 __gnu_parallel::_LoserTreePointerBase< _Tp, _Compare >::_Loser Struct Reference 901
• losertree.h
Public Attributes
• losertree.h
__gnu_parallel::_LoserTree
Base< _Tp, _Compare >
__gnu_parallel::_LoserTree
< __stable, _Tp, _Compare >
Generated by Doxygen
902
Protected Attributes
__delete_min_insert()
__get_min_source()
Returns
References __gnu_parallel::_LoserTreeBase< _Tp, _Compare >::_M_losers, and __gnu_parallel::_LoserTreeBase< _Tp, _Compare >::
__insert_start()
Parameters
__key the element to insert
__source __index of the __source __sequence
__sup flag that determines whether the value to insert is an explicit __supremum.
Generated by Doxygen
5.112 __gnu_parallel::_LoserTree< false, _Tp, _Compare > Class Template Reference 903
_M_log_k
• losertree.h
__gnu_parallel::_LoserTree
Base< _Tp, _Compare >
__gnu_parallel::_LoserTree
< false, _Tp, _Compare >
Protected Attributes
Generated by Doxygen
904
__delete_min_insert()
Parameters
__key the _M_key to insert
__sup true iff __key is an explicitly marked supremum
__get_min_source()
Returns
References __gnu_parallel::_LoserTreeBase< _Tp, _Compare >::_M_losers, and __gnu_parallel::_LoserTreeBase< _Tp, _Compare >::
__init_winner()
Parameters
__insert_start()
Parameters
__key the element to insert
__source __index of the __source __sequence
__sup flag that determines whether the value to insert is an explicit __supremum.
Generated by Doxygen
5.113 __gnu_parallel::_LoserTreeBase< _Tp, _Compare > Class Template Reference 905
• losertree.h
__gnu_parallel::_LoserTree
< __stable, _Tp, _Compare >
__gnu_parallel::_LoserTree
Base< _Tp, _Compare >
__gnu_parallel::_LoserTree
< false, _Tp, _Compare >
Classes
• struct _Loser
Protected Attributes
• _Compare _M_comp
• bool _M_first_insert
• unsigned int _M_ik
• unsigned int _M_k
• unsigned int _M_log_k
• _Loser ∗ _M_losers
• unsigned int _M_offset
Generated by Doxygen
906
Parameters
_Tp the element type
_Compare the comparator to use, defaults to std::less<_Tp>
_LoserTreeBase()
Parameters
∼_LoserTreeBase()
template<typename _Tp , typename _Compare >
__gnu_parallel::_LoserTreeBase< _Tp, _Compare >::∼_LoserTreeBase () [inline]
The destructor.
References __gnu_parallel::_LoserTreeBase< _Tp, _Compare >::_M_losers.
__get_min_source()
Returns
References __gnu_parallel::_LoserTreeBase< _Tp, _Compare >::_M_losers, and __gnu_parallel::_LoserTreeBase< _Tp, _Compare >::
__insert_start()
Generated by Doxygen
5.114 __gnu_parallel::_LoserTreePointer< __stable, _Tp, _Compare > Class Template Reference 907
Parameters
__key the element to insert
__source __index of the __source __sequence
__sup flag that determines whether the value to insert is an explicit __supremum.
_M_comp
_M_first_insert
_M_log_k
_M_losers
• losertree.h
Generated by Doxygen
908
__gnu_parallel::_LoserTree
PointerBase< _Tp, _Compare >
__gnu_parallel::_LoserTree
Pointer< __stable, _Tp,
_Compare >
Protected Attributes
• losertree.h
Generated by Doxygen
5.116 __gnu_parallel::_LoserTreePointerBase< _Tp, _Compare > Class Template Reference 909
__gnu_parallel::_LoserTree
PointerBase< _Tp, _Compare >
__gnu_parallel::_LoserTree
Pointer< false, _Tp, _Compare >
Protected Attributes
• losertree.h
Generated by Doxygen
910
__gnu_parallel::_LoserTree
Pointer< __stable, _Tp,
_Compare >
__gnu_parallel::_LoserTree
PointerBase< _Tp, _Compare >
__gnu_parallel::_LoserTree
Pointer< false, _Tp, _Compare >
Classes
• struct _Loser
Protected Attributes
• _Compare _M_comp
• unsigned int _M_ik
• unsigned int _M_k
• _Loser ∗ _M_losers
• unsigned int _M_offset
• losertree.h
Generated by Doxygen
5.118 __gnu_parallel::_LoserTreePointerUnguarded< false, _Tp, _Compare > Class Template Reference 911
__gnu_parallel::_LoserTree
PointerUnguardedBase<
_Tp, _Compare >
__gnu_parallel::_LoserTree
PointerUnguarded< __stable,
_Tp, _Compare >
• _LoserTreePointerUnguarded (unsigned int __k, const _Tp &__sentinel, _Compare __comp=std::less< _Tp
>())
• void __delete_min_insert (const _Tp &__key, bool __sup)
• int __get_min_source ()
• void __init ()
• unsigned int __init_winner (unsigned int __root)
• void __insert_start (const _Tp &__key, int __source, bool)
Protected Attributes
• losertree.h
Generated by Doxygen
912
__gnu_parallel::_LoserTree
PointerUnguardedBase<
_Tp, _Compare >
__gnu_parallel::_LoserTree
PointerUnguarded< false,
_Tp, _Compare >
• _LoserTreePointerUnguarded (unsigned int __k, const _Tp &__sentinel, _Compare __comp=std::less< _Tp
>())
• void __delete_min_insert (const _Tp &__key, bool __sup)
• int __get_min_source ()
• void __init ()
• unsigned int __init_winner (unsigned int __root)
• void __insert_start (const _Tp &__key, int __source, bool)
Protected Attributes
• losertree.h
Generated by Doxygen
5.120 __gnu_parallel::_LoserTreeTraits< _Tp > Struct Template Reference 913
__gnu_parallel::_LoserTree
PointerUnguarded< __stable,
_Tp, _Compare >
__gnu_parallel::_LoserTree
PointerUnguardedBase<
_Tp, _Compare >
__gnu_parallel::_LoserTree
PointerUnguarded< false,
_Tp, _Compare >
Protected Attributes
• _Compare _M_comp
• unsigned int _M_ik
• unsigned int _M_k
• _Loser ∗ _M_losers
• unsigned int _M_offset
Unguarded loser tree, keeping only pointers to the elements in the tree structure.
No guarding is done, therefore not a single input sequence must run empty. This is a very fast variant.
The documentation for this class was generated from the following file:
• losertree.h
Generated by Doxygen
914
template<typename _Tp>
struct __gnu_parallel::_LoserTreeTraits< _Tp >
Traits for determining whether the loser tree should use pointers or copies.
The field "_M_use_pointer" is used to determine whether to use pointers in he loser trees or whether to copy the values
into the loser tree.
The default behavior is to use pointers if the data type is 4 times as big as the pointer to it.
Specialize for your data type to customize the behavior.
Example:
template<> struct _LoserTreeTraits<int> { static const bool _M_use_pointer = false; };
template<> struct _LoserTreeTraits<heavyweight_type> { static const bool _M_use_pointer = true; };
Parameters
_M_use_pointer
• multiway_merge.h
__gnu_parallel::_LoserTree
UnguardedBase< _Tp, _Compare >
__gnu_parallel::_LoserTree
Unguarded< __stable, _Tp,
_Compare >
Generated by Doxygen
5.122 __gnu_parallel::_LoserTreeUnguarded< false, _Tp, _Compare > Class Template Reference 915
• _LoserTreeUnguarded (unsigned int __k, const _Tp &__sentinel, _Compare __comp=std::less< _Tp >())
• void __delete_min_insert (_Tp __key, bool)
• int __get_min_source ()
• void __init ()
• unsigned int __init_winner (unsigned int __root)
• void __insert_start (const _Tp &__key, int __source, bool)
Protected Attributes
• losertree.h
__gnu_parallel::_LoserTree
UnguardedBase< _Tp, _Compare >
__gnu_parallel::_LoserTree
Unguarded< false, _Tp,
_Compare >
• _LoserTreeUnguarded (unsigned int __k, const _Tp &__sentinel, _Compare __comp=std::less< _Tp >())
• void __delete_min_insert (_Tp __key, bool)
• int __get_min_source ()
• void __init ()
Generated by Doxygen
916
Protected Attributes
• losertree.h
__gnu_parallel::_LoserTree
Unguarded< __stable, _Tp,
_Compare >
__gnu_parallel::_LoserTree
UnguardedBase< _Tp, _Compare >
__gnu_parallel::_LoserTree
Unguarded< false, _Tp,
_Compare >
• _LoserTreeUnguardedBase (unsigned int __k, const _Tp &__sentinel, _Compare __comp=std::less< _Tp >())
• int __get_min_source ()
• void __insert_start (const _Tp &__key, int __source, bool)
Protected Attributes
• _Compare _M_comp
• unsigned int _M_ik
• unsigned int _M_k
• _Loser ∗ _M_losers
• unsigned int _M_offset
Generated by Doxygen
5.124 __gnu_pbds::detail::pat_trie_base::_Metadata< Metadata, _Alloc > Struct Template Reference 917
• losertree.h
Public Types
Public Attributes
• metadata_type m_metadata
• pat_trie_base.hpp
Public Types
Generated by Doxygen
918
template<typename _Alloc>
struct __gnu_pbds::detail::pat_trie_base::_Metadata< null_type, _Alloc >
• pat_trie_base.hpp
std::binary_function
< _Arg1, _Arg2, _Result >
__gnu_parallel::_Multiplies
< _Tp1, _Tp2, _Result >
Public Types
first_argument_type
Generated by Doxygen
5.127 std::__fwdlist::_Node< _ValPtr > Struct Template Reference 919
result_type
second_argument_type
• base.h
std::__fwdlist::_Node
_base< __ptr_rebind<
_ValPtr, void > >
std::__fwdlist::_Node
< _ValPtr >
Public Types
• using _Base_ptr
• using _Node_ptr
• using value_type
Generated by Doxygen
920
Public Attributes
• _Base_ptr _M_next
• _Uninit_storage _M_u
template<typename _ValPtr>
struct std::__fwdlist::_Node< _ValPtr >
• forward_list.h
__gnu_pbds::detail
::pat_trie_base::_Head
< _ATraits, Metadata >
__gnu_pbds::detail __gnu_pbds::detail
::pat_trie_base::_Node ::pat_trie_base::_Inode
_base< _ATraits, Metadata > < _ATraits, Metadata >
__gnu_pbds::detail
::pat_trie_base::_Leaf
< _ATraits, Metadata >
Public Types
Generated by Doxygen
5.129 std::__fwdlist::_Node_base< _VoidPtr > Struct Template Reference 921
Public Attributes
• node_pointer m_p_parent
• const node_type m_type
Node base.
The documentation for this struct was generated from the following file:
• pat_trie_base.hpp
Public Types
• using _Base_ptr
Public Attributes
• _Base_ptr _M_next
template<typename _VoidPtr>
struct std::__fwdlist::_Node_base< _VoidPtr >
• forward_list.h
Generated by Doxygen
922
Inheritance diagram for __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator,
_Alloc >:
__gnu_pbds::detail __gnu_pbds::detail
::pat_trie_base::_Node ::pat_trie_base::_Node
_citer< Node, Leaf, Head, _iter< Node, Leaf, Head,
Inode, _CIterator, Iterator, Inode, _CIterator, Iterator,
_Alloc > _Alloc >
Public Types
Public Attributes
• node_pointer m_p_nd
• a_const_pointer m_p_traits
Protected Types
Generated by Doxygen
5.130 __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >
Class Template Reference 923
template<typename Node, typename Leaf, typename Head, typename Inode, typename _CIterator, typename
Iterator, typename _Alloc>
class __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >
metadata_const_reference
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
rebind_traits<_Alloc,metadata_type>::const_reference __gnu_pbds::detail::pat_trie_base::_Node_citer<
Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::metadata_const_reference
Const metadata reference type.
metadata_type
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
Node::metadata_type __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _←-
CIterator, Iterator, _Alloc >::metadata_type
Metadata type.
get_child()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
_Node_citer __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator,
Iterator, _Alloc >::get_child (
size_type i) const [inline]
Returns a __const node __iterator to the corresponding node's i-th child.
References std::advance().
get_metadata()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
metadata_const_reference __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode,
_CIterator, Iterator, _Alloc >::get_metadata () const [inline]
Metadata access.
num_children()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
size_type __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator,
Iterator, _Alloc >::num_children () const [inline]
Returns the number of children in the corresponding node.
References std::distance().
Referenced by __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::operator∗(),
and __gnu_pbds::detail::pat_trie_base::_Node_iter< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::operator∗().
Generated by Doxygen
924
operator"!=()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
bool __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator,
_Alloc >::operator!= (
const _Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc > & other)
const [inline]
Compares content (negatively) to a different iterator object.
operator∗()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
const_reference __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _←-
CIterator, Iterator, _Alloc >::operator∗ () const [inline]
Const access; returns the __const iterator∗ associated with the current leaf.
References __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::num_children().
operator==()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
bool __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator,
_Alloc >::operator== (
const _Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc > & other)
const [inline]
Compares content to a different iterator object.
valid_prefix()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
std::pair< a_const_iterator, a_const_iterator > __gnu_pbds::detail::pat_trie_base::_Node_citer<
Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::valid_prefix () const [inline]
Subtree valid prefix.
References std::make_pair().
The documentation for this class was generated from the following file:
• pat_trie_base.hpp
Generated by Doxygen
5.131 std::_Node_handle< _Key, _Value, _NodeAlloc > Class Template Reference 925
std::_Node_handle_common
< _Value, _NodeAlloc >
std::_Node_handle<
_Key, _Value, _NodeAlloc >
Public Types
• using allocator_type
• using key_type
• using mapped_type
Friends
• template<typename _Key2 , typename _Value2 , typename _ValueAlloc , typename _ExtractKey , typename _Equal , typename _Hash ,
typename _RangeHash , typename _Unused , typename _RehashPolicy , typename _Traits >
class _Hashtable
• template<typename _Key2 , typename _Value2 , typename _KeyOfValue , typename _Compare , typename _ValueAlloc >
class _Rb_tree
• void swap (_Node_handle &__x, _Node_handle &__y) noexcept(noexcept(__x.swap(__y)))
• node_handle.h
Generated by Doxygen
926
std::_Node_handle_common
< _Value, _NodeAlloc >
std::_Node_handle<
_Value, _Value, _NodeAlloc >
Public Types
• using allocator_type
• using value_type
Friends
• template<typename _Key2 , typename _Value2 , typename _ValueAlloc , typename _ExtractKey , typename _Equal , typename _Hash ,
typename _RangeHash , typename _Unused , typename _RehashPolicy , typename _Traits >
class _Hashtable
• template<typename _Key , typename _Val , typename _KeyOfValue , typename _Compare , typename _Alloc >
class _Rb_tree
• void swap (_Node_handle &__x, _Node_handle &__y) noexcept(noexcept(__x.swap(__y)))
• node_handle.h
Generated by Doxygen
5.133 std::_Node_handle_common< _Val, _NodeAlloc > Class Template Reference 927
Public Types
• using allocator_type
• node_handle.h
Public Attributes
• bool inserted
• _NodeHandle node
• _Iterator position
• node_handle.h
Generated by Doxygen
928
Inheritance diagram for __gnu_pbds::detail::pat_trie_base::_Node_iter< Node, Leaf, Head, Inode, _CIterator, Iterator,
_Alloc >:
__gnu_pbds::detail __gnu_pbds::detail
::pat_trie_base::_Node ::pat_trie_base::_Node
_citer< Node, Leaf, Head, _iter< Node, Leaf, Head,
Inode, _CIterator, Iterator, Inode, _CIterator, Iterator,
_Alloc > _Alloc >
Public Types
Public Attributes
• node_pointer m_p_nd
• a_const_pointer m_p_traits
Protected Types
Generated by Doxygen
5.135 __gnu_pbds::detail::pat_trie_base::_Node_iter< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >
Class Template Reference 929
template<typename Node, typename Leaf, typename Head, typename Inode, typename _CIterator, typename
Iterator, typename _Alloc>
class __gnu_pbds::detail::pat_trie_base::_Node_iter< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >
Node iterator.
metadata_const_reference
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
rebind_traits<_Alloc,metadata_type>::const_reference __gnu_pbds::detail::pat_trie_base::_Node_citer<
Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::metadata_const_reference [inherited]
Const metadata reference type.
metadata_type
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
Node::metadata_type __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _←-
CIterator, Iterator, _Alloc >::metadata_type [inherited]
Metadata type.
get_child()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
_Node_iter __gnu_pbds::detail::pat_trie_base::_Node_iter< Node, Leaf, Head, Inode, _CIterator,
Iterator, _Alloc >::get_child (
size_type i) const [inline]
Returns a node __iterator to the corresponding node's i-th child.
References std::advance().
get_metadata()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
metadata_const_reference __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode,
_CIterator, Iterator, _Alloc >::get_metadata () const [inline], [inherited]
Metadata access.
num_children()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
size_type __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator,
Iterator, _Alloc >::num_children () const [inline], [inherited]
Returns the number of children in the corresponding node.
References std::distance().
Referenced by __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::operator∗(),
and __gnu_pbds::detail::pat_trie_base::_Node_iter< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::operator∗().
Generated by Doxygen
930
operator"!=()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
bool __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator,
_Alloc >::operator!= (
const _Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc > & other)
const [inline], [inherited]
Compares content (negatively) to a different iterator object.
operator∗()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
reference __gnu_pbds::detail::pat_trie_base::_Node_iter< Node, Leaf, Head, Inode, _CIterator,
Iterator, _Alloc >::operator∗ () const [inline]
Access; returns the iterator∗ associated with the current leaf.
References __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::num_children().
operator==()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
bool __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator,
_Alloc >::operator== (
const _Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc > & other)
const [inline], [inherited]
Compares content to a different iterator object.
valid_prefix()
template<typename Node , typename Leaf , typename Head , typename Inode , typename _CIterator ,
typename Iterator , typename _Alloc >
std::pair< a_const_iterator, a_const_iterator > __gnu_pbds::detail::pat_trie_base::_Node_citer<
Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::valid_prefix () const [inline], [inherited]
Subtree valid prefix.
References std::make_pair().
The documentation for this class was generated from the following file:
• pat_trie_base.hpp
template<typename _Type>
class __gnu_debug::_Not_equal_to< _Type >
A simple function object that returns true if the passed-in value is not equal to the stored value. It saves typing over
using both bind1st and not_equal.
Generated by Doxygen
5.137 std::_Not_fn< _Fn > Class Template Reference 931
The documentation for this class was generated from the following file:
• safe_sequence.h
template<typename _Fn>
class std::_Not_fn< _Fn >
Generalized negator.
The documentation for this class was generated from the following file:
• functional
Generated by Doxygen
932
operator()()
Parameters
The documentation for this struct was generated from the following file:
• for_each_selectors.h
Public Types
Public Attributes
• _DifferenceType _M_begin
• _DifferenceType _M_end
template<typename _DifferenceTp>
struct __gnu_parallel::_Piece< _DifferenceTp >
Subsequence description.
_M_begin
Generated by Doxygen
5.140 std::_Placeholder< _Num > Struct Template Reference 933
_M_end
• multiway_mergesort.h
template<int _Num>
struct std::_Placeholder< _Num >
Since
C++11
The documentation for this struct was generated from the following file:
• functional
std::binary_function
< _Arg1, _Arg2, _Result >
__gnu_parallel::_Plus
< _Tp1, _Tp2, _Result >
Public Types
Generated by Doxygen
934
first_argument_type
result_type
second_argument_type
• base.h
Public Types
Public Attributes
• _ThreadIndex _M_num_threads
• _DifferenceType ∗ _M_offsets
• std::vector< _Piece< _DifferenceType > > ∗ _M_pieces
• _ValueType ∗ _M_samples
• _RAIter _M_source
• _DifferenceType ∗ _M_starts
• _ValueType ∗∗ _M_temporary
Generated by Doxygen
5.142 __gnu_parallel::_PMWMSSortingData< _RAIter > Struct Template Reference 935
template<typename _RAIter>
struct __gnu_parallel::_PMWMSSortingData< _RAIter >
_M_num_threads
_M_offsets
_M_pieces
_M_samples
_M_source
_M_starts
_M_temporary
Generated by Doxygen
936
• multiway_mergesort.h
Public Types
Generated by Doxygen
5.143 __gnu_cxx::_Pointer_adapter< _Storage_policy > Class Template Reference 937
Friends
template<typename _Storage_policy>
class __gnu_cxx::_Pointer_adapter< _Storage_policy >
The following provides an 'alternative pointer' that works with the containers when specified as the pointer typedef of the
allocator.
The pointer type used with the containers doesn't have to be this class, but it must support the implicit conversions,
pointer arithmetic, comparison operators, etc. that are supported by this class, and avoid raising compile-time ambigu-
ities. Because creating a working pointer can be challenging, this pointer template was designed to wrapper an easier
storage policy type, so that it becomes reusable for creating other pointer types.
Generated by Doxygen
938
A key point of this class is also that it allows container writers to 'assume' Allocator::pointer is a typedef for a normal
pointer. This class supports most of the conventions of a true pointer, and can, for instance handle implicit conversion to
const and base class pointer types. The only impositions on container writers to support extended pointers are: 1) use
the Allocator::pointer typedef appropriately for pointer types. 2) if you need pointer casting, use the __pointer_cast<>
functions from ext/cast.h. This allows pointer cast operations to be overloaded as necessary by custom pointers.
Note: The const qualifier works with this pointer adapter as follows:
_Tp∗ == _Pointer_adapter<_Std_pointer_impl<_Tp> >; const _Tp∗ == _Pointer_adapter<_Std_pointer_impl<const
_Tp> >; _Tp∗ const == const _Pointer_adapter<_Std_pointer_impl<_Tp> >; const _Tp∗ const == const _Pointer_←-
adapter<_Std_pointer_impl<const _Tp> >;
The documentation for this class was generated from the following file:
• pointer.h
Public Types
Sequence that conceptually consists of multiple copies of the same element. The copies are not stored explicitly, of
course.
Parameters
_PseudoSequence()
Parameters
Generated by Doxygen
5.145 __gnu_parallel::_PseudoSequenceIterator< _Tp, _DifferenceTp > Class Template Reference 939
begin()
end()
• base.h
Public Types
_Iterator associated with __gnu_parallel::_PseudoSequence. If features the usual random-access iterator functionality.
Parameters
The documentation for this class was generated from the following file:
• base.h
Generated by Doxygen
940
Public Types
Public Attributes
template<typename _RAIter>
struct __gnu_parallel::_QSBThreadLocal< _RAIter >
_Piece
_QSBThreadLocal()
Parameters
Generated by Doxygen
5.147 std::__detail::_Quoted_string< _String, _CharT > Struct Template Reference 941
_M_elements_leftover
_M_global
_M_initial
_M_leftover_parts
_M_num_threads
• balanced_quicksort.h
Public Attributes
• _CharT _M_delim
• _CharT _M_escape
• _String _M_string
Generated by Doxygen
942
• _RandomNumber ()
• _RandomNumber (uint32_t __seed, uint64_t _M_supremum=0x100000000ULL)
• unsigned long __genrand_bits (int __bits)
• uint32_t operator() ()
• uint32_t operator() (uint64_t local_supremum)
_RandomNumber() [1/2]
__gnu_parallel::_RandomNumber::_RandomNumber () [inline]
Default constructor. Seed with 0.
_RandomNumber() [2/2]
__gnu_parallel::_RandomNumber::_RandomNumber (
uint32_t __seed,
uint64_t _M_supremum = 0x100000000ULL) [inline]
Constructor.
Parameters
__seed Random __seed.
_M_supremum Generate integer random numbers in the interval [0,_M_supremum).
__genrand_bits()
Parameters
Generated by Doxygen
5.149 __gnu_cxx::_Relative_pointer_impl< _Tp > Class Template Reference 943
operator()() [1/2]
operator()() [2/2]
uint32_t __gnu_parallel::_RandomNumber::operator() (
uint64_t local_supremum) [inline]
Generate unsigned random 32-bit integer in the interval [0,local_supremum).
The documentation for this class was generated from the following file:
• random_number.h
Public Types
template<typename _Tp>
class __gnu_cxx::_Relative_pointer_impl< _Tp >
A storage policy for use with _Pointer_adapter<> which stores the pointer's address as an offset value which is relative
to its own address.
This is intended for pointers within shared memory regions which might be mapped at different addresses by different
processes. For null pointers, a value of 1 is used. (0 is legitimate sometimes for nodes in circularly linked lists) This
value was chosen as the least likely to generate an incorrect null, As there is no reason why any normal pointer would
point 1 byte into its own pointer address.
The documentation for this class was generated from the following file:
• pointer.h
Public Types
Generated by Doxygen
944
template<typename _Tp>
class __gnu_cxx::_Relative_pointer_impl< const _Tp >
Relative_pointer_impl needs a specialization for const T because of the casting done during pointer arithmetic.
The documentation for this class was generated from the following file:
• pointer.h
template<typename _Tp>
class __gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp >
Double-ended queue of bounded size, allowing lock-free atomic access. push_front() and pop_front() must not be called
concurrently to each other, while pop_back() can be called concurrently at all times. empty(), size(), and top()
are intentionally not provided. Calling them would not make sense in a concurrent setting.
Parameters
_RestrictedBoundedConcurrentQueue()
Parameters
References __gnu_parallel::__encode2().
∼_RestrictedBoundedConcurrentQueue()
template<typename _Tp >
__gnu_parallel::_RestrictedBoundedConcurrentQueue< _Tp >::∼_RestrictedBoundedConcurrentQueue ()
[inline]
Destructor. Not to be called concurrent, of course.
Generated by Doxygen
5.152 __gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware > Class
Template Reference 945
pop_back()
pop_front()
push_front()
• queue.h
Generated by Doxygen
946
>:
__gnu_debug::basic
_string< _CharT, _Traits,
_Allocator >
std::__debug::deque
< _Tp, _Allocator >
std::__debug::forward
_list< _Tp, _Alloc >
std::__debug::list
< _Tp, _Allocator >
__gnu_debug::_Safe
std::__debug::unordered
_container< _SafeContainer,
_map< _Key, _Tp, _Hash,
_Alloc, _SafeBase, _IsCxx11Allocator
_Pred, _Alloc >
Aware >
std::__debug::unordered
_multimap< _Key, _Tp,
_Hash, _Pred, _Alloc >
std::__debug::unordered
_multiset< _Value, _Hash,
_Pred, _Alloc >
std::__debug::unordered
_set< _Value, _Hash,
_Pred, _Alloc >
std::__debug::vector
std::__debug::vector
< _Tp, std::allocator
< _Tp, _Allocator >
< _Tp > >
template<typename _SafeContainer, typename _Alloc, template< typename > class _SafeBase, bool _Is←-
Cxx11AllocatorAware = true>
class __gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware >
• safe_container.h
Generated by Doxygen
5.153 __gnu_debug::_Safe_forward_list< _SafeSequence > Class Template Reference 947
__gnu_debug::_Safe
_sequence_base
__gnu_debug::_Safe
_sequence< _SafeSequence >
__gnu_debug::_Safe
_forward_list< _SafeSequence >
Public Attributes
• _Safe_iterator_base ∗ _M_const_iterators
• _Safe_iterator_base ∗ _M_iterators
• unsigned int _M_version
• void _M_detach_all ()
• void _M_detach_singular ()
• __gnu_cxx::__mutex & _M_get_mutex () throw ()
• void _M_invalidate_all ()
• void _M_invalidate_all () const
• void _M_revalidate_singular ()
• void _M_swap (_Safe_sequence_base &) noexcept
template<typename _SafeSequence>
class __gnu_debug::_Safe_forward_list< _SafeSequence >
Special iterators swap and invalidation for forward_list because of the before_begin iterator.
Generated by Doxygen
948
_M_detach_all()
_M_detach_singular()
Postcondition
_M_get_mutex()
_M_invalidate_all()
_M_invalidate_if()
_M_revalidate_singular()
_M_transfer_from_if()
_M_const_iterators
Generated by Doxygen
5.154 __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category > Class Template Reference 949
_M_iterators
_M_version
• debug/forward_list
__gnu_debug::_Safe
_iterator_base
__gnu_debug::_Safe
_iterator< _Iterator,
_Sequence, _Category >
Public Types
Generated by Doxygen
950
Generated by Doxygen
5.154 __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category > Class Template Reference 951
Public Attributes
• _Safe_iterator_base ∗ _M_next
• _Safe_iterator_base ∗ _M_prior
• _Safe_sequence_base ∗ _M_sequence
• unsigned int _M_version
Protected Types
Friends
_Safe_iterator() [1/5]
Postcondition
Generated by Doxygen
952
_Safe_iterator() [2/5]
Precondition
Postcondition
_Safe_iterator() [3/5]
_Safe_iterator() [4/5]
_Safe_iterator() [5/5]
Generated by Doxygen
5.154 __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category > Class Template Reference 953
_M_attach() [1/2]
_M_attach() [2/2]
void __gnu_debug::_Safe_iterator_base::_M_attach (
_Safe_sequence_base ∗ __seq,
bool __constant) [protected], [inherited]
Attaches this iterator to the given sequence, detaching it from whatever sequence it was attached to originally. If the
new sequence is the NULL pointer, the iterator is left unattached.
Referenced by __gnu_debug::_Safe_iterator_base::_Safe_iterator_base(), __gnu_debug::_Safe_iterator_base::_Safe_iterator_base(),
and __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category >::_M_attach().
_M_attach_single() [1/2]
_M_attach_single() [2/2]
void __gnu_debug::_Safe_iterator_base::_M_attach_single (
_Safe_sequence_base ∗ __seq,
bool __constant) throw ( ) [protected], [inherited]
Likewise, but not thread-safe.
Referenced by __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category >::_M_attach_single().
_M_attached_to()
bool __gnu_debug::_Safe_iterator_base::_M_attached_to (
const _Safe_sequence_base ∗ __seq) const [inline], [inherited]
Determines if we are attached to the given sequence.
References __gnu_debug::_Safe_iterator_base::_M_sequence.
_M_before_dereferenceable()
Generated by Doxygen
954
_M_can_compare()
bool __gnu_debug::_Safe_iterator_base::_M_can_compare (
const _Safe_iterator_base & __x) const throw ( ) [inherited]
Can we compare this iterator to the given iterator __x? Returns true if both iterators are nonsingular and reference the
same sequence.
_M_dereferenceable()
_M_detach()
_M_detach_single()
_M_get_mutex()
_M_incrementable()
Generated by Doxygen
5.154 __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category > Class Template Reference 955
_M_invalidate()
_M_is_before_begin()
_M_is_begin()
_M_is_beginnest()
_M_is_end()
_M_reset()
_M_singular()
Generated by Doxygen
956
_M_unlink()
_M_value_initialized()
_S_constant()
base()
operator _Iterator()
Generated by Doxygen
5.154 __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category > Class Template Reference 957
operator∗()
iterator is dereferenceable
operator++() [1/2]
Precondition
iterator is incrementable
operator++() [2/2]
Precondition
iterator is incrementable
operator->()
iterator is dereferenceable
Generated by Doxygen
958
operator=() [1/2]
operator=() [2/2]
_M_next
_M_prior
_M_sequence
Generated by Doxygen
5.155 __gnu_debug::_Safe_iterator_base Class Reference 959
_M_version
• boost_concept_check.h
• bits/stl_iterator.h
• debug.h
• formatter.h
• helper_functions.h
• safe_iterator.h
• safe_iterator.tcc
__gnu_debug::_Safe
_iterator< _Iterator,
_Sequence, std::forward
_iterator_tag >
__gnu_debug::_Safe
_iterator< _Base_const
_iterator, multiset >
__gnu_debug::_Safe
__gnu_debug::_Safe
_iterator< _Base_const
_iterator_base
_iterator, set >
__gnu_debug::_Safe
_iterator< _Iterator,
_Sequence, _Category >
__gnu_debug::_Safe
__gnu_debug::_Safe
_local_iterator< _Iterator,
_local_iterator_base
_Sequence >
Generated by Doxygen
960
Public Attributes
• _Safe_iterator_base ∗ _M_next
• _Safe_iterator_base ∗ _M_prior
• _Safe_sequence_base ∗ _M_sequence
• unsigned int _M_version
• constexpr _Safe_iterator_base ()
• constexpr _Safe_iterator_base (const _Safe_iterator_base &__x, bool __constant)
• constexpr _Safe_iterator_base (const _Safe_sequence_base ∗__seq, bool __constant)
• void _M_attach (_Safe_sequence_base ∗__seq, bool __constant)
• void _M_attach_single (_Safe_sequence_base ∗__seq, bool __constant) throw ()
• void _M_detach ()
• __gnu_cxx::__mutex & _M_get_mutex () throw ()
Friends
• class _Safe_sequence_base
_Safe_iterator_base() [1/3]
_Safe_iterator_base() [2/3]
__gnu_debug::_Safe_iterator_base::_Safe_iterator_base (
const _Safe_sequence_base ∗ __seq,
bool __constant) [inline], [constexpr], [protected]
Initialize the iterator to reference the sequence pointed to by __seq. __constant is true when we are initializing a
constant iterator, and false if it is a mutable iterator. Note that __seq may be NULL, in which case the iterator will be
singular. Otherwise, the iterator will reference __seq and be nonsingular.
References _M_attach().
Generated by Doxygen
5.155 __gnu_debug::_Safe_iterator_base Class Reference 961
_Safe_iterator_base() [3/3]
__gnu_debug::_Safe_iterator_base::_Safe_iterator_base (
const _Safe_iterator_base & __x,
bool __constant) [inline], [constexpr], [protected]
Initializes the iterator to reference the same sequence that __x does. __constant is true if this is a constant iterator,
and false if it is mutable.
References _M_attach(), and _M_sequence.
_M_attach()
void __gnu_debug::_Safe_iterator_base::_M_attach (
_Safe_sequence_base ∗ __seq,
bool __constant) [protected]
Attaches this iterator to the given sequence, detaching it from whatever sequence it was attached to originally. If the
new sequence is the NULL pointer, the iterator is left unattached.
Referenced by _Safe_iterator_base(), _Safe_iterator_base(), and __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category >::_M_
_M_attach_single()
void __gnu_debug::_Safe_iterator_base::_M_attach_single (
_Safe_sequence_base ∗ __seq,
bool __constant) throw ( ) [protected]
Likewise, but not thread-safe.
Referenced by __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category >::_M_attach_single().
_M_attached_to()
bool __gnu_debug::_Safe_iterator_base::_M_attached_to (
const _Safe_sequence_base ∗ __seq) const [inline]
Determines if we are attached to the given sequence.
References _M_sequence.
_M_can_compare()
bool __gnu_debug::_Safe_iterator_base::_M_can_compare (
const _Safe_iterator_base & __x) const throw ( )
Can we compare this iterator to the given iterator __x? Returns true if both iterators are nonsingular and reference the
same sequence.
_M_detach()
_M_detach_single()
Generated by Doxygen
962
_M_get_mutex()
_M_invalidate()
_M_reset()
_M_singular()
_M_unlink()
_M_next
_Safe_iterator_base∗ __gnu_debug::_Safe_iterator_base::_M_next
Pointer to the next iterator in the sequence's list of iterators. Only valid when _M_sequence != NULL.
Referenced by __gnu_debug::_Safe_sequence< _SafeSequence >::_M_invalidate_if(), __gnu_debug::_Safe_sequence< _Sequence >
and _M_unlink().
_M_prior
_Safe_iterator_base∗ __gnu_debug::_Safe_iterator_base::_M_prior
Pointer to the previous iterator in the sequence's list of iterators. Only valid when _M_sequence != NULL.
Referenced by __gnu_debug::_Safe_sequence< _SafeSequence >::_M_invalidate_if(), __gnu_debug::_Safe_sequence< _Sequence >
and _M_unlink().
Generated by Doxygen
5.156 __gnu_debug::_Safe_local_iterator< _Iterator, _Sequence > Class Template Reference 963
_M_sequence
_Safe_sequence_base∗ __gnu_debug::_Safe_iterator_base::_M_sequence
The sequence this iterator references; may be NULL to indicate a singular iterator.
Referenced by __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category >::_Safe_iterator(), __gnu_debug::_Safe_iterator< _Itera
__gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category >::_Safe_iterator(), _Safe_iterator_base(), __gnu_debug::_Safe_local_it
__gnu_debug::_Safe_local_iterator< _Iterator, _Sequence >::_Safe_local_iterator(), __gnu_debug::_Safe_local_iterator< _Iterator, _Seq
__gnu_debug::_Safe_local_iterator_base::_Safe_local_iterator_base(), _M_attached_to(), __gnu_debug::_Safe_sequence< _Sequence
__gnu_debug::_Safe_iterator< _Iterator, _Sequence, _Category >::operator=(), __gnu_debug::_Safe_iterator< _Iterator, _Sequence, _C
__gnu_debug::_Safe_local_iterator< _Iterator, _Sequence >::operator=(), and __gnu_debug::_Safe_local_iterator< _Iterator, _Sequence
_M_version
• safe_base.h
__gnu_debug::_Safe
_iterator_base
__gnu_debug::_Safe
_local_iterator_base
__gnu_debug::_Safe
_local_iterator< _Iterator,
_Sequence >
Generated by Doxygen
964
Public Types
• _Safe_local_iterator () noexcept
• _Safe_local_iterator (_Iterator __i, const _Safe_sequence_base ∗__cont)
• _Safe_local_iterator (_Safe_local_iterator &&__x) noexcept
• _Safe_local_iterator (const _Safe_local_iterator &__x) noexcept
• template<typename _MutableIterator >
_Safe_local_iterator (const _Safe_local_iterator< _MutableIterator, typename __gnu_cxx::__enable_if< _Is←-
Constant::__value &&std::__are_same< _MutableIterator, _OtherIterator >::__value, _Sequence >::__type >
&__x) noexcept
• void _M_attach (_Safe_sequence_base ∗__seq)
• void _M_attach_single (_Safe_sequence_base ∗__seq)
• bool _M_attached_to (const _Safe_sequence_base ∗__seq) const
• bool _M_can_compare (const _Safe_iterator_base &__x) const throw ()
• bool _M_dereferenceable () const
• _Distance_traits< _Iterator >::__type _M_get_distance_to (const _Safe_local_iterator &__rhs) const
• __gnu_cxx::__conditional_type< _IsConstant::__value, const_Sequence ∗, _Sequence ∗ >::__type _M_get_←-
sequence () const
• template<typename _Other >
bool _M_in_same_bucket (const _Safe_local_iterator< _Other, _Sequence > &__other) const
• bool _M_incrementable () const
• void _M_invalidate ()
• bool _M_is_begin () const
• bool _M_is_end () const
• void _M_reset () throw ()
• bool _M_singular () const throw ()
• void _M_unlink () throw ()
• bool _M_valid_range (const _Safe_local_iterator &__rhs, std::pair< difference_type, _Distance_precision > &←-
__dist_info) const
• bool _M_value_initialized () const
• const _Iterator & base () const noexcept
• _Iterator & base () noexcept
• size_type bucket () const
• operator _Iterator () const
• reference operator∗ () const
• _Safe_local_iterator & operator++ ()
• _Safe_local_iterator operator++ (int)
• pointer operator-> () const
• _Safe_local_iterator & operator= (_Safe_local_iterator &&__x) noexcept
• _Safe_local_iterator & operator= (const _Safe_local_iterator &__x)
Generated by Doxygen
5.156 __gnu_debug::_Safe_local_iterator< _Iterator, _Sequence > Class Template Reference 965
Public Attributes
• _Safe_iterator_base ∗ _M_next
• _Safe_iterator_base ∗ _M_prior
• _Safe_sequence_base ∗ _M_sequence
• unsigned int _M_version
Friends
_Safe_local_iterator() [1/5]
Postcondition
_Safe_local_iterator() [2/5]
Generated by Doxygen
966
Precondition
Postcondition
_Safe_local_iterator() [3/5]
_Safe_local_iterator() [4/5]
_Safe_local_iterator() [5/5]
_M_attach() [1/2]
Generated by Doxygen
5.156 __gnu_debug::_Safe_local_iterator< _Iterator, _Sequence > Class Template Reference 967
_M_attach() [2/2]
void __gnu_debug::_Safe_local_iterator_base::_M_attach (
_Safe_sequence_base ∗ __seq,
bool __constant) [protected], [inherited]
Attaches this iterator to the given container, detaching it from whatever container it was attached to originally. If the new
container is the NULL pointer, the iterator is left unattached.
Referenced by __gnu_debug::_Safe_local_iterator_base::_Safe_local_iterator_base(), __gnu_debug::_Safe_local_iterator_base::_Safe_lo
and __gnu_debug::_Safe_local_iterator< _Iterator, _Sequence >::_M_attach().
_M_attach_single() [1/2]
_M_attach_single() [2/2]
void __gnu_debug::_Safe_local_iterator_base::_M_attach_single (
_Safe_sequence_base ∗ __seq,
bool __constant) throw ( ) [protected], [inherited]
Likewise, but not thread-safe.
Referenced by __gnu_debug::_Safe_local_iterator< _Iterator, _Sequence >::_M_attach_single().
_M_attached_to()
bool __gnu_debug::_Safe_iterator_base::_M_attached_to (
const _Safe_sequence_base ∗ __seq) const [inline], [inherited]
Determines if we are attached to the given sequence.
References __gnu_debug::_Safe_iterator_base::_M_sequence.
_M_can_compare()
bool __gnu_debug::_Safe_iterator_base::_M_can_compare (
const _Safe_iterator_base & __x) const throw ( ) [inherited]
Can we compare this iterator to the given iterator __x? Returns true if both iterators are nonsingular and reference the
same sequence.
_M_dereferenceable()
_M_detach()
Generated by Doxygen
968
_M_detach_single()
_M_get_mutex()
_M_in_same_bucket()
_M_incrementable()
_M_invalidate()
_M_is_begin()
_M_is_end()
_M_reset()
Generated by Doxygen
5.156 __gnu_debug::_Safe_local_iterator< _Iterator, _Sequence > Class Template Reference 969
_M_singular()
_M_unlink()
_M_value_initialized()
_S_constant()
base()
bucket()
Generated by Doxygen
970
operator _Iterator()
operator∗()
iterator is dereferenceable
operator++() [1/2]
Precondition
iterator is incrementable
operator++() [2/2]
Precondition
iterator is incrementable
operator->()
iterator is dereferenceable
Generated by Doxygen
5.156 __gnu_debug::_Safe_local_iterator< _Iterator, _Sequence > Class Template Reference 971
operator=() [1/2]
Postcondition
operator=() [2/2]
_M_next
_M_prior
_M_sequence
Generated by Doxygen
972
_M_version
• formatter.h
• helper_functions.h
• safe_local_iterator.h
• safe_local_iterator.tcc
__gnu_debug::_Safe
_iterator_base
__gnu_debug::_Safe
_local_iterator_base
__gnu_debug::_Safe
_local_iterator< _Iterator,
_Sequence >
Generated by Doxygen
5.157 __gnu_debug::_Safe_local_iterator_base Class Reference 973
Public Attributes
• _Safe_iterator_base ∗ _M_next
• _Safe_iterator_base ∗ _M_prior
• _Safe_sequence_base ∗ _M_sequence
• unsigned int _M_version
• _Safe_local_iterator_base ()
• _Safe_local_iterator_base (const _Safe_local_iterator_base &__x, bool __constant)
• _Safe_local_iterator_base (const _Safe_sequence_base ∗__seq, bool __constant)
• void _M_attach (_Safe_sequence_base ∗__seq, bool __constant)
• void _M_attach_single (_Safe_sequence_base ∗__seq, bool __constant) throw ()
• void _M_detach ()
• void _M_detach_single () throw ()
• _Safe_unordered_container_base ∗ _M_get_container () const noexcept
• __gnu_cxx::__mutex & _M_get_mutex () throw ()
_Safe_local_iterator_base() [1/3]
_Safe_local_iterator_base() [2/3]
__gnu_debug::_Safe_local_iterator_base::_Safe_local_iterator_base (
const _Safe_sequence_base ∗ __seq,
bool __constant) [inline], [protected]
Initialize the iterator to reference the container pointed to by __seq. __constant is true when we are initializing a
constant local iterator, and false if it is a mutable local iterator. Note that __seq may be NULL, in which case the iterator
will be singular. Otherwise, the iterator will reference __seq and be nonsingular.
References _M_attach().
_Safe_local_iterator_base() [3/3]
__gnu_debug::_Safe_local_iterator_base::_Safe_local_iterator_base (
const _Safe_local_iterator_base & __x,
bool __constant) [inline], [protected]
Initializes the iterator to reference the same container that __x does. __constant is true if this is a constant iterator,
and false if it is mutable.
References _M_attach(), and __gnu_debug::_Safe_iterator_base::_M_sequence.
Generated by Doxygen
974
_M_attach()
void __gnu_debug::_Safe_local_iterator_base::_M_attach (
_Safe_sequence_base ∗ __seq,
bool __constant) [protected]
Attaches this iterator to the given container, detaching it from whatever container it was attached to originally. If the new
container is the NULL pointer, the iterator is left unattached.
Referenced by _Safe_local_iterator_base(), _Safe_local_iterator_base(), and __gnu_debug::_Safe_local_iterator< _Iterator, _Sequence >
_M_attach_single()
void __gnu_debug::_Safe_local_iterator_base::_M_attach_single (
_Safe_sequence_base ∗ __seq,
bool __constant) throw ( ) [protected]
Likewise, but not thread-safe.
Referenced by __gnu_debug::_Safe_local_iterator< _Iterator, _Sequence >::_M_attach_single().
_M_attached_to()
bool __gnu_debug::_Safe_iterator_base::_M_attached_to (
const _Safe_sequence_base ∗ __seq) const [inline], [inherited]
Determines if we are attached to the given sequence.
References __gnu_debug::_Safe_iterator_base::_M_sequence.
_M_can_compare()
bool __gnu_debug::_Safe_iterator_base::_M_can_compare (
const _Safe_iterator_base & __x) const throw ( ) [inherited]
Can we compare this iterator to the given iterator __x? Returns true if both iterators are nonsingular and reference the
same sequence.
_M_detach()
_M_detach_single()
_M_get_mutex()
Generated by Doxygen
5.157 __gnu_debug::_Safe_local_iterator_base Class Reference 975
_M_invalidate()
_M_reset()
_M_singular()
_M_unlink()
_M_next
_M_prior
_M_sequence
Generated by Doxygen
976
_M_version
• safe_unordered_base.h
__gnu_debug::_Safe
_sequence_base
__gnu_debug::_Safe
_sequence< _Sequence >
__gnu_debug::_Safe
_node_sequence< _Sequence >
Public Attributes
• _Safe_iterator_base ∗ _M_const_iterators
Generated by Doxygen
5.158 __gnu_debug::_Safe_node_sequence< _Sequence > Class Template Reference 977
• _Safe_iterator_base ∗ _M_iterators
• unsigned int _M_version
• void _M_detach_all ()
• void _M_detach_singular ()
• __gnu_cxx::__mutex & _M_get_mutex () throw ()
• void _M_invalidate_all ()
• void _M_invalidate_all () const
• void _M_revalidate_singular ()
• void _M_swap (_Safe_sequence_base &__x) noexcept
template<typename _Sequence>
class __gnu_debug::_Safe_node_sequence< _Sequence >
Like _Safe_sequence but with a special _M_invalidate_all implementation not invalidating past-the-end iterators. Used
by node based sequence.
_M_detach_all()
_M_detach_singular()
Postcondition
_M_get_mutex()
_M_invalidate_all()
Generated by Doxygen
978
_M_invalidate_if()
_M_revalidate_singular()
_M_swap()
void __gnu_debug::_Safe_sequence_base::_M_swap (
_Safe_sequence_base & __x) [protected], [noexcept], [inherited]
Swap this sequence with the given sequence. This operation also swaps ownership of the iterators, so that when the
operation is complete all iterators that originally referenced one container now reference the other container.
_M_transfer_from_if()
_M_const_iterators
_M_iterators
_M_version
Generated by Doxygen
5.159 __gnu_debug::_Safe_sequence< _Sequence > Class Template Reference 979
The documentation for this class was generated from the following file:
• safe_sequence.h
__gnu_debug::_Safe
_sequence_base
__gnu_debug::_Safe
_sequence< _Sequence >
__gnu_debug::_Safe
_node_sequence< _Sequence >
Public Attributes
• _Safe_iterator_base ∗ _M_const_iterators
• _Safe_iterator_base ∗ _M_iterators
• unsigned int _M_version
• void _M_detach_all ()
• void _M_detach_singular ()
• __gnu_cxx::__mutex & _M_get_mutex () throw ()
• void _M_invalidate_all () const
• void _M_revalidate_singular ()
• void _M_swap (_Safe_sequence_base &__x) noexcept
Generated by Doxygen
980
template<typename _Sequence>
class __gnu_debug::_Safe_sequence< _Sequence >
Base class for constructing a safe sequence type that tracks iterators that reference it.
The class template _Safe_sequence simplifies the construction of safe sequences that track the iterators that reference
the sequence, so that the iterators are notified of changes in the sequence that may affect their operation, e.g., if the
container invalidates its iterators or is destructed. This class template may only be used by deriving from it and passing
the name of the derived class as its template parameter via the curiously recurring template pattern. The derived class
must have iterator and const_iterator types that are instantiations of class template _Safe_iterator for this
sequence. Iterators will then be tracked automatically.
_M_detach_all()
_M_detach_singular()
Postcondition
_M_get_mutex()
_M_invalidate_all()
_M_invalidate_if()
_M_revalidate_singular()
Generated by Doxygen
5.160 __gnu_debug::_Safe_sequence_base Class Reference 981
_M_swap()
void __gnu_debug::_Safe_sequence_base::_M_swap (
_Safe_sequence_base & __x) [protected], [noexcept], [inherited]
Swap this sequence with the given sequence. This operation also swaps ownership of the iterators, so that when the
operation is complete all iterators that originally referenced one container now reference the other container.
_M_transfer_from_if()
_M_const_iterators
_M_iterators
_M_version
• formatter.h
• safe_sequence.h
• safe_sequence.tcc
Generated by Doxygen
982
__gnu_debug::_Safe
__gnu_debug::_Safe _forward_list< _SafeSequence >
_sequence< _SafeSequence >
__gnu_debug::_Safe
_container< basic_string
__gnu_debug::_Safe < _CharT, std::char_traits
_sequence< basic_string < _CharT >, std::allocator
< _CharT, std::char_traits < _CharT > >, std::allocator
< _CharT >, std::allocator < _CharT >, _Safe_sequence, bool(1)>
< _CharT > > >
__gnu_debug::_Safe __gnu_debug::_Safe
_container< deque< _container< forward
_Tp, std::allocator< _list< _Tp, std::allocator
__gnu_debug::_Safe < _Tp > >, std::allocator
_Tp > >, std::allocator
_sequence< deque< _Tp, < _Tp >, __gnu_debug::_Safe
< _Tp >, __gnu_debug::_Safe
std::allocator< _Tp > > > _forward_list >
_sequence >
__gnu_debug::_Safe __gnu_debug::_Safe
__gnu_debug::_Safe _container< list< _Tp,
_forward_list< _SafeContainer >
_sequence< _SafeContainer > std::allocator< _Tp >
>, std::allocator< _Tp
__gnu_debug::_Safe >, __gnu_debug::_Safe_node
__gnu_debug::_Safe _node_sequence< list _sequence >
_sequence< list< _Tp, < _Tp, std::allocator
std::allocator< _Tp > > > < _Tp > > >
__gnu_debug::_Safe
_container< map< _Key,
std::__debug::map<
__gnu_debug::_Safe _Tp, _Compare, _Allocator
__gnu_debug::_Safe _Key, _Tp, _Cmp, _Allocator >
_node_sequence< map >, _Allocator, __gnu_debug
_sequence< map< _Key, ::_Safe_node_sequence >
< _Key, _Tp, _Compare,
_Tp, _Compare, _Allocator > >
_Allocator > >
__gnu_debug::_Safe
_sequence_base __gnu_debug::_Safe
__gnu_debug::_Safe __gnu_debug::_Safe _container< multimap
_sequence< multimap _node_sequence< multimap < _Key, _Tp, _Compare, std::__debug::multimap
< _Key, _Tp, _Compare, < _Key, _Tp, _Compare, _Allocator >, _Allocator, < _Key, _Tp, _Cmp, _Allocator >
_Allocator > > _Allocator > > __gnu_debug::_Safe_node
_sequence >
__gnu_debug::_Safe __gnu_debug::_Safe
_sequence< multiset _node_sequence< multiset __gnu_debug::_Safe
< _Key, _Compare, _Allocator > > < _Key, _Compare, _Allocator > > _container< multiset
std::__debug::multiset
< _Key, _Compare, _Allocator
< _Key, _Cmp, _Allocator >
>, _Allocator, __gnu_debug
__gnu_debug::_Safe __gnu_debug::_Safe ::_Safe_node_sequence >
_sequence< set< _Key, _node_sequence< set
_Compare, _Allocator > > < _Key, _Compare, _Allocator > >
__gnu_debug::_Safe
_container< set< _Key,
std::__debug::set<
__gnu_debug::_Safe _Compare, _Allocator
__gnu_debug::_Safe _Key, _Cmp, _Allocator >
_container< vector< >, _Allocator, __gnu_debug
_sequence< vector< ::_Safe_node_sequence >
_Tp, std::allocator
_Tp, std::allocator<
< _Tp > >, std::allocator
_Tp > > >
< _Tp >, __gnu_debug::_Safe
_sequence > std::__debug::vector
< _Tp, std::allocator
< _Tp > >
__gnu_debug::_Safe
_sequence< _Sequence > __gnu_debug::_Safe
_node_sequence< _Sequence >
__gnu_debug::_Safe
_container< unordered
_map< _Key, _Tp, std::
__gnu_debug::_Safe hash< _Key >, std::equal
_unordered_container _to< _Key >, std::allocator
< unordered_map< _Key, < std::pair< const _Key, _Tp
_Tp, std::hash< _Key > > >, std::allocator< std::
>, std::equal_to< _Key pair< const _Key, _Tp > >, __gnu
>, std::allocator< std _debug::_Safe_unordered_container >
::pair< const _Key, _Tp > > > >
__gnu_debug::_Safe
__gnu_debug::_Safe _container< unordered
_unordered_container _multimap< _Key, _Tp,
< unordered_multimap std::hash< _Key >, std
< _Key, _Tp, std::hash ::equal_to< _Key >, std
< _Key >, std::equal_to ::allocator< std::pair< const
< _Key >, std::allocator _Key, _Tp > > >, std::allocator
< std::pair< const _Key, < std::pair< const _Key, _Tp >
_Tp > > > > >, __gnu_debug::_Safe_unordered
__gnu_debug::_Safe _container >
_unordered_container_base
__gnu_debug::_Safe
_unordered_container __gnu_debug::_Safe
< unordered_multiset _container< unordered
< _Value, std::hash< _multiset< _Value, std
_Value >, std::equal_to ::hash< _Value >, std::
< _Value >, std::allocator equal_to< _Value >, std
< _Value > > > ::allocator< _Value > >,
std::allocator< _Value >,
__gnu_debug::_Safe_unordered
__gnu_debug::_Safe _container >
_unordered_container
< unordered_set< _Value,
std::hash< _Value >, std __gnu_debug::_Safe
::equal_to< _Value >, std _container< unordered
::allocator< _Value > > > _set< _Value, std::hash
< _Value >, std::equal_to
< _Value >, std::allocator
__gnu_debug::_Safe < _Value > >, std::allocator
_unordered_container < _Value >, __gnu_debug::_Safe
< _Container > _unordered_container >
Public Attributes
• _Safe_iterator_base ∗ _M_const_iterators
• _Safe_iterator_base ∗ _M_iterators
• unsigned int _M_version
Generated by Doxygen
5.160 __gnu_debug::_Safe_sequence_base Class Reference 983
• void _M_detach_singular ()
• __gnu_cxx::__mutex & _M_get_mutex () throw ()
• void _M_invalidate_all () const
• void _M_revalidate_singular ()
• void _M_swap (_Safe_sequence_base &__x) noexcept
Friends
• class _Safe_iterator_base
∼_Safe_sequence_base()
__gnu_debug::_Safe_sequence_base::∼_Safe_sequence_base () [inline], [constexpr], [protected]
Notify all iterators that reference this sequence that the sequence is being destroyed.
References _M_detach_all().
_M_detach_all()
_M_detach_singular()
Postcondition
_M_get_mutex()
_M_invalidate_all()
Generated by Doxygen
984
_M_revalidate_singular()
_M_swap()
void __gnu_debug::_Safe_sequence_base::_M_swap (
_Safe_sequence_base & __x) [protected], [noexcept]
Swap this sequence with the given sequence. This operation also swaps ownership of the iterators, so that when the
operation is complete all iterators that originally referenced one container now reference the other container.
_M_const_iterators
_M_iterators
_M_version
• safe_base.h
Generated by Doxygen
5.161 __gnu_debug::_Safe_unordered_container< _Container > Class Template Reference 985
__gnu_debug::_Safe
_sequence_base
__gnu_debug::_Safe
_unordered_container_base
__gnu_debug::_Safe
_unordered_container
< _Container >
• void _M_invalidate_all ()
• template<typename _Predicate >
void _M_invalidate_if (_Predicate __pred)
• template<typename _Predicate >
void _M_invalidate_local_if (_Predicate __pred)
Public Attributes
• _Safe_iterator_base ∗ _M_const_iterators
• _Safe_iterator_base ∗ _M_const_local_iterators
• _Safe_iterator_base ∗ _M_iterators
• _Safe_iterator_base ∗ _M_local_iterators
• unsigned int _M_version
• void _M_detach_all ()
• void _M_detach_singular ()
• __gnu_cxx::__mutex & _M_get_mutex () throw ()
• void _M_invalidate_all () const
• void _M_invalidate_locals ()
• void _M_revalidate_singular ()
• void _M_swap (_Safe_sequence_base &__x) noexcept
• void _M_swap (_Safe_unordered_container_base &__x) noexcept
Generated by Doxygen
986
template<typename _Container>
class __gnu_debug::_Safe_unordered_container< _Container >
Base class for constructing a safe unordered container type that tracks iterators that reference it.
The class template _Safe_unordered_container simplifies the construction of safe unordered containers that track the
iterators that reference the container, so that the iterators are notified of changes in the container that may affect their
operation, e.g., if the container invalidates its iterators or is destructed. This class template may only be used by deriving
from it and passing the name of the derived class as its template parameter via the curiously recurring template pattern.
The derived class must have iterator and const_iterator types that are instantiations of class template _←-
Safe_iterator for this container and local_iterator and const_local_iterator types that are instantiations
of class template _Safe_local_iterator for this container. Iterators will then be tracked automatically.
_M_detach_all()
_M_detach_singular()
Postcondition
_M_get_mutex()
_M_invalidate_all()
_M_invalidate_if()
Generated by Doxygen
5.161 __gnu_debug::_Safe_unordered_container< _Container > Class Template Reference 987
_M_invalidate_local_if()
_M_revalidate_singular()
_M_swap() [1/2]
void __gnu_debug::_Safe_sequence_base::_M_swap (
_Safe_sequence_base & __x) [protected], [noexcept], [inherited]
Swap this sequence with the given sequence. This operation also swaps ownership of the iterators, so that when the
operation is complete all iterators that originally referenced one container now reference the other container.
_M_swap() [2/2]
void __gnu_debug::_Safe_unordered_container_base::_M_swap (
_Safe_unordered_container_base & __x) [protected], [noexcept], [inherited]
Swap this container with the given container. This operation also swaps ownership of the iterators, so that when the
operation is complete all iterators that originally referenced one container now reference the other container.
_M_const_iterators
_M_const_local_iterators
_M_iterators
Generated by Doxygen
988
_M_local_iterators
_M_version
• safe_unordered_container.h
• safe_unordered_container.tcc
__gnu_debug::_Safe
_container< unordered
__gnu_debug::_Safe _map< _Key, _Tp, std::
_unordered_container hash< _Key >, std::equal
< unordered_map< _Key, _to< _Key >, std::allocator
_Tp, std::hash< _Key < std::pair< const _Key, _Tp
>, std::equal_to< _Key > > >, std::allocator< std::
>, std::allocator< std pair< const _Key, _Tp > >, __gnu
::pair< const _Key, _Tp > > > > _debug::_Safe_unordered_container >
__gnu_debug::_Safe
_container< unordered
__gnu_debug::_Safe
_multimap< _Key, _Tp,
_unordered_container
std::hash< _Key >, std
< unordered_multimap
::equal_to< _Key >, std
< _Key, _Tp, std::hash
::allocator< std::pair< const
< _Key >, std::equal_to
_Key, _Tp > > >, std::allocator
< _Key >, std::allocator
< std::pair< const _Key, _Tp >
< std::pair< const _Key,
>, __gnu_debug::_Safe_unordered
_Tp > > > >
_container >
__gnu_debug::_Safe
__gnu_debug::_Safe
_container< unordered
_unordered_container
_multiset< _Value, std
< unordered_multiset
__gnu_debug::_Safe __gnu_debug::_Safe ::hash< _Value >, std::
< _Value, std::hash<
_sequence_base _unordered_container_base equal_to< _Value >, std
_Value >, std::equal_to
::allocator< _Value > >,
< _Value >, std::allocator
std::allocator< _Value >,
< _Value > > >
__gnu_debug::_Safe_unordered
_container >
__gnu_debug::_Safe
_unordered_container
__gnu_debug::_Safe
< unordered_set< _Value,
_container< unordered
std::hash< _Value >, std
_set< _Value, std::hash
::equal_to< _Value >, std
< _Value >, std::equal_to
::allocator< _Value > > >
< _Value >, std::allocator
< _Value > >, std::allocator
< _Value >, __gnu_debug::_Safe
__gnu_debug::_Safe
_unordered_container >
_unordered_container
< _Container >
Public Attributes
• _Safe_iterator_base ∗ _M_const_iterators
• _Safe_iterator_base ∗ _M_const_local_iterators
• _Safe_iterator_base ∗ _M_iterators
• _Safe_iterator_base ∗ _M_local_iterators
• unsigned int _M_version
Generated by Doxygen
5.162 __gnu_debug::_Safe_unordered_container_base Class Reference 989
Friends
• class _Safe_local_iterator_base
Base class that supports tracking of local iterators that reference an unordered container.
The _Safe_unordered_container_base class provides basic support for tracking iterators into an unordered container.
Containers that track iterators must derived from _Safe_unordered_container_base publicly, so that safe iterators (which
inherit _Safe_iterator_base) can attach to them. This class contains four linked lists of iterators, one for constant itera-
tors, one for mutable iterators, one for constant local iterators, one for mutable local iterators and a version number that
allows very fast invalidation of all iterators that reference the container.
This class must ensure that no operation on it may throw an exception, otherwise safe containers may fail to provide the
exception-safety guarantees required by the C++ standard.
∼_Safe_unordered_container_base()
__gnu_debug::_Safe_unordered_container_base::∼_Safe_unordered_container_base () [inline], [protected],
[noexcept]
Notify all iterators that reference this container that the container is being destroyed.
_M_detach_all()
_M_detach_singular()
Postcondition
Generated by Doxygen
990
_M_get_mutex()
_M_invalidate_all()
_M_revalidate_singular()
_M_swap() [1/2]
void __gnu_debug::_Safe_sequence_base::_M_swap (
_Safe_sequence_base & __x) [protected], [noexcept], [inherited]
Swap this sequence with the given sequence. This operation also swaps ownership of the iterators, so that when the
operation is complete all iterators that originally referenced one container now reference the other container.
_M_swap() [2/2]
void __gnu_debug::_Safe_unordered_container_base::_M_swap (
_Safe_unordered_container_base & __x) [protected], [noexcept]
Swap this container with the given container. This operation also swaps ownership of the iterators, so that when the
operation is complete all iterators that originally referenced one container now reference the other container.
_M_const_iterators
_M_const_local_iterators
_Safe_iterator_base∗ __gnu_debug::_Safe_unordered_container_base::_M_const_local_iterators
The list of constant local iterators that reference this container.
_M_iterators
_M_local_iterators
_Safe_iterator_base∗ __gnu_debug::_Safe_unordered_container_base::_M_local_iterators
The list of mutable local iterators that reference this container.
Generated by Doxygen
5.163 __gnu_debug::_Safe_vector< _SafeSequence, _BaseSequence > Class Template Reference 991
_M_version
• safe_unordered_base.h
__gnu_debug::_Safe
_vector< _SafeSequence,
_BaseSequence >
std::__debug::vector
< _Tp, _Allocator >
std::__debug::vector
< _Tp, std::allocator
< _Tp > >
Protected Attributes
• size_type _M_guaranteed_capacity
Generated by Doxygen
992
• debug/vector
• multiway_merge.h
• multiway_merge.h
Generated by Doxygen
5.166 std::__detail::_Scanner< _CharT > Class Template Reference 993
Public Types
• _Scanner (const _CharT ∗__begin, const _CharT ∗__end, _FlagT __flags, std::locale __loc)
• void _M_advance ()
• _TokenT _M_get_token () const noexcept
• const _StringT & _M_get_value () const noexcept
Protected Types
Protected Attributes
• bool _M_at_bracket_start
• const std::pair< char, char > _M_awk_escape_tbl [11]
• const char ∗ _M_basic_spec_char
• const std::pair< char, char > _M_ecma_escape_tbl [8]
• const char ∗ _M_ecma_spec_char
• const std::pair< char, char > ∗ _M_escape_tbl
• const char ∗ _M_extended_spec_char
• _FlagT _M_flags
• const char ∗ _M_spec_char
• _StateT _M_state
• _TokenT _M_token
• const std::pair< char, _TokenT > _M_token_tbl [9]
Generated by Doxygen
994
template<typename _CharT>
class std::__detail::_Scanner< _CharT >
_TokenT
• regex_scanner.h
• regex_scanner.tcc
Public Types
template<typename _Sequence>
struct __gnu_debug::_Sequence_traits< _Sequence >
• safe_iterator.h
Generated by Doxygen
5.168 __gnu_parallel::_Settings Struct Reference 995
Public Attributes
• _SequenceIndex accumulate_minimal_n
• unsigned int adjacent_difference_minimal_n
• _AlgorithmStrategy algorithm_strategy
• unsigned int cache_line_size
• _SequenceIndex count_minimal_n
• _SequenceIndex fill_minimal_n
• _FindAlgorithm find_algorithm
• double find_increasing_factor
• _SequenceIndex find_initial_block_size
• _SequenceIndex find_maximum_block_size
• float find_scale_factor
• _SequenceIndex find_sequential_search_size
• _SequenceIndex for_each_minimal_n
• _SequenceIndex generate_minimal_n
• unsigned long long L1_cache_size
• unsigned long long L2_cache_size
• _SequenceIndex max_element_minimal_n
• _SequenceIndex merge_minimal_n
• unsigned int merge_oversampling
• _SplittingAlgorithm merge_splitting
• _SequenceIndex min_element_minimal_n
• _MultiwayMergeAlgorithm multiway_merge_algorithm
• int multiway_merge_minimal_k
• _SequenceIndex multiway_merge_minimal_n
• unsigned int multiway_merge_oversampling
• _SplittingAlgorithm multiway_merge_splitting
• _SequenceIndex nth_element_minimal_n
• _SequenceIndex partial_sort_minimal_n
• _PartialSumAlgorithm partial_sum_algorithm
• float partial_sum_dilation
• unsigned int partial_sum_minimal_n
• double partition_chunk_share
• _SequenceIndex partition_chunk_size
• _SequenceIndex partition_minimal_n
• _SequenceIndex qsb_steals
• unsigned int random_shuffle_minimal_n
• _SequenceIndex replace_minimal_n
• _SequenceIndex search_minimal_n
• _SequenceIndex set_difference_minimal_n
• _SequenceIndex set_intersection_minimal_n
• _SequenceIndex set_symmetric_difference_minimal_n
• _SequenceIndex set_union_minimal_n
• _SortAlgorithm sort_algorithm
• _SequenceIndex sort_minimal_n
• unsigned int sort_mwms_oversampling
• unsigned int sort_qs_num_samples_preset
• _SequenceIndex sort_qsb_base_case_maximal_n
• _SplittingAlgorithm sort_splitting
• unsigned int TLB_size
• _SequenceIndex transform_minimal_n
• _SequenceIndex unique_copy_minimal_n
• _SequenceIndex workstealing_chunk_size
Generated by Doxygen
996
class _Settings Run-time settings for the parallel mode including all tunable parameters.
get()
set()
accumulate_minimal_n
_SequenceIndex __gnu_parallel::_Settings::accumulate_minimal_n
Minimal input size for accumulate.
adjacent_difference_minimal_n
cache_line_size
count_minimal_n
_SequenceIndex __gnu_parallel::_Settings::count_minimal_n
Minimal input size for count and count_if.
fill_minimal_n
_SequenceIndex __gnu_parallel::_Settings::fill_minimal_n
Minimal input size for fill.
find_increasing_factor
double __gnu_parallel::_Settings::find_increasing_factor
Block size increase factor for find.
Generated by Doxygen
5.168 __gnu_parallel::_Settings Struct Reference 997
find_initial_block_size
_SequenceIndex __gnu_parallel::_Settings::find_initial_block_size
Initial block size for find.
Referenced by __gnu_parallel::__find_template().
find_maximum_block_size
_SequenceIndex __gnu_parallel::_Settings::find_maximum_block_size
Maximal block size for find.
find_scale_factor
float __gnu_parallel::_Settings::find_scale_factor
Block size scale-down factor with respect to current position.
Referenced by __gnu_parallel::__find_template().
find_sequential_search_size
_SequenceIndex __gnu_parallel::_Settings::find_sequential_search_size
Start with looking for this many elements sequentially, for find.
Referenced by __gnu_parallel::__find_template(), and __gnu_parallel::__find_template().
for_each_minimal_n
_SequenceIndex __gnu_parallel::_Settings::for_each_minimal_n
Minimal input size for for_each.
generate_minimal_n
_SequenceIndex __gnu_parallel::_Settings::generate_minimal_n
Minimal input size for generate.
L1_cache_size
L2_cache_size
max_element_minimal_n
_SequenceIndex __gnu_parallel::_Settings::max_element_minimal_n
Minimal input size for max_element.
merge_minimal_n
_SequenceIndex __gnu_parallel::_Settings::merge_minimal_n
Minimal input size for merge.
Generated by Doxygen
998
merge_oversampling
min_element_minimal_n
_SequenceIndex __gnu_parallel::_Settings::min_element_minimal_n
Minimal input size for min_element.
multiway_merge_minimal_k
int __gnu_parallel::_Settings::multiway_merge_minimal_k
Oversampling factor for multiway_merge.
multiway_merge_minimal_n
_SequenceIndex __gnu_parallel::_Settings::multiway_merge_minimal_n
Minimal input size for multiway_merge.
multiway_merge_oversampling
nth_element_minimal_n
_SequenceIndex __gnu_parallel::_Settings::nth_element_minimal_n
Minimal input size for nth_element.
Referenced by __gnu_parallel::__parallel_nth_element().
partial_sort_minimal_n
_SequenceIndex __gnu_parallel::_Settings::partial_sort_minimal_n
Minimal input size for partial_sort.
partial_sum_dilation
float __gnu_parallel::_Settings::partial_sum_dilation
Ratio for partial_sum. Assume "sum and write result" to be this factor slower than just "sum".
Referenced by __gnu_parallel::__parallel_partial_sum_linear().
partial_sum_minimal_n
partition_chunk_share
double __gnu_parallel::_Settings::partition_chunk_share
Chunk size for partition, relative to input size. If > 0.0, this value overrides partition_chunk_size.
Referenced by __gnu_parallel::__parallel_partition().
Generated by Doxygen
5.168 __gnu_parallel::_Settings Struct Reference 999
partition_chunk_size
_SequenceIndex __gnu_parallel::_Settings::partition_chunk_size
Chunk size for partition.
Referenced by __gnu_parallel::__parallel_partition().
partition_minimal_n
_SequenceIndex __gnu_parallel::_Settings::partition_minimal_n
Minimal input size for partition.
Referenced by __gnu_parallel::__parallel_nth_element().
qsb_steals
_SequenceIndex __gnu_parallel::_Settings::qsb_steals
The number of stolen ranges in load-balanced quicksort.
random_shuffle_minimal_n
replace_minimal_n
_SequenceIndex __gnu_parallel::_Settings::replace_minimal_n
Minimal input size for replace and replace_if.
search_minimal_n
_SequenceIndex __gnu_parallel::_Settings::search_minimal_n
Minimal input size for search and search_n.
set_difference_minimal_n
_SequenceIndex __gnu_parallel::_Settings::set_difference_minimal_n
Minimal input size for set_difference.
set_intersection_minimal_n
_SequenceIndex __gnu_parallel::_Settings::set_intersection_minimal_n
Minimal input size for set_intersection.
set_symmetric_difference_minimal_n
_SequenceIndex __gnu_parallel::_Settings::set_symmetric_difference_minimal_n
Minimal input size for set_symmetric_difference.
set_union_minimal_n
_SequenceIndex __gnu_parallel::_Settings::set_union_minimal_n
Minimal input size for set_union.
sort_minimal_n
_SequenceIndex __gnu_parallel::_Settings::sort_minimal_n
Minimal input size for parallel sorting.
Generated by Doxygen
1000
sort_mwms_oversampling
sort_qs_num_samples_preset
sort_qsb_base_case_maximal_n
_SequenceIndex __gnu_parallel::_Settings::sort_qsb_base_case_maximal_n
Maximal subsequence __length to switch to unbalanced __base case. Applies to std::sort with dynamically load-
balanced quicksort.
Referenced by __gnu_parallel::__qsb_local_sort_with_helping().
TLB_size
transform_minimal_n
_SequenceIndex __gnu_parallel::_Settings::transform_minimal_n
Minimal input size for parallel std::transform.
unique_copy_minimal_n
_SequenceIndex __gnu_parallel::_Settings::unique_copy_minimal_n
Minimal input size for unique_copy.
The documentation for this struct was generated from the following file:
• settings.h
Generated by Doxygen
5.170 std::_Sp_ebo_helper< _Nm, _Tp, true > Struct Template Reference 1001
• shared_ptr_base.h
• shared_ptr_base.h
Split consistently.
The documentation for this struct was generated from the following file:
• multiway_mergesort.h
• void operator() (const _ThreadIndex __iam, _PMWMSSortingData< _RAIter > ∗__sd, _Compare &__comp,
const typename std::iterator_traits< _RAIter >::difference_type __num_samples) const
Split by sampling.
The documentation for this struct was generated from the following file:
Generated by Doxygen
1002
• multiway_mergesort.h
• void operator() (const _ThreadIndex __iam, _PMWMSSortingData< _RAIter > ∗__sd, _Compare &__comp,
const typename std::iterator_traits< _RAIter >::difference_type __num_samples) const
• multiway_mergesort.h
Public Types
Public Attributes
• _StateIdT _M_end
• _RegexT & _M_nfa
• _StateIdT _M_start
template<typename _TraitsT>
class std::__detail::_StateSeq< _TraitsT >
Describes a sequence of one or more _State, its current start and end(s). This structure contains fragments of an NFA
during construction.
The documentation for this class was generated from the following files:
• regex_automaton.h
• regex_automaton.tcc
Generated by Doxygen
5.175 __gnu_cxx::_Std_pointer_impl< _Tp > Class Template Reference 1003
Public Types
template<typename _Tp>
class __gnu_cxx::_Std_pointer_impl< _Tp >
A storage policy for use with _Pointer_adapter<> which yields a standard pointer.
A _Storage_policy is required to provide 4 things: 1) A get() API for returning the stored pointer value. 2) An set() API
for storing a pointer value. 3) An element_type typedef to define the type this points to. 4) An operator<() to support
pointer comparison. 5) An operator==() to support pointer comparison.
The documentation for this class was generated from the following file:
• pointer.h
std::_Temporary_buffer
< _ForwardIterator, _Tp >
__gnu_cxx::temporary
_buffer< _ForwardIterator,
_Tp >
Public Types
Generated by Doxygen
1004
Protected Attributes
This class is used in two places: stl_algo.h and ext/memory, where it is wrapped as the temporary_buffer class. See
temporary_buffer docs for more notes.
_Temporary_buffer()
begin()
end()
requested_size()
Generated by Doxygen
5.177 __gnu_cxx::_Unqualified_type< _Tp > Struct Template Reference 1005
size()
• stl_tempbuf.h
Public Types
template<typename _Tp>
struct __gnu_cxx::_Unqualified_type< _Tp >
This structure accommodates the way in which std::iterator_traits<> is normally specialized for const T∗, so that value←-
_type is still T.
The documentation for this struct was generated from the following file:
• pointer.h
Generated by Doxygen
1006
std::vector< Catalog
_info * >
std::vector< time_zone
_link >
std::vector< __diff
_type >
std::vector< result
_type >
Public Types
Generated by Doxygen
5.179 std::add_const< _Tp > Struct Template Reference 1007
Public Attributes
• _Vector_impl _M_impl
• stl_vector.h
Public Types
• using type
template<typename _Tp>
struct std::add_const< _Tp >
add_const
The documentation for this struct was generated from the following file:
• type_traits
Public Types
• using type
Generated by Doxygen
1008
template<typename _Tp>
struct std::add_cv< _Tp >
add_cv
The documentation for this struct was generated from the following file:
• type_traits
Public Types
• using type
template<typename _Tp>
struct std::add_lvalue_reference< _Tp >
add_lvalue_reference
The documentation for this struct was generated from the following file:
• type_traits
Public Types
• using type
template<typename _Tp>
struct std::add_pointer< _Tp >
add_pointer
The documentation for this struct was generated from the following file:
• type_traits
Public Types
• using type
Generated by Doxygen
5.184 std::add_volatile< _Tp > Struct Template Reference 1009
template<typename _Tp>
struct std::add_rvalue_reference< _Tp >
add_rvalue_reference
The documentation for this struct was generated from the following file:
• type_traits
Public Types
• using type
template<typename _Tp>
struct std::add_volatile< _Tp >
add_volatile
The documentation for this struct was generated from the following file:
• type_traits
Assume the calling thread has already obtained mutex ownership and manage it.
The documentation for this struct was generated from the following file:
• std_mutex.h
Aligned storage.
The member typedef type is be a POD type suitable for use as uninitialized storage for any object whose size is at
most _Len and whose alignment is a divisor of _Align.
It is important to use the nested type as uninitialized storage, not the std::aligned_storage type itself which
is an empty class with 1-byte alignment. So this is correct:
typename std::aligned_storage<sizeof(X), alignof(X)>::type m_xobj;
This is wrong:
std::aligned_storage<sizeof(X), alignof(X)> m_xobj;
In C++14 and later std::aligned_storage_t<sizeof(X), alignof(X)> can be used to refer to the
type member typedef.
Generated by Doxygen
1010
The default value of _Align is supposed to be the most stringent fundamental alignment requirement for any C++ object
type whose size is no greater than _Len (see [basic.align] in the C++ standard).
Deprecated Deprecated in C++23. Uses can be replaced by an array std::byte[_Len] declared with
alignas(_Align).
The documentation for this struct was generated from the following file:
• type_traits
Public Types
• using type
See also
aligned_storage
The documentation for this struct was generated from the following file:
• type_traits
Generated by Doxygen
5.189 std::allocator< typename > Class Template Reference 1011
std::integral_constant
< std::size_t, alignof(_Tp)>
std::alignment_of<
_Tp >
Public Types
• using type
• using value_type
template<typename _Tp>
struct std::alignment_of< _Tp >
alignment_of
The documentation for this struct was generated from the following file:
• type_traits
Generated by Doxygen
1012
Public Types
Friends
• constexpr bool operator== (const allocator &, const allocator &) noexcept
Related Symbols
template<typename>
class std::allocator< typename >
Generated by Doxygen
5.190 std::allocator< void > Class Reference 1013
Template Parameters
The documentation for this class was generated from the following files:
• allocator.h
• memoryfwd.h
Public Types
std::allocator<void> specialization.
The documentation for this class was generated from the following file:
• allocator.h
Public Types
Generated by Doxygen
1014
template<typename>
struct std::allocator_traits< typename >
Since
C++11
allocator_type
template<typename >
_Alloc std::allocator_traits< typename >::allocator_type
The allocator type.
const_pointer
template<typename >
using std::allocator_traits< typename >::const_pointer
The allocator's const pointer type.
Alloc::const_pointer if that type exists, otherwise pointer_traits<pointer>::rebind<const
value_type>
const_void_pointer
template<typename >
using std::allocator_traits< typename >::const_void_pointer
The allocator's const void pointer type.
Alloc::const_void_pointer if that type exists, otherwise pointer_traits<pointer>::rebind<const
void>
difference_type
template<typename >
using std::allocator_traits< typename >::difference_type
The allocator's difference type.
Alloc::difference_type if that type exists, otherwise pointer_traits<pointer>::difference←-
_type
Generated by Doxygen
5.191 std::allocator_traits< typename > Struct Template Reference 1015
is_always_equal
template<typename >
using std::allocator_traits< typename >::is_always_equal
Whether all instances of the allocator type compare equal.
Alloc::is_always_equal if that type exists, otherwise is_empty<Alloc>::type
pointer
template<typename >
using std::allocator_traits< typename >::pointer
The allocator's pointer type.
Alloc::pointer if that type exists, otherwise value_type∗
propagate_on_container_copy_assignment
template<typename >
using std::allocator_traits< typename >::propagate_on_container_copy_assignment
How the allocator is propagated on copy assignment.
Alloc::propagate_on_container_copy_assignment if that type exists, otherwise false_type
propagate_on_container_move_assignment
template<typename >
using std::allocator_traits< typename >::propagate_on_container_move_assignment
How the allocator is propagated on move assignment.
Alloc::propagate_on_container_move_assignment if that type exists, otherwise false_type
propagate_on_container_swap
template<typename >
using std::allocator_traits< typename >::propagate_on_container_swap
How the allocator is propagated on swap.
Alloc::propagate_on_container_swap if that type exists, otherwise false_type
size_type
template<typename >
using std::allocator_traits< typename >::size_type
The allocator's size type.
Alloc::size_type if that type exists, otherwise make_unsigned<difference_type>::type
value_type
template<typename >
_Alloc::value_type std::allocator_traits< typename >::value_type
The allocated type.
void_pointer
template<typename >
using std::allocator_traits< typename >::void_pointer
The allocator's void pointer type.
Alloc::void_pointer if that type exists, otherwise pointer_traits<pointer>::rebind<void>
Generated by Doxygen
1016
allocate() [1/2]
template<typename >
static constexpr pointer std::allocator_traits< typename >::allocate (
_Alloc & __a,
size_type __n) [inline], [static], [nodiscard], [constexpr]
Allocate memory.
Parameters
_←- An allocator.
_a
_←- The number of objects to allocate space for.
_n
Calls a.allocate(n)
allocate() [2/2]
template<typename >
static constexpr pointer std::allocator_traits< typename >::allocate (
_Alloc & __a,
size_type __n,
const_void_pointer __hint) [inline], [static], [nodiscard], [constexpr]
Allocate memory.
Parameters
__a An allocator.
__n The number of objects to allocate space for.
__hint Aid to locality.
Returns
construct()
template<typename >
template<typename _Tp , typename... _Args>
requires __can_construct<_Alloc, _Tp, _Args...>
static constexpr void std::allocator_traits< typename >::construct (
_Alloc & __a,
_Tp ∗ __p,
_Args &&... __args) [inline], [static], [constexpr], [noexcept]
Construct an object of type _Tp
Parameters
__a An allocator.
__p Pointer to memory of suitable size and alignment for Tp
Generated by Doxygen
5.191 std::allocator_traits< typename > Struct Template Reference 1017
deallocate()
template<typename >
static constexpr void std::allocator_traits< typename >::deallocate (
_Alloc & __a,
pointer __p,
size_type __n) [inline], [static], [constexpr]
Deallocate memory.
Parameters
_←- An allocator.
_a
_←- Pointer to the memory to deallocate.
_p
_←- The number of objects space was allocated for.
_n
Calls a.deallocate(p, n)
destroy()
template<typename >
template<typename _Tp >
static constexpr void std::allocator_traits< typename >::destroy (
_Alloc & __a,
_Tp ∗ __p) [inline], [static], [constexpr], [noexcept]
Destroy an object of type _Tp.
Parameters
_←- An allocator.
_a
_←- Pointer to the object to destroy
_p
max_size()
template<typename >
static constexpr size_type std::allocator_traits< typename >::max_size (
const _Alloc & __a) [inline], [static], [constexpr], [noexcept]
The maximum supported allocation size.
Generated by Doxygen
1018
Parameters
_←- An allocator.
_a
Returns
__a.max_size() or numeric_limits<size_type>::max()
Returns __a.max_size() if that expression is well-formed, otherwise returns numeric_limits<size_←-
type>::max()
select_on_container_copy_construction()
template<typename >
static constexpr _Alloc std::allocator_traits< typename >::select_on_container_copy_construction
(
const _Alloc & __rhs) [inline], [static], [constexpr]
Obtain an allocator to use when copying a container.
Parameters
__rhs An allocator.
Returns
__rhs.select_on_container_copy_construction() or __rhs
Returns __rhs.select_on_container_copy_construction() if that expression is well-formed, otherwise
returns __rhs
The documentation for this struct was generated from the following files:
• bits/alloc_traits.h
• memory_resource.h
• memoryfwd.h
Public Types
• using allocator_type
• using const_pointer
• using const_void_pointer
• using difference_type
• using is_always_equal
• using pointer
• using propagate_on_container_copy_assignment
• using propagate_on_container_move_assignment
• using propagate_on_container_swap
• template<typename _Up >
using rebind_alloc
• template<typename _Up >
using rebind_traits
• using size_type
• using value_type
• using void_pointer
Generated by Doxygen
5.192 std::allocator_traits< allocator< _Tp > > Struct Template Reference 1019
template<typename _Tp>
struct std::allocator_traits< allocator< _Tp > >
C++11
See also
std::allocator_traits
allocator_type
const_pointer
const_void_pointer
difference_type
is_always_equal
Generated by Doxygen
1020
pointer
propagate_on_container_copy_assignment
propagate_on_container_move_assignment
propagate_on_container_swap
size_type
value_type
void_pointer
allocate() [1/2]
Parameters
_←- An allocator.
_a
Generated by Doxygen
5.192 std::allocator_traits< allocator< _Tp > > Struct Template Reference 1021
Parameters
Calls a.allocate(n)
allocate() [2/2]
Parameters
__a An allocator.
__n The number of objects to allocate space for.
__hint Aid to locality.
Returns
construct()
Parameters
__a An allocator.
__p Pointer to memory of suitable size and alignment for an object of type _Up.
__args Constructor arguments.
deallocate()
Generated by Doxygen
1022
pointer __p,
size_type __n) [inline], [static], [constexpr]
Deallocate memory.
Generated by Doxygen
5.192 std::allocator_traits< allocator< _Tp > > Struct Template Reference 1023
Parameters
_←- An allocator.
_a
_←- Pointer to the memory to deallocate.
_p
_←- The number of objects space was allocated for.
_n
Calls a.deallocate(p, n)
destroy()
Parameters
_←- An allocator.
_a
_←- Pointer to the object to destroy
_p
Calls __a.destroy(__p).
max_size()
Parameters
_←- An allocator.
_a
Returns
__a.max_size()
select_on_container_copy_construction()
Generated by Doxygen
1024
Parameters
__rhs An allocator.
Returns
__rhs
The documentation for this struct was generated from the following file:
• bits/alloc_traits.h
Public Types
• using allocator_type
• using const_pointer
• using const_void_pointer
• using difference_type
• using is_always_equal
• using pointer
• using propagate_on_container_copy_assignment
• using propagate_on_container_move_assignment
• using propagate_on_container_swap
• template<typename _Up >
using rebind_alloc
• template<typename _Up >
using rebind_traits
• using size_type
• using value_type
• using void_pointer
Since
C++11
Generated by Doxygen
5.193 std::allocator_traits< allocator< void > > Struct Reference 1025
See also
std::allocator_traits
allocator_type
const_pointer
const_void_pointer
difference_type
is_always_equal
pointer
propagate_on_container_copy_assignment
propagate_on_container_move_assignment
propagate_on_container_swap
size_type
Generated by Doxygen
1026
value_type
void_pointer
allocate()
construct()
Parameters
__a An allocator.
__p Pointer to memory of suitable size and alignment for an object of type _Up.
__args Constructor arguments.
deallocate()
destroy()
Generated by Doxygen
5.194 std::allocator_traits< pmr::polymorphic_allocator< _Tp > > Struct Template Reference 1027
Parameters
_←- An allocator.
_a
_←- Pointer to the object to destroy
_p
max_size()
select_on_container_copy_construction()
Parameters
__rhs An allocator.
Returns
__rhs
The documentation for this struct was generated from the following file:
• bits/alloc_traits.h
Public Types
• using allocator_type
• using const_pointer
• using const_void_pointer
• using difference_type
• using is_always_equal
• using pointer
• template<typename _Up >
using rebind_alloc
• template<typename _Up >
using rebind_traits
• using size_type
• using value_type
• using void_pointer
Generated by Doxygen
1028
• using propagate_on_container_copy_assignment
• using propagate_on_container_move_assignment
• using propagate_on_container_swap
• static allocator_type select_on_container_copy_construction (const allocator_type &) noexcept
template<typename _Tp>
struct std::allocator_traits< pmr::polymorphic_allocator< _Tp > >
C++17
allocator_type
const_pointer
const_void_pointer
difference_type
is_always_equal
Generated by Doxygen
5.194 std::allocator_traits< pmr::polymorphic_allocator< _Tp > > Struct Template Reference 1029
pointer
propagate_on_container_copy_assignment
propagate_on_container_move_assignment
propagate_on_container_swap
size_type
value_type
void_pointer
allocate() [1/2]
Generated by Doxygen
1030
Parameters
_←- An allocator.
_a
_←- The number of objects to allocate space for.
_n
Calls a.allocate(n).
allocate() [2/2]
Parameters
_←- An allocator.
_a
_←- The number of objects to allocate space for.
_n
Returns
construct()
Parameters
__a An allocator.
__p Pointer to memory of suitable size and alignment for an object of type _Up.
__args Constructor arguments.
Generated by Doxygen
5.194 std::allocator_traits< pmr::polymorphic_allocator< _Tp > > Struct Template Reference 1031
deallocate()
Parameters
_←- An allocator.
_a
_←- Pointer to the memory to deallocate.
_p
_←- The number of objects space was allocated for.
_n
destroy()
Parameters
_←- An allocator.
_a
_←- Pointer to the object to destroy
_p
Calls p->_Up().
max_size()
numeric_limits<size_t>::max() / sizeof(value_type)
select_on_container_copy_construction()
Generated by Doxygen
1032
• memory_resource.h
• throw_allocator.h
• throw_allocator.h
__gnu_cxx::throw_allocator __gnu_cxx::throw_allocator
_base< _Tp, limit_condition > _limit< _Tp >
__gnu_cxx::throw_allocator __gnu_cxx::throw_allocator
__gnu_cxx::annotate_base
_base< _Tp, random_condition > _random< _Tp >
__gnu_cxx::throw_allocator
_base< _Tp, _Cond >
Generated by Doxygen
5.198 std::experimental::fundamentals_v1::any Class Reference 1033
Friends
Base class for checking address and label information about allocations. Create a std::map between the allocated
address (void∗) and a datum for annotations, which are a pair of numbers corresponding to label and allocated size.
The documentation for this struct was generated from the following file:
• throw_allocator.h
• any () noexcept
• template<typename _ValueType , typename _Tp = _Decay<_ValueType>, typename _Mgr = _Manager<_Tp>, typename enable_if<
is_constructible< _Tp, _ValueType && >::value, bool >::type = true>
any (_ValueType &&__value)
• template<typename _ValueType , typename _Tp = _Decay<_ValueType>, typename _Mgr = _Manager<_Tp>, typename
enable_if<!is_constructible< _Tp, _ValueType && >::value, bool >::type = false>
any (_ValueType &&__value)
• any (any &&__other) noexcept
• any (const any &__other)
• ∼any ()
• void clear () noexcept
• bool empty () const noexcept
• template<typename _ValueType >
enable_if_t<!is_same< any, decay_t< _ValueType > >::value, any & > operator= (_ValueType &&__rhs)
• any & operator= (any &&__rhs) noexcept
• any & operator= (const any &__rhs)
• void swap (any &__rhs) noexcept
• const type_info & type () const noexcept
Friends
Generated by Doxygen
1034
any() [1/5]
any() [2/5]
std::experimental::fundamentals_v1::any::any (
const any & __other) [inline]
Copy constructor, copies the state of __other.
any() [3/5]
std::experimental::fundamentals_v1::any::any (
any && __other) [inline], [noexcept]
Move constructor, transfer the state from __other.
Postcondition
any() [4/5]
any() [5/5]
∼any()
std::experimental::fundamentals_v1::any::∼any () [inline]
Destructor, calls clear()
clear()
Generated by Doxygen
5.199 std::array< _Tp, _Nm > Struct Template Reference 1035
empty()
operator=() [1/3]
operator=() [2/3]
Postcondition
operator=() [3/3]
swap()
void std::experimental::fundamentals_v1::any::swap (
any & __rhs) [inline], [noexcept]
Exchange state with another object.
type()
• experimental/any
Public Types
Generated by Doxygen
1036
Public Attributes
Template Parameters
The documentation for this struct was generated from the following file:
• array
Generated by Doxygen
5.200 __gnu_pbds::associative_tag Struct Reference 1037
__gnu_pbds::ov_tree_tag
__gnu_pbds::rb_tree_tag
__gnu_pbds::tree_tag
__gnu_pbds::splay_tree_tag
__gnu_pbds::basic_branch_tag __gnu_pbds::trie_tag
__gnu_pbds::pat_trie_tag
__gnu_pbds::list_update_tag __gnu_pbds::gp_hash_tag
Basic associative-container.
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
Public Types
• using value_type
Generated by Doxygen
1038
template<typename _Tp>
struct std::atomic< _Tp >
Template Parameters
The documentation for this struct was generated from the following files:
• atomic
• atomic_base.h
• shared_ptr_atomic.h
Public Types
Generated by Doxygen
5.203 std::atomic< bool > Struct Reference 1039
Public Attributes
• __base_type _M_b
template<typename _Tp>
struct std::atomic< _Tp ∗ >
• atomic
Public Types
• using value_type
Generated by Doxygen
1040
atomic<bool>
The documentation for this struct was generated from the following file:
• atomic
Public Types
Generated by Doxygen
5.205 std::atomic< char16_t > Struct Reference 1041
• atomic
Public Types
• atomic
Public Types
• atomic
Generated by Doxygen
1042
Public Types
Public Types
Public Types
Generated by Doxygen
5.210 std::atomic< short > Struct Reference 1043
• atomic
Public Types
• atomic
Public Types
• atomic
Generated by Doxygen
1044
Public Types
Public Types
Public Types
Generated by Doxygen
5.215 std::atomic< unsigned long long > Struct Reference 1045
• atomic
Public Types
• atomic
Public Types
• atomic
Generated by Doxygen
1046
Public Types
• atomic
atomic_flag
The documentation for this struct was generated from the following file:
• atomic_base.h
Public Types
Generated by Doxygen
5.219 std::auto_ptr< _Tp > Class Template Reference 1047
template<typename _Tp>
class std::auto_ptr< _Tp >
Deprecated Deprecated in C++11, no longer in the standard since C++17. Use unique_ptr instead.
element_type
Generated by Doxygen
1048
auto_ptr() [1/4]
Parameters
auto_ptr() [2/4]
Parameters
This object now owns the object previously owned by __a, which has given up ownership.
auto_ptr() [3/4]
Parameters
∼auto_ptr()
template<typename _Tp >
std::auto_ptr< _Tp >::∼auto_ptr () [inline]
When the auto_ptr goes out of scope, the object it owns is deleted. If it no longer owns anything (i.e., get() is NULL),
then this has no effect.
The C++ standard says there is supposed to be an empty throw specification here, but omitting it is standard conforming.
Its presence can be detected only if _Tp::∼_Tp() throws, but this is prohibited. [17.4.3.6]/2
Generated by Doxygen
5.219 std::auto_ptr< _Tp > Class Template Reference 1049
auto_ptr() [4/4]
get()
You can get a copy of the pointer that this object owns, for situations such as passing to a function which only accepts a
raw pointer.
Note
operator∗()
operator->()
operator=() [1/2]
Parameters
Generated by Doxygen
1050
This object now owns the object previously owned by __a, which has given up ownership. The object that this one used
to own and track has been deleted.
References std::auto_ptr< _Tp >::reset().
operator=() [2/2]
Parameters
release()
You can get a copy of the pointer that this object owns, for situations such as passing to a function which only accepts a
raw pointer.
Note
This auto_ptr no longer owns the memory. When this object goes out of scope, nothing will happen.
reset()
Parameters
This object now owns the object pointed to by __p. The previous object has been deleted.
Referenced by std::auto_ptr< _Tp >::operator=(), and std::auto_ptr< _Tp >::operator=().
The documentation for this class was generated from the following files:
Generated by Doxygen
5.220 std::auto_ptr_ref< _Tp1 > Struct Template Reference 1051
• shared_ptr_base.h
• unique_ptr.h
• auto_ptr.h
Public Attributes
• _Tp1 ∗ _M_ptr
template<typename _Tp1>
struct std::auto_ptr_ref< _Tp1 >
A wrapper class to provide auto_ptr with reference semantics. For example, an auto_ptr can be assigned (or constructed
from) the result of a function which returns an auto_ptr by value.
All the auto_ptr_ref stuff should happen behind the scenes.
The documentation for this struct was generated from the following file:
• auto_ptr.h
std::iterator< output
_iterator_tag, void,
void, void, void >
std::back_insert_iterator
< _Container >
Public Types
Generated by Doxygen
1052
Protected Attributes
• _Container ∗ container
template<typename _Container>
class std::back_insert_iterator< _Container >
container_type
iterator_category
pointer
reference
value_type
Generated by Doxygen
5.222 std::bad_alloc Class Reference 1053
back_insert_iterator()
operator∗()
operator++() [1/2]
operator++() [2/2]
operator=()
Parameters
Returns
This kind of iterator doesn't really have a position in the container (you can think of the position as being permanently at
the end, if you like). Assigning a value to the iterator will always append the value to the end of the container.
The documentation for this class was generated from the following file:
• bits/stl_iterator.h
Generated by Doxygen
1054
std::exception
std::bad_alloc
what()
• new
Generated by Doxygen
5.224 std::bad_cast Class Reference 1055
std::exception
std::bad_cast
std::experimental::
fundamentals_v1::bad
_any_cast
what()
• experimental/any
Generated by Doxygen
1056
std::exception
std::bad_cast
std::experimental::
fundamentals_v1::bad
_any_cast
what()
• typeinfo
Generated by Doxygen
5.226 std::bad_function_call Class Reference 1057
std::exception
std::bad_exception
If an exception is thrown which is not listed in a function's exception specification, one of these may be thrown.
what()
std::exception
std::bad_function_call
Generated by Doxygen
1058
Exception class thrown when class template function's operator() is called with an empty target.
what()
• std_function.h
std::exception
std::logic_error
std::experimental::
fundamentals_v1::bad
_optional_access
Generated by Doxygen
5.228 std::bad_typeid Class Reference 1059
what()
• experimental/optional
std::exception
std::bad_typeid
what()
• typeinfo
Generated by Doxygen
1060
std::exception
std::bad_weak_ptr
what()
• shared_ptr_base.h
Generated by Doxygen
5.230 __gnu_parallel::balanced_quicksort_tag Struct Reference 1061
__gnu_parallel::parallel_tag
__gnu_parallel::balanced
_quicksort_tag
__get_num_threads()
set_num_threads()
void __gnu_parallel::parallel_tag::set_num_threads (
_ThreadIndex __num_threads) [inline], [inherited]
Set the desired number of threads.
Parameters
The documentation for this struct was generated from the following file:
• tags.h
Generated by Doxygen
1062
__gnu_parallel::parallel_tag
__gnu_parallel::balanced_tag
• _ThreadIndex __get_num_threads ()
• void set_num_threads (_ThreadIndex __num_threads)
__get_num_threads()
set_num_threads()
void __gnu_parallel::parallel_tag::set_num_threads (
_ThreadIndex __num_threads) [inline], [inherited]
Set the desired number of threads.
Parameters
The documentation for this struct was generated from the following file:
• tags.h
Generated by Doxygen
5.232 std::tr2::bases< _Tp > Struct Template Reference 1063
Public Types
template<typename _Tp>
struct std::tr2::bases< _Tp >
• tr2/type_traits
__gnu_pbds::tree< Key,
Mapped, Cmp_Fn, Tag,
Node_Update, _Alloc >
__gnu_pbds::basic_branch
< Key, Mapped, Tag, Node
_Update, Policy_Tl, _Alloc >
__gnu_pbds::trie< Key,
Mapped, _ATraits, Tag,
Node_Update, _Alloc >
Public Types
Generated by Doxygen
1064
template<typename Key, typename Mapped, typename Tag, typename Node_Update, typename Policy_Tl, type-
name _Alloc>
class __gnu_pbds::basic_branch< Key, Mapped, Tag, Node_Update, Policy_Tl, _Alloc >
Template Parameters
Base is dispatched at compile time via Tag, from the following choices: tree_tag, trie_tag, and their descendants.
Base choices are: detail::ov_tree_map, detail::rb_tree_map, detail::splay_tree_map, and detail::pat_trie_map.
The documentation for this class was generated from the following file:
• assoc_container.hpp
__gnu_pbds::ov_tree_tag
__gnu_pbds::rb_tree_tag
__gnu_pbds::tree_tag
__gnu_pbds::trie_tag
__gnu_pbds::pat_trie_tag
• tag_and_trait.hpp
Generated by Doxygen
5.235 std::basic_filebuf< _CharT, _Traits > Class Template Reference 1065
std::basic_streambuf
< _CharT, _Traits >
std::basic_filebuf
< _CharT, _Traits >
__gnu_cxx::stdio_filebuf
< _CharT, _Traits >
Public Types
• basic_filebuf ()
• basic_filebuf (basic_filebuf &&)
• basic_filebuf (const basic_filebuf &)=delete
• virtual ∼basic_filebuf ()
• __filebuf_type ∗ close ()
• locale getloc () const
• streamsize in_avail ()
• bool is_open () const throw ()
• template<typename _Path >
_If_fs_path< _Path, __filebuf_type ∗ > open (const _Path &__s, ios_base::openmode __mode)
• __filebuf_type ∗ open (const char ∗__s, ios_base::openmode __mode)
• __filebuf_type ∗ open (const std::string &__s, ios_base::openmode __mode)
• basic_filebuf & operator= (basic_filebuf &&)
Generated by Doxygen
1066
Generated by Doxygen
5.235 std::basic_filebuf< _CharT, _Traits > Class Template Reference 1067
Protected Attributes
• char_type ∗ _M_buf
• bool _M_buf_allocated
• locale _M_buf_locale
• size_t _M_buf_size
• const __codecvt_type ∗ _M_codecvt
• char ∗ _M_ext_buf
• streamsize _M_ext_buf_size
• char ∗ _M_ext_end
• const char ∗ _M_ext_next
• __file_type _M_file
• char_type ∗ _M_in_beg
• char_type ∗ _M_in_cur
• char_type ∗ _M_in_end
• __c_lock _M_lock
• ios_base::openmode _M_mode
• char_type ∗ _M_out_beg
• char_type ∗ _M_out_cur
• char_type ∗ _M_out_end
• bool _M_reading
• __state_type _M_state_beg
• __state_type _M_state_cur
• __state_type _M_state_last
• bool _M_writing
• char_type _M_pback
• char_type ∗ _M_pback_cur_save
• char_type ∗ _M_pback_end_save
• bool _M_pback_init
Friends
• class ios_base
Template Parameters
Generated by Doxygen
1068
This class associates both its input and output sequence with an external disk file, and maintains a joint file position for
both sequences. Many of its semantics are described in terms of similar behavior in the Standard C Library's FILE
streams.
Requirements on traits_type, specific to this class:
• traits_type::pos_type must be fpos<traits_type::state_type>
basic_filebuf()
∼basic_filebuf()
template<typename _CharT , typename _Traits = char_traits<_CharT>>
virtual std::basic_filebuf< _CharT, _Traits >::∼basic_filebuf () [inline], [virtual]
The destructor closes the file first.
_M_create_pback()
_M_destroy_pback()
_M_set_buffer()
Generated by Doxygen
5.235 std::basic_filebuf< _CharT, _Traits > Class Template Reference 1069
close()
Returns
eback()
egptr()
epptr()
Generated by Doxygen
1070
gbump()
Parameters
_←- The delta by which to move.
_n
This just advances the read position without returning any data.
getloc()
gptr()
imbue()
Parameters
__loc A new locale.
Translations done during I/O which depend on the current locale are changed by this call. The standard adds, Between
invocations of this function a class derived from streambuf can safely cache results of calls to locale functions and to
members of facets so obtained.
Note
Generated by Doxygen
5.235 std::basic_filebuf< _CharT, _Traits > Class Template Reference 1071
in_avail()
Returns
If a read position is available, returns the number of characters available for reading before the buffer must be refilled.
Otherwise returns the derived showmanyc().
is_open()
open() [1/3]
Parameters
Returns
open() [2/3]
Parameters
Generated by Doxygen
1072
Returns
open() [3/3]
Parameters
Returns
overflow()
Generated by Doxygen
5.235 std::basic_filebuf< _CharT, _Traits > Class Template Reference 1073
Parameters
_←- An additional character to consume.
_c
Returns
pbackfail()
Parameters
_←- The character to be inserted back into the sequence.
_c
Returns
Postcondition
The constraints of gptr(), eback(), and pptr() are the same as for underflow().
Note
pbase()
Generated by Doxygen
1074
pbump()
Parameters
_←- The delta by which to move.
_n
This just advances the write position without returning any data.
pptr()
pubimbue()
Parameters
__loc The new locale.
Returns
pubseekoff()
Parameters
__off Offset.
Generated by Doxygen
5.235 std::basic_filebuf< _CharT, _Traits > Class Template Reference 1075
pubseekpos()
Parameters
__sp Position
__mode Value for ios_base::openmode.
pubsetbuf()
pubsync()
sbumpc()
Returns
If the input read position is available, returns that character and increments the read pointer, otherwise calls and returns
uflow().
Referenced by std::basic_istream< _CharT, _Traits >::getline(), std::istreambuf_iterator< _CharT, _Traits >::operator++(),
and std::istreambuf_iterator< _CharT, _Traits >::operator++().
Generated by Doxygen
1076
seekoff()
Note
Base class version does nothing, returns a pos_type that represents an invalid stream position.
seekpos()
Note
Base class version does nothing, returns a pos_type that represents an invalid stream position.
setbuf()
Parameters
Returns
this
If no file has been opened, and both __s and __n are zero, then the stream becomes unbuffered. Otherwise, __s
is used as a buffer; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.←-
html#io.streambuf.buffering for more.
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
Generated by Doxygen
5.235 std::basic_filebuf< _CharT, _Traits > Class Template Reference 1077
setg()
Parameters
__gbeg A pointer.
__gnext A pointer.
__gend A pointer.
Postcondition
setp()
Parameters
__pbeg A pointer.
__pend A pointer.
Postcondition
sgetc()
Returns
If the input read position is available, returns that character, otherwise calls and returns underflow(). Does not
move the read position after fetching the character.
Referenced by std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::getline(),
std::basic_istream< _CharT, _Traits >::ignore(), std::basic_istream< _CharT, _Traits >::ignore(), std::istreambuf_iterator< _CharT, _Trait
and std::istreambuf_iterator< _CharT, _Traits >::operator++().
Generated by Doxygen
1078
sgetn()
Parameters
Returns xsgetn(__s,__n). The effect is to fill __s[0] through __s[__n-1] with characters from the input sequence, if
possible.
showmanyc()
Returns
If it returns a positive value, then successive calls to underflow() will not return traits::eof() until at least that
number of characters have been supplied. If showmanyc() returns -1, then calls to underflow() or uflow()
will fail. [27.5.2.4.3]/1
Note
snextc()
Returns
Calls sbumpc(), and if that function returns traits::eof(), so does this function. Otherwise, sgetc().
Referenced by std::basic_istream< _CharT, _Traits >::getline(), std::basic_istream< _CharT, char_traits< _CharT > >::ignore(),
std::basic_istream< _CharT, char_traits< _CharT > >::operator>>(), and std::basic_istream< _CharT, char_traits< _CharT > >::putba
Generated by Doxygen
5.235 std::basic_filebuf< _CharT, _Traits > Class Template Reference 1079
sputbackc()
Parameters
_←- The character to push back.
_c
Returns
Similar to sungetc(), but __c is pushed onto the stream instead of the previous character. If successful, the next character
fetched from the input stream will be __c.
Referenced by std::basic_istream< _CharT, _Traits >::putback().
sputc()
Parameters
_←- A character to output.
_c
Returns
__c, if possible.
sputn()
Parameters
Generated by Doxygen
1080
sungetc()
Returns
If a putback position is available, this function decrements the input pointer and returns that character. Otherwise, calls
and returns pbackfail(). The effect is to unget the last character gotten.
Referenced by std::basic_istream< _CharT, char_traits< _CharT > >::sentry::sentry().
sync()
Returns
-1 on failure.
Each derived class provides its own appropriate behavior, including the definition of failure.
Note
uflow()
Returns
Informally, this function does the same thing as underflow(), and in fact is required to call that function. It also
returns the new character, like underflow() does. However, this function also moves the read position forward by
one.
Reimplemented in __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >.
underflow()
Generated by Doxygen
5.235 std::basic_filebuf< _CharT, _Traits > Class Template Reference 1081
Returns
Informally, this function is called when the input buffer is exhausted (or does not exist, as buffering need not actually be
done). If a buffer exists, it is refilled. In either case, the next available character is returned, or traits::eof() to
indicate a null pending sequence.
For a formal definition of the pending sequence, see a good text such as Langer & Kreft, or [27.5.2.4.3]/7-14.
A functioning input streambuf can be created by overriding only this function (no buffer area will be used). For an
example, see https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.html
Note
xsgetn()
Parameters
Returns
Fills __s[0] through __s[__n-1] with characters from the input sequence, as if by sbumpc(). Stops when either __n
characters have been copied, or when traits::eof() would be copied.
It is expected that derived classes provide a more efficient implementation by overriding this definition.
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
References std::ios_base::in.
xsputn()
Parameters
Generated by Doxygen
1082
Returns
Writes __s[0] through __s[__n-1] to the output sequence, as if by sputc(). Stops when either n characters have been
copied, or when sputc() would return traits::eof().
It is expected that derived classes provide a more efficient implementation by overriding this definition.
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
References std::ios_base::app, and std::ios_base::out.
_M_buf
_M_buf_locale
_M_buf_size
_M_ext_buf
_M_ext_buf_size
_M_ext_next
_M_in_beg
Generated by Doxygen
5.235 std::basic_filebuf< _CharT, _Traits > Class Template Reference 1083
_M_in_cur
_M_in_end
_M_mode
_M_out_beg
_M_out_cur
_M_out_end
_M_pback
Note
_M_pback_cur_save
Note
Generated by Doxygen
1084
_M_pback_end_save
Note
_M_pback_init
Note
_M_reading
• fstream
• iosfwd
• fstream.tcc
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1085
std::ios_base
std::basic_ios< _CharT,
_Traits >
std::basic_istream std::basic_ostream
< _CharT, _Traits > < _CharT, _Traits >
std::basic_iostream
< _CharT, _Traits >
std::basic_fstream
< _CharT, _Traits >
Public Types
Generated by Doxygen
1086
• basic_fstream ()
• basic_fstream (basic_fstream &&__rhs)
• template<typename _Path , typename _Require = _If_fs_path<_Path>>
basic_fstream (const _Path &__s, ios_base::openmode __mode=ios_base::in|ios_base::out)
• basic_fstream (const basic_fstream &)=delete
• basic_fstream (const char ∗__s, ios_base::openmode __mode=ios_base::in|ios_base::out)
• basic_fstream (const std::string &__s, ios_base::openmode __mode=ios_base::in|ios_base::out)
• ∼basic_fstream ()
• template<typename _ValueT >
basic_istream< _CharT, _Traits > & _M_extract (_ValueT &__v)
• const locale & _M_getloc () const
• template<typename _ValueT >
basic_ostream< _CharT, _Traits > & _M_insert (_ValueT __v)
• void _M_setstate (iostate __state)
• bool bad () const
• void clear (iostate __state=goodbit)
• void close ()
• basic_ios & copyfmt (const basic_ios &__rhs)
• bool eof () const
• iostate exceptions () const
• void exceptions (iostate __except)
• bool fail () const
• char_type fill () const
• char_type fill (char_type __ch)
• fmtflags flags () const
• fmtflags flags (fmtflags __fmtfl)
• __ostream_type & flush ()
• streamsize gcount () const
• basic_istream< char > & getline (char_type ∗__s, streamsize __n, char_type __delim)
• basic_istream< wchar_t > & getline (char_type ∗__s, streamsize __n, char_type __delim)
• locale getloc () const
• bool good () const
• basic_istream< char > & ignore (streamsize __n)
• basic_istream< wchar_t > & ignore (streamsize __n)
• basic_istream< char > & ignore (streamsize __n, int_type __delim)
• basic_istream< wchar_t > & ignore (streamsize __n, int_type __delim)
• locale imbue (const locale &__loc)
• bool is_open ()
• bool is_open () const
• long & iword (int __ix)
• char narrow (char_type __c, char __dfault) const
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1087
Extractors
All the operator>> functions (aka formatted input functions) have some common behavior. Each starts by
constructing a temporary object of type std::basic_istream::sentry with the second argument (noskipws) set to false.
This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.
If the sentry status is good, the function tries to extract whatever data is appropriate for the type of the argument.
If an exception is thrown during extraction, ios_base::badbit will be turned on in the stream's error state (without
causing an ios_base::failure to be thrown) and the original exception will be rethrown if badbit is set in the exceptions
mask.
Generated by Doxygen
1088
• int_type get ()
• __istream_type & get (char_type &__c)
• __istream_type & get (char_type ∗__s, streamsize __n, char_type __delim)
• __istream_type & get (char_type ∗__s, streamsize __n)
• __istream_type & get (__streambuf_type &__sb, char_type __delim)
• __istream_type & get (__streambuf_type &__sb)
• __istream_type & getline (char_type ∗__s, streamsize __n, char_type __delim)
• __istream_type & getline (char_type ∗__s, streamsize __n)
• __istream_type & ignore (streamsize __n, int_type __delim)
• __istream_type & ignore (streamsize __n)
• __istream_type & ignore ()
• int_type peek ()
• __istream_type & read (char_type ∗__s, streamsize __n)
• streamsize readsome (char_type ∗__s, streamsize __n)
• __istream_type & putback (char_type __c)
• __istream_type & unget ()
• int sync ()
• pos_type tellg ()
• __istream_type & seekg (pos_type)
• __istream_type & seekg (off_type, ios_base::seekdir)
Inserters
All the operator<< functions (aka formatted output functions) have some common behavior. Each starts by
constructing a temporary object of type std::basic_ostream::sentry. This can have several effects, concluding with
the setting of a status flag; see the sentry documentation for more.
If the sentry status is good, the function tries to generate whatever data is appropriate for the type of the argument.
If an exception is thrown during insertion, ios_base::badbit will be turned on in the stream's error state without
causing an ios_base::failure to be thrown. The original exception will then be rethrown.
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1089
Generated by Doxygen
1090
Protected Types
• enum { _S_local_word_size }
Protected Attributes
• _Callback_list ∗ _M_callbacks
• const __ctype_type ∗ _M_ctype
• iostate _M_exception
• char_type _M_fill
• bool _M_fill_init
• fmtflags _M_flags
• streamsize _M_gcount
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
• const __num_get_type ∗ _M_num_get
• const __num_put_type ∗ _M_num_put
• streamsize _M_precision
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1091
Template Parameters
This class supports reading from and writing to named files, using the inherited functions from std::basic_iostream. To
control the associated sequence, an instance of std::basic_filebuf is used, which this page refers to as sb.
event_callback
Parameters
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
iostate
• badbit
• eofbit
• failbit
• goodbit
Generated by Doxygen
1092
openmode
• app
• ate
• binary
• in
• out
• trunc
seekdir
• beg
event
basic_fstream() [1/4]
basic_fstream() [2/4]
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1093
Parameters
basic_fstream() [3/4]
Parameters
basic_fstream() [4/4]
Parameters
∼basic_fstream()
template<typename _CharT , typename _Traits = char_traits<_CharT>>
std::basic_fstream< _CharT, _Traits >::∼basic_fstream () [inline]
The destructor does nothing.
The file is closed by the filebuf object, not the formatting stream.
_M_getloc()
Generated by Doxygen
1094
Returns
bad()
Returns
clear()
Parameters
See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.
Referenced by std::basic_ios< _CharT, _Traits >::exceptions(), std::__detail::operator>>(), and std::basic_ios< _CharT, _Traits >::setsta
close()
copyfmt()
Parameters
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1095
Returns
All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword
and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new)
callback is invoked with copyfmt_event. The final step is to copy exceptions().
References std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(),
std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(),
std::tie(), and std::ios_base::width().
eof()
Returns
exceptions() [1/2]
Returns
This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return
value.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
exceptions() [2/2]
Parameters
__except The new exceptions mask.
By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set
in the error flags, then an exception of type std::ios_base::failure is thrown.
If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the
following under GCC 3.1 or later:
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
Generated by Doxygen
1096
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
std::ifstream f ("/etc/motd");
fail()
Returns
Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.
References std::ios_base::badbit, std::ios_base::failbit, and std::basic_ios< _CharT, _Traits >::rdstate().
Referenced by std::basic_ios< _CharT, _Traits >::operator bool(), std::basic_ios< _CharT, _Traits >::operator!(),
std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >
and std::regex_traits< typename >::value().
fill() [1/2]
Returns
fill() [2/2]
Parameters
__ch The new character.
Returns
The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are
actually used, and Q<P. It defaults to a space (' ') in the current locale.
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1097
flags() [1/2]
Returns
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once.
Parameters
Returns
flush()
Returns
∗this
gcount()
Returns
The number of characters extracted by the previous unformatted input function dispatched for this stream.
Generated by Doxygen
1098
get() [1/6]
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.
get() [2/6]
Parameters
Returns
∗this
Returns get(__sb,widen('\n')).
get() [3/6]
Parameters
Returns
∗this
Characters are extracted and inserted into __sb until one of the following happens:
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted)
• the next character equals __delim (in this case, the character is not extracted)
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1099
get() [4/6]
Parameters
_←- The character in which to store data.
_c
Returns
∗this
Tries to extract a character and store it in __c. If none are available, sets failbit and returns traits::eof().
Note
get() [5/6]
Parameters
_←- Pointer to an array.
_s
_←- Maximum number of characters to store in s.
_n
Returns
∗this
Returns get(__s,__n,widen('\n')).
get() [6/6]
Parameters
__s Pointer to an array.
Generated by Doxygen
1100
Returns
∗this
Characters are extracted and stored into __s until one of the following happens:
• the next character equals __delim, in which case the character is not extracted
Note
getline() [1/3]
Parameters
_←- A character array in which to store the data.
_s
_←- Maximum number of characters to extract.
_n
Returns
∗this
Returns getline(__s,__n,widen('\n')).
getline() [2/3]
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1101
Parameters
__s A character array in which to store the data.
__n Maximum number of characters to extract.
__delim A "stop" character.
Returns
∗this
Extracts and stores characters into __s until one of the following happens. Note that these criteria are required to be
tested in the order listed here, to allow an input line to exactly fill the __s array without setting failbit.
1. the input sequence reaches end-of-file, in which case eofbit is set in the stream error state
2. the next character equals __delim, in which case the character is extracted (and therefore counted in
gcount()) but not stored
3. __n-1 characters are stored, in which case failbit is set in the stream error state
If no characters are extracted, failbit is set. (An empty line of input should therefore not cause failbit to be set.)
In any case, a null character is stored in the next location in the array.
References std::ios_base::eofbit, std::ios_base::goodbit, std::basic_streambuf< _CharT, _Traits >::sbumpc(),
std::basic_streambuf< _CharT, _Traits >::sgetc(), and std::basic_streambuf< _CharT, _Traits >::snextc().
getline() [3/3]
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
good()
Generated by Doxygen
1102
ignore() [1/3]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit.
ignore() [2/3]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
ignore() [3/3]
Parameters
Returns
∗this
Extracts characters and throws them away until one of the following happens:
• the next character equals __delim (in this case, the character is extracted); note that this condition will never occur
if __delim equals traits::eof().
NB: Provide three overloads, instead of the single function (with defaults) mandated by the Standard: this leads to a
better performing implementation, while still conforming to the Standard.
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1103
imbue()
Parameters
__loc The new locale.
Returns
Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that buffer's
pubimbue(loc).
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.←-
html
References std::ios_base::imbue().
Referenced by std::chrono::operator<<().
init()
is_open()
Returns
rdbuf()->is_open()
iword()
Parameters
_←- Index into the array.
_ix
Generated by Doxygen
1104
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
narrow()
Parameters
__c The character to narrow.
__dfault The character to narrow.
Returns
open() [1/3]
Parameters
Calls std::basic_filebuf::open(__s,__mode). If that function fails, failbit is set in the stream's error
state.
open() [2/3]
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1105
Parameters
Calls std::basic_filebuf::open(__s,__mode). If that function fails, failbit is set in the stream's error
state.
open() [3/3]
Parameters
Calls std::basic_filebuf::open(__s,__mode). If that function fails, failbit is set in the stream's error
state.
operator bool()
operator"!()
operator<<() [1/17]
operator<<() [2/17]
Generated by Doxygen
1106
operator<<() [3/17]
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from __sb and inserted into ∗this until one of the following occurs:
• insertion into the output sequence fails (in this case, the character that would have been inserted is not extracted),
or
• an exception occurs while getting a character from __sb, which sets failbit in the error state
operator<<() [4/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [5/17]
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1107
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [6/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [7/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
1108
operator<<() [8/17]
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1109
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [9/17]
operator<<() [10/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
1110
operator<<() [12/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [13/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
References std::ios_base::badbit, std::ios_base::goodbit, std::num_put< _CharT, _OutIter >::put(), std::basic_ios< _CharT, _Traits >::se
and std::use_facet().
operator<<() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1111
operator<<() [15/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
1112
operator>>() [1/17]
operator>>() [2/17]
operator>>() [3/17]
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from this stream and inserted into the __sb streambuf until one of the following occurs:
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted), or
operator>>() [4/17]
Parameters
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1113
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [5/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [6/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [7/17]
Generated by Doxygen
1114
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [8/17]
operator>>() [9/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [10/17]
Parameters
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1115
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [12/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [13/17]
Parameters
Generated by Doxygen
1116
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [15/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1117
operator>>() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
peek()
Returns
If, after constructing the sentry object, good() is false, returns traits::eof(). Otherwise reads but does not
extract the next input character.
precision() [1/2]
Returns
precision() [2/2]
streamsize std::ios_base::precision (
streamsize __prec) [inline], [inherited]
Changing flags.
Parameters
__prec The new precision value.
Returns
Generated by Doxygen
1118
put()
Parameters
_←- The character to insert.
_c
Returns
∗this
Note
References std::ios_base::badbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >
putback()
Parameters
_←- The character to push back into the input stream.
_c
Returns
∗this
Note
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
pword()
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1119
Parameters
_←- Index into the array.
_ix
Returns
The pword function provides access to an array of pointers that can be used for any purpose. The array grows as
required to hold the supplied index. All pointers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
rdbuf() [1/2]
Returns
rdbuf() [2/2]
Parameters
Returns
Associates a new buffer with the current stream, and clears the error state.
Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is
hidden in derived classes by overrides of the zero-argument rdbuf(), which is non-virtual for hysterical raisins. As a
result, you must use explicit qualifications to access this function via any derived class. For example:
std::fstream foo; // or some other derived type
std::streambuf* p = .....;
rdstate()
Generated by Doxygen
1120
Returns
See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good().
Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(
std::basic_ios< _CharT, _Traits >::good(), and std::basic_ios< _CharT, _Traits >::setstate().
read()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Returns
∗this
If the stream state is good(), extracts characters and stores them into __s until one of the following happens:
• the input sequence reaches end-of-file, in which case the error state is set to failbit|eofbit.
Note
readsome()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1121
Returns
Extracts characters and stores them into __s depending on the number of characters remaining in the streambuf's buffer,
rdbuf()->in_avail(), called A here:
• if A == -1, sets eofbit and extracts no characters
• if A == 0, extracts no characters
The goal is to empty the current buffer, and to not request any more from the external input sequence controlled by the
streambuf.
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::goodbit, and std::min().
register_callback()
void std::ios_base::register_callback (
event_callback __fn,
int __index) [inherited]
Add the callback __fn with parameter __index.
Parameters
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple
copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
seekg() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(__off,__dir). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
Generated by Doxygen
1122
seekg() [2/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(__pos). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
seekp() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(off,dir). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
seekp() [2/2]
Parameters
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1123
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(pos). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
setf() [1/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
setf() [2/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl,
fmtflags __mask) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base←-
::adjustfield.
setstate()
Parameters
Generated by Doxygen
1124
sync()
Returns
0 on success, -1 on failure
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount().
sync_with_stdio()
Parameters
__sync Whether to synchronize or not.
Returns
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the stan-
dard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.←-
org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
tellg()
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1125
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,in).
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount(). At variance with putback, unget and seekg, eofbit is not cleared first.
tellp()
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out).
References std::ios_base::cur, std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::out, and std::basic_ios< _CharT, _Traits >::rdbuf()
tie() [1/2]
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream
is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().
tie() [2/2]
Parameters
__tiestr The output stream.
Returns
The previously tied output stream, or NULL if the stream was not tied.
Generated by Doxygen
1126
unget()
Returns
∗this
Note
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
unsetf()
void std::ios_base::unsetf (
fmtflags __mask) [inline], [inherited]
Clearing format flags.
Parameters
widen()
Parameters
_←- The character to widen.
_c
Returns
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1127
width() [1/2]
Returns
width() [2/2]
streamsize std::ios_base::width (
streamsize __wide) [inline], [inherited]
Changing flags.
Parameters
__wide The new width value.
Returns
write()
Parameters
_←- The array to insert.
_s
_←- Maximum number of characters to insert.
_n
Returns
∗this
Characters are copied from __s and inserted into the stream until one of the following happens:
• inserting into the output sequence fails (in this case, badbit will be set in the stream's error state)
Note
Generated by Doxygen
1128
xalloc()
Returns
This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to
be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain
an index in the iword and pword arrays that can be used without fear of conflict.
The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed
to return an index that is safe to use in the iword and pword arrays.
_M_gcount
adjustfield
app
ate
badbit
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1129
basefield
beg
binary
boolalpha
cur
dec
end
eofbit
Generated by Doxygen
1130
std::basic_istream< _CharT, _Traits >::get(), std::time_get< _CharT, _InIter >::get(), std::basic_istream< _CharT, _Traits >::getline(),
std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(), std::basic_istream< _CharT, _Traits >::putback(),
std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< _CharT, char_traits< _CharT > >::read(), std::basic_istream< _Cha
std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, char_traits
std::basic_istream< _CharT, _Traits >::unget(), and std::ws().
failbit
fixed
floatfield
goodbit
hex
Generated by Doxygen
5.236 std::basic_fstream< _CharT, _Traits > Class Template Reference 1131
in
internal
left
oct
out
right
scientific
showbase
Generated by Doxygen
1132
showpoint
showpos
skipws
trunc
unitbuf
uppercase
• fstream
• iosfwd
Generated by Doxygen
5.237 __gnu_pbds::basic_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Resize_Policy, Store_Hash, Tag,
Policy_Tl, _Alloc > Class Template Reference 1133
__gnu_pbds::cc_hash
_table< Key, Mapped,
Hash_Fn, Eq_Fn, Comb
_Hash_Fn, Resize_Policy,
__gnu_pbds::basic_hash
Store_Hash, _Alloc >
_table< Key, Mapped, Hash
_Fn, Eq_Fn, Resize_Policy,
Store_Hash, Tag, Policy_Tl,
__gnu_pbds::gp_hash
_Alloc >
_table< Key, Mapped,
Hash_Fn, Eq_Fn, Comb
_Probe_Fn, Probe_Fn, Resize
_Policy, Store_Hash, _Alloc >
template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn, typename Resize_Policy,
bool Store_Hash, typename Tag, typename Policy_Tl, typename _Alloc>
class __gnu_pbds::basic_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Resize_Policy, Store_Hash, Tag,
Policy_Tl, _Alloc >
Generated by Doxygen
1134
Template Parameters
Base is dispatched at compile time via Tag, from the following choices: cc_hash_tag, gp_hash_tag, and descendants
of basic_hash_tag.
Base choices are: detail::cc_ht_map, detail::gp_ht_map
The documentation for this class was generated from the following file:
• assoc_container.hpp
__gnu_pbds::container_tag
__gnu_pbds::associative_tag
__gnu_pbds::basic_hash_tag
__gnu_pbds::cc_hash_tag __gnu_pbds::gp_hash_tag
• tag_and_trait.hpp
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1135
std::ios_base
std::basic_ios< _CharT,
_Traits >
std::basic_istream
< _CharT, _Traits >
std::basic_ifstream
< _CharT, _Traits >
Public Types
Generated by Doxygen
1136
• basic_ifstream ()
• basic_ifstream (basic_ifstream &&__rhs)
• template<typename _Path , typename _Require = _If_fs_path<_Path>>
basic_ifstream (const _Path &__s, ios_base::openmode __mode=ios_base::in)
• basic_ifstream (const basic_ifstream &)=delete
• basic_ifstream (const char ∗__s, ios_base::openmode __mode=ios_base::in)
• basic_ifstream (const std::string &__s, ios_base::openmode __mode=ios_base::in)
• ∼basic_ifstream ()
• template<typename _ValueT >
basic_istream< _CharT, _Traits > & _M_extract (_ValueT &__v)
• const locale & _M_getloc () const
• void _M_setstate (iostate __state)
• bool bad () const
• void clear (iostate __state=goodbit)
• void close ()
• basic_ios & copyfmt (const basic_ios &__rhs)
• bool eof () const
• iostate exceptions () const
• void exceptions (iostate __except)
• bool fail () const
• char_type fill () const
• char_type fill (char_type __ch)
• fmtflags flags () const
• fmtflags flags (fmtflags __fmtfl)
• streamsize gcount () const
• basic_istream< char > & getline (char_type ∗__s, streamsize __n, char_type __delim)
• basic_istream< wchar_t > & getline (char_type ∗__s, streamsize __n, char_type __delim)
• locale getloc () const
• bool good () const
• basic_istream< char > & ignore (streamsize __n)
• basic_istream< wchar_t > & ignore (streamsize __n)
• basic_istream< char > & ignore (streamsize __n, int_type __delim)
• basic_istream< wchar_t > & ignore (streamsize __n, int_type __delim)
• locale imbue (const locale &__loc)
• bool is_open ()
• bool is_open () const
• long & iword (int __ix)
• char narrow (char_type __c, char __dfault) const
• template<typename _Path >
_If_fs_path< _Path, void > open (const _Path &__s, ios_base::openmode __mode=ios_base::in)
• void open (const char ∗__s, ios_base::openmode __mode=ios_base::in)
• void open (const std::string &__s, ios_base::openmode __mode=ios_base::in)
• basic_ifstream & operator= (basic_ifstream &&__rhs)
• basic_ifstream & operator= (const basic_ifstream &)=delete
• __istream_type & operator>> (__streambuf_type ∗__sb)
• __istream_type & operator>> (void ∗&__p)
• streamsize precision () const
• streamsize precision (streamsize __prec)
• void ∗& pword (int __ix)
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1137
Extractors
All the operator>> functions (aka formatted input functions) have some common behavior. Each starts by
constructing a temporary object of type std::basic_istream::sentry with the second argument (noskipws) set to false.
This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.
If the sentry status is good, the function tries to extract whatever data is appropriate for the type of the argument.
If an exception is thrown during extraction, ios_base::badbit will be turned on in the stream's error state (without
causing an ios_base::failure to be thrown) and the original exception will be rethrown if badbit is set in the exceptions
mask.
Generated by Doxygen
1138
• int_type get ()
• __istream_type & get (char_type &__c)
• __istream_type & get (char_type ∗__s, streamsize __n, char_type __delim)
• __istream_type & get (char_type ∗__s, streamsize __n)
• __istream_type & get (__streambuf_type &__sb, char_type __delim)
• __istream_type & get (__streambuf_type &__sb)
• __istream_type & getline (char_type ∗__s, streamsize __n, char_type __delim)
• __istream_type & getline (char_type ∗__s, streamsize __n)
• __istream_type & ignore (streamsize __n, int_type __delim)
• __istream_type & ignore (streamsize __n)
• __istream_type & ignore ()
• int_type peek ()
• __istream_type & read (char_type ∗__s, streamsize __n)
• streamsize readsome (char_type ∗__s, streamsize __n)
• __istream_type & putback (char_type __c)
• __istream_type & unget ()
• int sync ()
• pos_type tellg ()
• __istream_type & seekg (pos_type)
• __istream_type & seekg (off_type, ios_base::seekdir)
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1139
Protected Types
• enum { _S_local_word_size }
Protected Attributes
• _Callback_list ∗ _M_callbacks
• const __ctype_type ∗ _M_ctype
• iostate _M_exception
• char_type _M_fill
• bool _M_fill_init
• fmtflags _M_flags
• streamsize _M_gcount
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
• const __num_get_type ∗ _M_num_get
• const __num_put_type ∗ _M_num_put
• streamsize _M_precision
• basic_streambuf< _CharT, _Traits > ∗ _M_streambuf
• iostate _M_streambuf_state
• basic_ostream< _CharT, _Traits > ∗ _M_tie
• streamsize _M_width
• _Words ∗ _M_word
• int _M_word_size
• _Words _M_word_zero
Generated by Doxygen
1140
Template Parameters
This class supports reading from named files, using the inherited functions from std::basic_istream. To control the
associated sequence, an instance of std::basic_filebuf is used, which this page refers to as sb.
__num_put_type
event_callback
Parameters
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
iostate
• badbit
• eofbit
• failbit
• goodbit
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1141
openmode
• app
• ate
• binary
• in
• out
• trunc
seekdir
• beg
event
basic_ifstream() [1/4]
basic_ifstream() [2/4]
Generated by Doxygen
1142
Parameters
basic_ifstream() [3/4]
Parameters
basic_ifstream() [4/4]
Parameters
∼basic_ifstream()
template<typename _CharT , typename _Traits = char_traits<_CharT>>
std::basic_ifstream< _CharT, _Traits >::∼basic_ifstream () [inline]
The destructor does nothing.
The file is closed by the filebuf object, not the formatting stream.
_M_getloc()
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1143
Returns
bad()
Returns
clear()
Parameters
See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.
Referenced by std::basic_ios< _CharT, _Traits >::exceptions(), std::__detail::operator>>(), and std::basic_ios< _CharT, _Traits >::setsta
close()
copyfmt()
Parameters
Generated by Doxygen
1144
Returns
All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword
and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new)
callback is invoked with copyfmt_event. The final step is to copy exceptions().
References std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(),
std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(),
std::tie(), and std::ios_base::width().
eof()
Returns
exceptions() [1/2]
Returns
This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return
value.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
exceptions() [2/2]
Parameters
__except The new exceptions mask.
By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set
in the error flags, then an exception of type std::ios_base::failure is thrown.
If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the
following under GCC 3.1 or later:
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1145
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
std::ifstream f ("/etc/motd");
fail()
Returns
Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.
References std::ios_base::badbit, std::ios_base::failbit, and std::basic_ios< _CharT, _Traits >::rdstate().
Referenced by std::basic_ios< _CharT, _Traits >::operator bool(), std::basic_ios< _CharT, _Traits >::operator!(),
std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >
and std::regex_traits< typename >::value().
fill() [1/2]
Returns
fill() [2/2]
Parameters
__ch The new character.
Returns
The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are
actually used, and Q<P. It defaults to a space (' ') in the current locale.
Generated by Doxygen
1146
flags() [1/2]
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once.
Parameters
Returns
gcount()
The number of characters extracted by the previous unformatted input function dispatched for this stream.
get() [1/6]
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.
get() [2/6]
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1147
Parameters
Returns
∗this
Returns get(__sb,widen('\n')).
get() [3/6]
Returns
∗this
Characters are extracted and inserted into __sb until one of the following happens:
• the input sequence reaches EOF
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted)
• the next character equals __delim (in this case, the character is not extracted)
get() [4/6]
Parameters
_←- The character in which to store data.
_c
Returns
∗this
Tries to extract a character and store it in __c. If none are available, sets failbit and returns traits::eof().
Note
Generated by Doxygen
1148
get() [5/6]
Parameters
_←- Pointer to an array.
_s
_←- Maximum number of characters to store in s.
_n
Returns
∗this
Returns get(__s,__n,widen('\n')).
get() [6/6]
Parameters
__s Pointer to an array.
__n Maximum number of characters to store in __s.
__delim A "stop" character.
Returns
∗this
Characters are extracted and stored into __s until one of the following happens:
• the next character equals __delim, in which case the character is not extracted
Note
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1149
getline() [1/3]
Parameters
_←- A character array in which to store the data.
_s
_←- Maximum number of characters to extract.
_n
Returns
∗this
Returns getline(__s,__n,widen('\n')).
getline() [2/3]
Parameters
__s A character array in which to store the data.
__n Maximum number of characters to extract.
__delim A "stop" character.
Returns
∗this
Extracts and stores characters into __s until one of the following happens. Note that these criteria are required to be
tested in the order listed here, to allow an input line to exactly fill the __s array without setting failbit.
1. the input sequence reaches end-of-file, in which case eofbit is set in the stream error state
2. the next character equals __delim, in which case the character is extracted (and therefore counted in
gcount()) but not stored
3. __n-1 characters are stored, in which case failbit is set in the stream error state
If no characters are extracted, failbit is set. (An empty line of input should therefore not cause failbit to be set.)
In any case, a null character is stored in the next location in the array.
References std::ios_base::eofbit, std::ios_base::goodbit, std::basic_streambuf< _CharT, _Traits >::sbumpc(),
std::basic_streambuf< _CharT, _Traits >::sgetc(), and std::basic_streambuf< _CharT, _Traits >::snextc().
Generated by Doxygen
1150
getline() [3/3]
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
good()
Returns
ignore() [1/3]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit.
ignore() [2/3]
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1151
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
ignore() [3/3]
Parameters
Returns
∗this
Extracts characters and throws them away until one of the following happens:
• the next character equals __delim (in this case, the character is extracted); note that this condition will never occur
if __delim equals traits::eof().
NB: Provide three overloads, instead of the single function (with defaults) mandated by the Standard: this leads to a
better performing implementation, while still conforming to the Standard.
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
imbue()
Parameters
__loc The new locale.
Returns
Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that buffer's
pubimbue(loc).
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.←-
html
References std::ios_base::imbue().
Referenced by std::chrono::operator<<().
Generated by Doxygen
1152
init()
is_open()
Returns
rdbuf()->is_open()
iword()
Parameters
_←- Index into the array.
_ix
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
narrow()
Parameters
__c The character to narrow.
__dfault The character to narrow.
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1153
Returns
open() [1/3]
Parameters
Calls std::basic_filebuf::open(__s,__mode|in). If that function fails, failbit is set in the stream's error
state.
open() [2/3]
Parameters
Calls std::basic_filebuf::open(s,__mode|in). If that function fails, failbit is set in the stream's error
state.
open() [3/3]
Parameters
Generated by Doxygen
1154
Calls std::basic_filebuf::open(__s,__mode|in). If that function fails, failbit is set in the stream's error
state.
operator bool()
operator"!()
operator>>() [1/17]
operator>>() [2/17]
operator>>() [3/17]
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from this stream and inserted into the __sb streambuf until one of the following occurs:
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1155
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted), or
operator>>() [4/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [5/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [6/17]
Generated by Doxygen
1156
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [7/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [8/17]
operator>>() [9/17]
Parameters
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1157
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [10/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [12/17]
Parameters
Generated by Doxygen
1158
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [13/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [15/17]
Parameters
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1159
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
peek()
Returns
If, after constructing the sentry object, good() is false, returns traits::eof(). Otherwise reads but does not
extract the next input character.
Generated by Doxygen
1160
precision() [1/2]
precision() [2/2]
streamsize std::ios_base::precision (
streamsize __prec) [inline], [inherited]
Changing flags.
Parameters
__prec The new precision value.
Returns
putback()
Parameters
_←- The character to push back into the input stream.
_c
Returns
∗this
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
pword()
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1161
Parameters
_←- Index into the array.
_ix
Returns
The pword function provides access to an array of pointers that can be used for any purpose. The array grows as
required to hold the supplied index. All pointers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
rdbuf() [1/2]
Returns
rdbuf() [2/2]
Parameters
Returns
Associates a new buffer with the current stream, and clears the error state.
Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is
hidden in derived classes by overrides of the zero-argument rdbuf(), which is non-virtual for hysterical raisins. As a
result, you must use explicit qualifications to access this function via any derived class. For example:
std::fstream foo; // or some other derived type
std::streambuf* p = .....;
rdstate()
Generated by Doxygen
1162
Returns
See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good().
Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(
std::basic_ios< _CharT, _Traits >::good(), and std::basic_ios< _CharT, _Traits >::setstate().
read()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Returns
∗this
If the stream state is good(), extracts characters and stores them into __s until one of the following happens:
• the input sequence reaches end-of-file, in which case the error state is set to failbit|eofbit.
Note
readsome()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1163
Returns
Extracts characters and stores them into __s depending on the number of characters remaining in the streambuf's buffer,
rdbuf()->in_avail(), called A here:
• if A == -1, sets eofbit and extracts no characters
• if A == 0, extracts no characters
The goal is to empty the current buffer, and to not request any more from the external input sequence controlled by the
streambuf.
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::goodbit, and std::min().
register_callback()
void std::ios_base::register_callback (
event_callback __fn,
int __index) [inherited]
Add the callback __fn with parameter __index.
Parameters
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple
copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
seekg() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(__off,__dir). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
Generated by Doxygen
1164
seekg() [2/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(__pos). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
setf() [1/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
setf() [2/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl,
fmtflags __mask) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base←-
::adjustfield.
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1165
setstate()
Parameters
sync()
Returns
0 on success, -1 on failure
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount().
sync_with_stdio()
Parameters
__sync Whether to synchronize or not.
Returns
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the stan-
dard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.←-
org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
Generated by Doxygen
1166
tellg()
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,in).
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount(). At variance with putback, unget and seekg, eofbit is not cleared first.
tie() [1/2]
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream
is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().
tie() [2/2]
Parameters
__tiestr The output stream.
Returns
The previously tied output stream, or NULL if the stream was not tied.
unget()
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1167
Returns
∗this
If rdbuf() is not null, calls rdbuf()->sungetc(c).
If rdbuf() is null or if sungetc() fails, sets badbit in the error state.
Note
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
References std::ios_base::eofbit, and std::ios_base::goodbit.
Referenced by std::__detail::operator>>().
unsetf()
void std::ios_base::unsetf (
fmtflags __mask) [inline], [inherited]
Clearing format flags.
Parameters
widen()
Returns
width() [1/2]
Generated by Doxygen
1168
width() [2/2]
streamsize std::ios_base::width (
streamsize __wide) [inline], [inherited]
Changing flags.
Parameters
__wide The new width value.
Returns
xalloc()
Returns
This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to
be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain
an index in the iword and pword arrays that can be used without fear of conflict.
The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed
to return an index that is safe to use in the iword and pword arrays.
_M_gcount
adjustfield
app
ate
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1169
badbit
basefield
beg
binary
boolalpha
cur
dec
Generated by Doxygen
1170
end
eofbit
failbit
fixed
floatfield
goodbit
Generated by Doxygen
5.239 std::basic_ifstream< _CharT, _Traits > Class Template Reference 1171
std::basic_istream< _CharT, _Traits >::ignore(), std::basic_ostream< _CharT, _Traits >::operator<<(), std::basic_istream< _CharT, _Tr
std::basic_istream< _CharT, _Traits >::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(),
std::basic_ostream< _CharT, _Traits >::put(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::r
std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits
std::basic_istream< _CharT, char_traits< _CharT > >::seekg(), std::basic_istream< _CharT, _Traits >::sync(),
std::basic_istream< _CharT, _Traits >::unget(), and std::ws().
hex
in
internal
left
oct
out
right
Generated by Doxygen
1172
Adds fill characters on the left (initial positions) of certain generated output. (I.e., the thing you print is flush right.)
Referenced by std::right().
scientific
showbase
showpoint
showpos
skipws
trunc
unitbuf
uppercase
• fstream
• iosfwd
Generated by Doxygen
5.240 __gnu_pbds::basic_invalidation_guarantee Struct Reference 1173
__gnu_pbds::basic_invalidation
_guarantee
__gnu_pbds::point_invalidation
_guarantee
__gnu_pbds::range_invalidation
_guarantee
Signifies a basic invalidation guarantee that any iterator, pointer, or reference to a container object's mapped value type
is valid as long as the container is not modified.
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
std::basic_ifstream
< _CharT, _Traits >
std::basic_istringstream
< _CharT, _Traits, _Alloc >
std::basic_istream std::basic_fstream
< _CharT, _Traits > < _CharT, _Traits >
std::basic_ios< _CharT, std::basic_iostream
std::ios_base
_Traits > < _CharT, _Traits >
std::basic_ostream std::basic_stringstream
< _CharT, _Traits > < _CharT, _Traits, _Alloc >
std::basic_ofstream
< _CharT, _Traits >
std::basic_ostringstream
< _CharT, _Traits, _Alloc >
Generated by Doxygen
1174
Public Types
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1175
Generated by Doxygen
1176
Protected Types
• enum { _S_local_word_size }
• basic_ios ()
• basic_ios (const basic_ios &)=delete
• void _M_cache_locale (const locale &__loc)
• void _M_call_callbacks (event __ev) throw ()
• void _M_dispose_callbacks (void) throw ()
• _Words & _M_grow_words (int __index, bool __iword)
• void _M_init () throw ()
• void _M_move (ios_base &) noexcept
• void _M_swap (ios_base &__rhs) noexcept
• void init (basic_streambuf< _CharT, _Traits > ∗__sb)
• void move (basic_ios &&__rhs)
• void move (basic_ios &__rhs)
• basic_ios & operator= (const basic_ios &)=delete
• void set_rdbuf (basic_streambuf< _CharT, _Traits > ∗__sb)
• void swap (basic_ios &__rhs) noexcept
Protected Attributes
• _Callback_list ∗ _M_callbacks
• const __ctype_type ∗ _M_ctype
• iostate _M_exception
• char_type _M_fill
• bool _M_fill_init
• fmtflags _M_flags
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
• const __num_get_type ∗ _M_num_get
• const __num_put_type ∗ _M_num_put
• streamsize _M_precision
• basic_streambuf< _CharT, _Traits > ∗ _M_streambuf
• iostate _M_streambuf_state
• basic_ostream< _CharT, _Traits > ∗ _M_tie
• streamsize _M_width
• _Words ∗ _M_word
• int _M_word_size
• _Words _M_word_zero
Template class basic_ios, virtual base class for all stream classes.
Template Parameters
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1177
Most of the member functions called dispatched on stream objects (e.g., std::cout.foo(bar);) are consolidated
in this class.
__ctype_type
__num_get_type
__num_put_type
char_type
event_callback
Parameters
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
Generated by Doxygen
1178
int_type
iostate
• badbit
• eofbit
• failbit
• goodbit
off_type
openmode
• app
• ate
• binary
• in
• out
• trunc
pos_type
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1179
seekdir
• beg
traits_type
event
basic_ios() [1/2]
∼basic_ios()
template<typename _CharT , typename _Traits >
virtual std::basic_ios< _CharT, _Traits >::∼basic_ios () [inline], [virtual]
Empty.
The destructor does nothing. More specifically, it does not destroy the streambuf held by rdbuf().
basic_ios() [2/2]
Generated by Doxygen
1180
_M_getloc()
bad()
Returns
clear()
Parameters
See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.
Referenced by std::basic_ios< _CharT, _Traits >::exceptions(), std::__detail::operator>>(), and std::basic_ios< _CharT, _Traits >::setsta
copyfmt()
Parameters
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1181
Returns
All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword
and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new)
callback is invoked with copyfmt_event. The final step is to copy exceptions().
References std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(),
std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(),
std::tie(), and std::ios_base::width().
eof()
Returns
exceptions() [1/2]
Returns
This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return
value.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
exceptions() [2/2]
Parameters
__except The new exceptions mask.
By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set
in the error flags, then an exception of type std::ios_base::failure is thrown.
If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the
following under GCC 3.1 or later:
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
Generated by Doxygen
1182
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
std::ifstream f ("/etc/motd");
fail()
Returns
Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.
References std::ios_base::badbit, std::ios_base::failbit, and std::basic_ios< _CharT, _Traits >::rdstate().
Referenced by std::basic_ios< _CharT, _Traits >::operator bool(), std::basic_ios< _CharT, _Traits >::operator!(),
std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >
and std::regex_traits< typename >::value().
fill() [1/2]
Returns
fill() [2/2]
Parameters
__ch The new character.
Returns
The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are
actually used, and Q<P. It defaults to a space (' ') in the current locale.
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1183
flags() [1/2]
Returns
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once.
Parameters
Returns
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
good()
Returns
Generated by Doxygen
1184
imbue()
Parameters
__loc The new locale.
Returns
Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that buffer's
pubimbue(loc).
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.←-
html
References std::ios_base::imbue().
Referenced by std::chrono::operator<<().
init()
iword()
Parameters
_←- Index into the array.
_ix
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
narrow()
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1185
char_type __c,
char __dfault) const [inline]
Squeezes characters.
Generated by Doxygen
1186
Parameters
__c The character to narrow.
__dfault The character to narrow.
Returns
operator bool()
operator"!()
precision() [1/2]
precision() [2/2]
streamsize std::ios_base::precision (
streamsize __prec) [inline], [inherited]
Changing flags.
Parameters
__prec The new precision value.
Returns
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1187
pword()
Parameters
_←- Index into the array.
_ix
Returns
The pword function provides access to an array of pointers that can be used for any purpose. The array grows as
required to hold the supplied index. All pointers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
rdbuf() [1/2]
rdbuf() [2/2]
Parameters
Returns
Associates a new buffer with the current stream, and clears the error state.
Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is
hidden in derived classes by overrides of the zero-argument rdbuf(), which is non-virtual for hysterical raisins. As a
result, you must use explicit qualifications to access this function via any derived class. For example:
std::fstream foo; // or some other derived type
std::streambuf* p = .....;
Generated by Doxygen
1188
rdstate()
See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good().
Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(
std::basic_ios< _CharT, _Traits >::good(), and std::basic_ios< _CharT, _Traits >::setstate().
register_callback()
void std::ios_base::register_callback (
event_callback __fn,
int __index) [inherited]
Add the callback __fn with parameter __index.
Parameters
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple
copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
setf() [1/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
setf() [2/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl,
fmtflags __mask) [inline], [inherited]
Setting new format flags.
Parameters
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1189
Returns
This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base←-
::adjustfield.
setstate()
Parameters
sync_with_stdio()
Parameters
__sync Whether to synchronize or not.
Returns
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the stan-
dard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.←-
org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
tie() [1/2]
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream
is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().
Generated by Doxygen
1190
tie() [2/2]
Parameters
__tiestr The output stream.
Returns
The previously tied output stream, or NULL if the stream was not tied.
unsetf()
void std::ios_base::unsetf (
fmtflags __mask) [inline], [inherited]
Clearing format flags.
Parameters
widen()
Parameters
_←- The character to widen.
_c
Returns
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1191
width() [1/2]
Returns
width() [2/2]
streamsize std::ios_base::width (
streamsize __wide) [inline], [inherited]
Changing flags.
Parameters
__wide The new width value.
Returns
xalloc()
Returns
This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to
be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain
an index in the iword and pword arrays that can be used without fear of conflict.
The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed
to return an index that is safe to use in the iword and pword arrays.
adjustfield
app
Generated by Doxygen
1192
ate
badbit
basefield
beg
binary
boolalpha
cur
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1193
dec
end
eofbit
failbit
fixed
floatfield
goodbit
Generated by Doxygen
1194
hex
in
internal
left
oct
out
Generated by Doxygen
5.241 std::basic_ios< _CharT, _Traits > Class Template Reference 1195
std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_stringbuf< _CharT, _Traits,
std::basic_ostream< _CharT, _Traits >::tellp(), and std::basic_filebuf< _CharT, _Traits >::xsputn().
right
scientific
showbase
showpoint
showpos
skipws
trunc
unitbuf
uppercase
Generated by Doxygen
1196
• iosfwd
• basic_ios.h
• basic_ios.tcc
std::basic_istream std::basic_fstream
< _CharT, _Traits > < _CharT, _Traits >
std::basic_ios< _CharT, std::basic_iostream
std::ios_base
_Traits > < _CharT, _Traits >
std::basic_ostream std::basic_stringstream
< _CharT, _Traits > < _CharT, _Traits, _Alloc >
Public Types
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1197
Generated by Doxygen
1198
Extractors
All the operator>> functions (aka formatted input functions) have some common behavior. Each starts by
constructing a temporary object of type std::basic_istream::sentry with the second argument (noskipws) set to false.
This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.
If the sentry status is good, the function tries to extract whatever data is appropriate for the type of the argument.
If an exception is thrown during extraction, ios_base::badbit will be turned on in the stream's error state (without
causing an ios_base::failure to be thrown) and the original exception will be rethrown if badbit is set in the exceptions
mask.
• int_type get ()
• __istream_type & get (char_type &__c)
• __istream_type & get (char_type ∗__s, streamsize __n, char_type __delim)
• __istream_type & get (char_type ∗__s, streamsize __n)
• __istream_type & get (__streambuf_type &__sb, char_type __delim)
• __istream_type & get (__streambuf_type &__sb)
• __istream_type & getline (char_type ∗__s, streamsize __n, char_type __delim)
• __istream_type & getline (char_type ∗__s, streamsize __n)
• __istream_type & ignore (streamsize __n, int_type __delim)
• __istream_type & ignore (streamsize __n)
• __istream_type & ignore ()
• int_type peek ()
• __istream_type & read (char_type ∗__s, streamsize __n)
• streamsize readsome (char_type ∗__s, streamsize __n)
• __istream_type & putback (char_type __c)
• __istream_type & unget ()
• int sync ()
• pos_type tellg ()
• __istream_type & seekg (pos_type)
• __istream_type & seekg (off_type, ios_base::seekdir)
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1199
Inserters
All the operator<< functions (aka formatted output functions) have some common behavior. Each starts by
constructing a temporary object of type std::basic_ostream::sentry. This can have several effects, concluding with
the setting of a status flag; see the sentry documentation for more.
If the sentry status is good, the function tries to generate whatever data is appropriate for the type of the argument.
If an exception is thrown during insertion, ios_base::badbit will be turned on in the stream's error state without
causing an ios_base::failure to be thrown. The original exception will then be rethrown.
Generated by Doxygen
1200
Protected Types
• enum { _S_local_word_size }
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1201
Protected Attributes
• _Callback_list ∗ _M_callbacks
• const __ctype_type ∗ _M_ctype
• iostate _M_exception
• char_type _M_fill
• bool _M_fill_init
• fmtflags _M_flags
• streamsize _M_gcount
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
• const __num_get_type ∗ _M_num_get
• const __num_put_type ∗ _M_num_put
• streamsize _M_precision
• basic_streambuf< _CharT, _Traits > ∗ _M_streambuf
• iostate _M_streambuf_state
• basic_ostream< _CharT, _Traits > ∗ _M_tie
• streamsize _M_width
• _Words ∗ _M_word
• int _M_word_size
• _Words _M_word_zero
Template Parameters
This class multiply inherits from the input and output stream classes simply to provide a single interface.
event_callback
Parameters
Generated by Doxygen
1202
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
iostate
• eofbit
• failbit
• goodbit
openmode
• ate
• binary
• in
• out
• trunc
seekdir
event
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1203
basic_iostream()
∼basic_iostream()
template<typename _CharT , typename _Traits >
virtual std::basic_iostream< _CharT, _Traits >::∼basic_iostream () [inline], [virtual]
Destructor does nothing.
_M_getloc()
bad()
Returns
clear()
Parameters
Generated by Doxygen
1204
See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.
Referenced by std::basic_ios< _CharT, _Traits >::exceptions(), std::__detail::operator>>(), and std::basic_ios< _CharT, _Traits >::setsta
copyfmt()
Parameters
Returns
All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword
and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new)
callback is invoked with copyfmt_event. The final step is to copy exceptions().
References std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(),
std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(),
std::tie(), and std::ios_base::width().
eof()
Returns
exceptions() [1/2]
Returns
This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return
value.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1205
exceptions() [2/2]
Generated by Doxygen
1206
Parameters
__except The new exceptions mask.
By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set
in the error flags, then an exception of type std::ios_base::failure is thrown.
If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the
following under GCC 3.1 or later:
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
std::ifstream f ("/etc/motd");
fail()
Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.
References std::ios_base::badbit, std::ios_base::failbit, and std::basic_ios< _CharT, _Traits >::rdstate().
Referenced by std::basic_ios< _CharT, _Traits >::operator bool(), std::basic_ios< _CharT, _Traits >::operator!(),
std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >
and std::regex_traits< typename >::value().
fill() [1/2]
fill() [2/2]
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1207
Parameters
__ch The new character.
Returns
The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are
actually used, and Q<P. It defaults to a space (' ') in the current locale.
flags() [1/2]
Returns
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once.
Parameters
Returns
flush()
Returns
∗this
Generated by Doxygen
1208
gcount()
Returns
The number of characters extracted by the previous unformatted input function dispatched for this stream.
get() [1/6]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.
get() [2/6]
Parameters
Returns
∗this
Returns get(__sb,widen('\n')).
get() [3/6]
Parameters
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1209
Returns
∗this
Characters are extracted and inserted into __sb until one of the following happens:
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted)
• the next character equals __delim (in this case, the character is not extracted)
get() [4/6]
Parameters
_←- The character in which to store data.
_c
Returns
∗this
Tries to extract a character and store it in __c. If none are available, sets failbit and returns traits::eof().
Note
get() [5/6]
Parameters
_←- Pointer to an array.
_s
_←- Maximum number of characters to store in s.
_n
Returns
∗this
Returns get(__s,__n,widen('\n')).
Generated by Doxygen
1210
get() [6/6]
Parameters
__s Pointer to an array.
__n Maximum number of characters to store in __s.
__delim A "stop" character.
Returns
∗this
Characters are extracted and stored into __s until one of the following happens:
• the next character equals __delim, in which case the character is not extracted
Note
getline() [1/3]
Parameters
_←- A character array in which to store the data.
_s
_←- Maximum number of characters to extract.
_n
Returns
∗this
Returns getline(__s,__n,widen('\n')).
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1211
getline() [2/3]
Parameters
__s A character array in which to store the data.
__n Maximum number of characters to extract.
__delim A "stop" character.
Returns
∗this
Extracts and stores characters into __s until one of the following happens. Note that these criteria are required to be
tested in the order listed here, to allow an input line to exactly fill the __s array without setting failbit.
1. the input sequence reaches end-of-file, in which case eofbit is set in the stream error state
2. the next character equals __delim, in which case the character is extracted (and therefore counted in
gcount()) but not stored
3. __n-1 characters are stored, in which case failbit is set in the stream error state
If no characters are extracted, failbit is set. (An empty line of input should therefore not cause failbit to be set.)
In any case, a null character is stored in the next location in the array.
References std::ios_base::eofbit, std::ios_base::goodbit, std::basic_streambuf< _CharT, _Traits >::sbumpc(),
std::basic_streambuf< _CharT, _Traits >::sgetc(), and std::basic_streambuf< _CharT, _Traits >::snextc().
getline() [3/3]
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
Generated by Doxygen
1212
good()
Returns
ignore() [1/3]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit.
ignore() [2/3]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
ignore() [3/3]
Parameters
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1213
Returns
∗this
Extracts characters and throws them away until one of the following happens:
• if __n != std::numeric_limits<int>::max(), __n characters are extracted
• the next character equals __delim (in this case, the character is extracted); note that this condition will never occur
if __delim equals traits::eof().
NB: Provide three overloads, instead of the single function (with defaults) mandated by the Standard: this leads to a
better performing implementation, while still conforming to the Standard.
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
imbue()
Parameters
__loc The new locale.
Returns
Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that buffer's
pubimbue(loc).
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.←-
html
References std::ios_base::imbue().
Referenced by std::chrono::operator<<().
init()
iword()
Parameters
_←- Index into the array.
_ix
Generated by Doxygen
1214
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
narrow()
Parameters
__c The character to narrow.
__dfault The character to narrow.
Returns
operator bool()
operator"!()
operator<<() [1/17]
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1215
operator<<() [2/17]
operator<<() [3/17]
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from __sb and inserted into ∗this until one of the following occurs:
• insertion into the output sequence fails (in this case, the character that would have been inserted is not extracted),
or
• an exception occurs while getting a character from __sb, which sets failbit in the error state
operator<<() [4/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [5/17]
Generated by Doxygen
1216
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [6/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [7/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1217
operator<<() [8/17]
Generated by Doxygen
1218
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [9/17]
operator<<() [10/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1219
operator<<() [12/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [13/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
References std::ios_base::badbit, std::ios_base::goodbit, std::num_put< _CharT, _OutIter >::put(), std::basic_ios< _CharT, _Traits >::se
and std::use_facet().
operator<<() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
1220
operator<<() [15/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1221
operator>>() [1/17]
operator>>() [2/17]
operator>>() [3/17]
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from this stream and inserted into the __sb streambuf until one of the following occurs:
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted), or
operator>>() [4/17]
Parameters
Generated by Doxygen
1222
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [5/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [6/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [7/17]
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1223
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [8/17]
operator>>() [9/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [10/17]
Parameters
Generated by Doxygen
1224
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [12/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [13/17]
Parameters
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1225
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [15/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
Generated by Doxygen
1226
operator>>() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
peek()
Returns
If, after constructing the sentry object, good() is false, returns traits::eof(). Otherwise reads but does not
extract the next input character.
precision() [1/2]
Returns
precision() [2/2]
streamsize std::ios_base::precision (
streamsize __prec) [inline], [inherited]
Changing flags.
Parameters
__prec The new precision value.
Returns
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1227
put()
Parameters
_←- The character to insert.
_c
Returns
∗this
Note
References std::ios_base::badbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >
putback()
Parameters
_←- The character to push back into the input stream.
_c
Returns
∗this
Note
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
pword()
Generated by Doxygen
1228
Parameters
_←- Index into the array.
_ix
Returns
The pword function provides access to an array of pointers that can be used for any purpose. The array grows as
required to hold the supplied index. All pointers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
rdbuf() [1/2]
Returns
rdbuf() [2/2]
Parameters
Returns
Associates a new buffer with the current stream, and clears the error state.
Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is
hidden in derived classes by overrides of the zero-argument rdbuf(), which is non-virtual for hysterical raisins. As a
result, you must use explicit qualifications to access this function via any derived class. For example:
std::fstream foo; // or some other derived type
std::streambuf* p = .....;
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1229
rdstate()
See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good().
Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(
std::basic_ios< _CharT, _Traits >::good(), and std::basic_ios< _CharT, _Traits >::setstate().
read()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Returns
∗this
If the stream state is good(), extracts characters and stores them into __s until one of the following happens:
• __n characters are stored
• the input sequence reaches end-of-file, in which case the error state is set to failbit|eofbit.
Note
readsome()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Generated by Doxygen
1230
Returns
Extracts characters and stores them into __s depending on the number of characters remaining in the streambuf's buffer,
rdbuf()->in_avail(), called A here:
• if A == -1, sets eofbit and extracts no characters
• if A == 0, extracts no characters
The goal is to empty the current buffer, and to not request any more from the external input sequence controlled by the
streambuf.
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::goodbit, and std::min().
register_callback()
void std::ios_base::register_callback (
event_callback __fn,
int __index) [inherited]
Add the callback __fn with parameter __index.
Parameters
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple
copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
seekg() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(__off,__dir). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1231
seekg() [2/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(__pos). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
seekp() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(off,dir). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
seekp() [2/2]
Parameters
Generated by Doxygen
1232
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(pos). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
setf() [1/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
setf() [2/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl,
fmtflags __mask) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base←-
::adjustfield.
setstate()
Parameters
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1233
sync()
Returns
0 on success, -1 on failure
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount().
sync_with_stdio()
Parameters
__sync Whether to synchronize or not.
Returns
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the stan-
dard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.←-
org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
tellg()
Generated by Doxygen
1234
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,in).
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount(). At variance with putback, unget and seekg, eofbit is not cleared first.
tellp()
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out).
References std::ios_base::cur, std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::out, and std::basic_ios< _CharT, _Traits >::rdbuf()
tie() [1/2]
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream
is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().
tie() [2/2]
Parameters
__tiestr The output stream.
Returns
The previously tied output stream, or NULL if the stream was not tied.
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1235
unget()
Returns
∗this
Note
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
unsetf()
void std::ios_base::unsetf (
fmtflags __mask) [inline], [inherited]
Clearing format flags.
Parameters
widen()
Parameters
_←- The character to widen.
_c
Returns
Generated by Doxygen
1236
width() [1/2]
Returns
width() [2/2]
streamsize std::ios_base::width (
streamsize __wide) [inline], [inherited]
Changing flags.
Parameters
__wide The new width value.
Returns
write()
Parameters
_←- The array to insert.
_s
_←- Maximum number of characters to insert.
_n
Returns
∗this
Characters are copied from __s and inserted into the stream until one of the following happens:
• inserting into the output sequence fails (in this case, badbit will be set in the stream's error state)
Note
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1237
xalloc()
Returns
This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to
be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain
an index in the iword and pword arrays that can be used without fear of conflict.
The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed
to return an index that is safe to use in the iword and pword arrays.
_M_gcount
adjustfield
app
ate
badbit
Generated by Doxygen
1238
basefield
beg
binary
boolalpha
cur
dec
end
eofbit
Generated by Doxygen
5.242 std::basic_iostream< _CharT, _Traits > Class Template Reference 1239
std::basic_istream< _CharT, _Traits >::get(), std::time_get< _CharT, _InIter >::get(), std::basic_istream< _CharT, _Traits >::getline(),
std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(), std::basic_istream< _CharT, _Traits >::putback(),
std::basic_istream< _CharT, _Traits >::read(), std::basic_istream< _CharT, char_traits< _CharT > >::read(), std::basic_istream< _Cha
std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, char_traits
std::basic_istream< _CharT, _Traits >::unget(), and std::ws().
failbit
fixed
floatfield
goodbit
hex
Generated by Doxygen
1240
in
internal
left
oct
out
right
scientific
showbase
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1241
showpoint
showpos
skipws
trunc
unitbuf
uppercase
std::basic_ifstream
< _CharT, _Traits >
std::basic_fstream
< _CharT, _Traits >
std::basic_ios< _CharT, std::basic_istream std::basic_iostream
std::ios_base
_Traits > < _CharT, _Traits > < _CharT, _Traits >
std::basic_stringstream
< _CharT, _Traits, _Alloc >
std::basic_istringstream
< _CharT, _Traits, _Alloc >
Classes
• class sentry
Generated by Doxygen
1242
Public Types
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1243
Extractors
All the operator>> functions (aka formatted input functions) have some common behavior. Each starts by
constructing a temporary object of type std::basic_istream::sentry with the second argument (noskipws) set to false.
This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.
If the sentry status is good, the function tries to extract whatever data is appropriate for the type of the argument.
If an exception is thrown during extraction, ios_base::badbit will be turned on in the stream's error state (without
causing an ios_base::failure to be thrown) and the original exception will be rethrown if badbit is set in the exceptions
mask.
Generated by Doxygen
1244
• int_type get ()
• __istream_type & get (char_type &__c)
• __istream_type & get (char_type ∗__s, streamsize __n, char_type __delim)
• __istream_type & get (char_type ∗__s, streamsize __n)
• __istream_type & get (__streambuf_type &__sb, char_type __delim)
• __istream_type & get (__streambuf_type &__sb)
• __istream_type & getline (char_type ∗__s, streamsize __n, char_type __delim)
• __istream_type & getline (char_type ∗__s, streamsize __n)
• __istream_type & ignore (streamsize __n, int_type __delim)
• __istream_type & ignore (streamsize __n)
• __istream_type & ignore ()
• int_type peek ()
• __istream_type & read (char_type ∗__s, streamsize __n)
• streamsize readsome (char_type ∗__s, streamsize __n)
• __istream_type & putback (char_type __c)
• __istream_type & unget ()
• int sync ()
• pos_type tellg ()
• __istream_type & seekg (pos_type)
• __istream_type & seekg (off_type, ios_base::seekdir)
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1245
Protected Types
• enum { _S_local_word_size }
Protected Attributes
• _Callback_list ∗ _M_callbacks
• const __ctype_type ∗ _M_ctype
• iostate _M_exception
• char_type _M_fill
• bool _M_fill_init
• fmtflags _M_flags
• streamsize _M_gcount
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
Generated by Doxygen
1246
Friends
• class sentry
Template Parameters
This is the base class for all input streams. It provides text formatting of all builtin types, and communicates with any
class derived from basic_streambuf to do the actual input.
__num_put_type
event_callback
Parameters
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1247
iostate
• badbit
• eofbit
• failbit
• goodbit
openmode
• app
• ate
• binary
• in
• out
• trunc
seekdir
event
Generated by Doxygen
1248
basic_istream()
∼basic_istream()
template<typename _CharT , typename _Traits >
virtual std::basic_istream< _CharT, _Traits >::∼basic_istream () [inline], [virtual]
Base destructor.
This does very little apart from providing a virtual base dtor.
_M_getloc()
bad()
Returns
clear()
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1249
Parameters
See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.
Referenced by std::basic_ios< _CharT, _Traits >::exceptions(), std::__detail::operator>>(), and std::basic_ios< _CharT, _Traits >::setsta
copyfmt()
Parameters
Returns
All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword
and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new)
callback is invoked with copyfmt_event. The final step is to copy exceptions().
References std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(),
std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(),
std::tie(), and std::ios_base::width().
eof()
Returns
exceptions() [1/2]
Returns
This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return
value.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
Generated by Doxygen
1250
exceptions() [2/2]
Parameters
__except The new exceptions mask.
By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set
in the error flags, then an exception of type std::ios_base::failure is thrown.
If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the
following under GCC 3.1 or later:
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
std::ifstream f ("/etc/motd");
fail()
Returns
Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.
References std::ios_base::badbit, std::ios_base::failbit, and std::basic_ios< _CharT, _Traits >::rdstate().
Referenced by std::basic_ios< _CharT, _Traits >::operator bool(), std::basic_ios< _CharT, _Traits >::operator!(),
std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >
and std::regex_traits< typename >::value().
fill() [1/2]
Returns
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1251
fill() [2/2]
Parameters
__ch The new character.
Returns
The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are
actually used, and Q<P. It defaults to a space (' ') in the current locale.
flags() [1/2]
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once.
Parameters
Returns
gcount()
The number of characters extracted by the previous unformatted input function dispatched for this stream.
Generated by Doxygen
1252
get() [1/6]
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.
get() [2/6]
Parameters
Returns
∗this
Returns get(__sb,widen('\n')).
get() [3/6]
Parameters
Returns
∗this
Characters are extracted and inserted into __sb until one of the following happens:
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted)
• the next character equals __delim (in this case, the character is not extracted)
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1253
get() [4/6]
Parameters
_←- The character in which to store data.
_c
Returns
∗this
Tries to extract a character and store it in __c. If none are available, sets failbit and returns traits::eof().
Note
get() [5/6]
Parameters
_←- Pointer to an array.
_s
_←- Maximum number of characters to store in s.
_n
Returns
∗this
Returns get(__s,__n,widen('\n')).
get() [6/6]
Parameters
__s Pointer to an array.
Generated by Doxygen
1254
Returns
∗this
Characters are extracted and stored into __s until one of the following happens:
• the next character equals __delim, in which case the character is not extracted
Note
getline() [1/3]
Parameters
_←- A character array in which to store the data.
_s
_←- Maximum number of characters to extract.
_n
Returns
∗this
Returns getline(__s,__n,widen('\n')).
getline() [2/3]
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1255
Parameters
__s A character array in which to store the data.
__n Maximum number of characters to extract.
__delim A "stop" character.
Returns
∗this
Extracts and stores characters into __s until one of the following happens. Note that these criteria are required to be
tested in the order listed here, to allow an input line to exactly fill the __s array without setting failbit.
1. the input sequence reaches end-of-file, in which case eofbit is set in the stream error state
2. the next character equals __delim, in which case the character is extracted (and therefore counted in
gcount()) but not stored
3. __n-1 characters are stored, in which case failbit is set in the stream error state
If no characters are extracted, failbit is set. (An empty line of input should therefore not cause failbit to be set.)
In any case, a null character is stored in the next location in the array.
References std::ios_base::eofbit, std::ios_base::goodbit, std::basic_streambuf< _CharT, _Traits >::sbumpc(),
std::basic_streambuf< _CharT, _Traits >::sgetc(), and std::basic_streambuf< _CharT, _Traits >::snextc().
getline() [3/3]
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
good()
Generated by Doxygen
1256
ignore() [1/3]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit.
ignore() [2/3]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
ignore() [3/3]
Parameters
Returns
∗this
Extracts characters and throws them away until one of the following happens:
• the next character equals __delim (in this case, the character is extracted); note that this condition will never occur
if __delim equals traits::eof().
NB: Provide three overloads, instead of the single function (with defaults) mandated by the Standard: this leads to a
better performing implementation, while still conforming to the Standard.
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1257
imbue()
Parameters
__loc The new locale.
Returns
Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that buffer's
pubimbue(loc).
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.←-
html
References std::ios_base::imbue().
Referenced by std::chrono::operator<<().
init()
iword()
Parameters
_←- Index into the array.
_ix
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
narrow()
Generated by Doxygen
1258
char_type __c,
char __dfault) const [inline], [inherited]
Squeezes characters.
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1259
Parameters
__c The character to narrow.
__dfault The character to narrow.
Returns
operator bool()
operator"!()
operator>>() [1/17]
operator>>() [2/17]
operator>>() [3/17]
Generated by Doxygen
1260
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from this stream and inserted into the __sb streambuf until one of the following occurs:
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted), or
operator>>() [4/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [5/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1261
operator>>() [6/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [7/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [8/17]
operator>>() [9/17]
Generated by Doxygen
1262
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [10/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [12/17]
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1263
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [13/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [15/17]
Generated by Doxygen
1264
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
peek()
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1265
precision() [1/2]
precision() [2/2]
streamsize std::ios_base::precision (
streamsize __prec) [inline], [inherited]
Changing flags.
Parameters
__prec The new precision value.
Returns
putback()
Parameters
_←- The character to push back into the input stream.
_c
Returns
∗this
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
pword()
Generated by Doxygen
1266
Parameters
_←- Index into the array.
_ix
Returns
The pword function provides access to an array of pointers that can be used for any purpose. The array grows as
required to hold the supplied index. All pointers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
rdbuf() [1/2]
Returns
rdbuf() [2/2]
Parameters
Returns
Associates a new buffer with the current stream, and clears the error state.
Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is
hidden in derived classes by overrides of the zero-argument rdbuf(), which is non-virtual for hysterical raisins. As a
result, you must use explicit qualifications to access this function via any derived class. For example:
std::fstream foo; // or some other derived type
std::streambuf* p = .....;
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1267
rdstate()
See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good().
Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(
std::basic_ios< _CharT, _Traits >::good(), and std::basic_ios< _CharT, _Traits >::setstate().
read()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Returns
∗this
If the stream state is good(), extracts characters and stores them into __s until one of the following happens:
• __n characters are stored
• the input sequence reaches end-of-file, in which case the error state is set to failbit|eofbit.
Note
readsome()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Generated by Doxygen
1268
Returns
Extracts characters and stores them into __s depending on the number of characters remaining in the streambuf's buffer,
rdbuf()->in_avail(), called A here:
• if A == -1, sets eofbit and extracts no characters
• if A == 0, extracts no characters
The goal is to empty the current buffer, and to not request any more from the external input sequence controlled by the
streambuf.
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::goodbit, and std::min().
register_callback()
void std::ios_base::register_callback (
event_callback __fn,
int __index) [inherited]
Add the callback __fn with parameter __index.
Parameters
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple
copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
seekg() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(__off,__dir). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1269
seekg() [2/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(__pos). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
setf() [1/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
setf() [2/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl,
fmtflags __mask) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base←-
::adjustfield.
Generated by Doxygen
1270
setstate()
Parameters
sync()
Returns
0 on success, -1 on failure
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount().
sync_with_stdio()
Parameters
__sync Whether to synchronize or not.
Returns
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the stan-
dard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.←-
org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1271
tellg()
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,in).
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount(). At variance with putback, unget and seekg, eofbit is not cleared first.
tie() [1/2]
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream
is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().
tie() [2/2]
Parameters
__tiestr The output stream.
Returns
The previously tied output stream, or NULL if the stream was not tied.
unget()
Generated by Doxygen
1272
Returns
∗this
If rdbuf() is not null, calls rdbuf()->sungetc(c).
If rdbuf() is null or if sungetc() fails, sets badbit in the error state.
Note
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
References std::ios_base::eofbit, and std::ios_base::goodbit.
Referenced by std::__detail::operator>>().
unsetf()
void std::ios_base::unsetf (
fmtflags __mask) [inline], [inherited]
Clearing format flags.
Parameters
widen()
Returns
width() [1/2]
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1273
width() [2/2]
streamsize std::ios_base::width (
streamsize __wide) [inline], [inherited]
Changing flags.
Parameters
__wide The new width value.
Returns
xalloc()
Returns
This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to
be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain
an index in the iword and pword arrays that can be used without fear of conflict.
The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed
to return an index that is safe to use in the iword and pword arrays.
_M_gcount
adjustfield
app
ate
Generated by Doxygen
1274
badbit
basefield
beg
binary
boolalpha
cur
dec
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1275
end
eofbit
failbit
fixed
floatfield
goodbit
Generated by Doxygen
1276
std::basic_istream< _CharT, _Traits >::ignore(), std::basic_ostream< _CharT, _Traits >::operator<<(), std::basic_istream< _CharT, _Tr
std::basic_istream< _CharT, _Traits >::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(),
std::basic_ostream< _CharT, _Traits >::put(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::r
std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits
std::basic_istream< _CharT, char_traits< _CharT > >::seekg(), std::basic_istream< _CharT, _Traits >::sync(),
std::basic_istream< _CharT, _Traits >::unget(), and std::ws().
hex
in
internal
left
oct
out
right
Generated by Doxygen
5.243 std::basic_istream< _CharT, _Traits > Class Template Reference 1277
Adds fill characters on the left (initial positions) of certain generated output. (I.e., the thing you print is flush right.)
Referenced by std::right().
scientific
showbase
showpoint
showpos
skipws
trunc
unitbuf
uppercase
• iosfwd
• istream
• istream.tcc
Generated by Doxygen
1278
std::ios_base
std::basic_ios< _CharT,
_Traits >
std::basic_istream
< _CharT, _Traits >
std::basic_istringstream
< _CharT, _Traits, _Alloc >
Public Types
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1279
• basic_istringstream ()
• basic_istringstream (__string_type &&__str, ios_base::openmode __mode=ios_base::in)
• basic_istringstream (basic_istringstream &&__rhs)
• basic_istringstream (const __string_type &__str, ios_base::openmode __mode=ios_base::in)
• basic_istringstream (const basic_istringstream &)=delete
• template<typename _SAlloc >
basic_istringstream (const basic_string< _CharT, _Traits, _SAlloc > &__str, const allocator_type &__a)
• template<typename _SAlloc >
basic_istringstream (const basic_string< _CharT, _Traits, _SAlloc > &__str, ios_base::openmode __mode,
const allocator_type &__a)
• template<typename _SAlloc >
basic_istringstream (const basic_string< _CharT, _Traits, _SAlloc > &__str, ios_base::openmode __←-
mode=ios_base::in)
• basic_istringstream (ios_base::openmode __mode)
• basic_istringstream (ios_base::openmode __mode, const allocator_type &__a)
• ∼basic_istringstream ()
• template<typename _ValueT >
basic_istream< _CharT, _Traits > & _M_extract (_ValueT &__v)
• const locale & _M_getloc () const
• void _M_setstate (iostate __state)
• bool bad () const
• void clear (iostate __state=goodbit)
• basic_ios & copyfmt (const basic_ios &__rhs)
• bool eof () const
• iostate exceptions () const
• void exceptions (iostate __except)
• bool fail () const
• char_type fill () const
• char_type fill (char_type __ch)
• fmtflags flags () const
• fmtflags flags (fmtflags __fmtfl)
• streamsize gcount () const
• basic_istream< char > & getline (char_type ∗__s, streamsize __n, char_type __delim)
• basic_istream< wchar_t > & getline (char_type ∗__s, streamsize __n, char_type __delim)
• locale getloc () const
• bool good () const
• basic_istream< char > & ignore (streamsize __n)
• basic_istream< wchar_t > & ignore (streamsize __n)
• basic_istream< char > & ignore (streamsize __n, int_type __delim)
• basic_istream< wchar_t > & ignore (streamsize __n, int_type __delim)
• locale imbue (const locale &__loc)
• long & iword (int __ix)
• char narrow (char_type __c, char __dfault) const
• basic_istringstream & operator= (basic_istringstream &&__rhs)
• basic_istringstream & operator= (const basic_istringstream &)=delete
• __istream_type & operator>> (__streambuf_type ∗__sb)
• __istream_type & operator>> (void ∗&__p)
Generated by Doxygen
1280
Extractors
All the operator>> functions (aka formatted input functions) have some common behavior. Each starts by
constructing a temporary object of type std::basic_istream::sentry with the second argument (noskipws) set to false.
This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.
If the sentry status is good, the function tries to extract whatever data is appropriate for the type of the argument.
If an exception is thrown during extraction, ios_base::badbit will be turned on in the stream's error state (without
causing an ios_base::failure to be thrown) and the original exception will be rethrown if badbit is set in the exceptions
mask.
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1281
• int_type get ()
• __istream_type & get (char_type &__c)
• __istream_type & get (char_type ∗__s, streamsize __n, char_type __delim)
• __istream_type & get (char_type ∗__s, streamsize __n)
• __istream_type & get (__streambuf_type &__sb, char_type __delim)
• __istream_type & get (__streambuf_type &__sb)
• __istream_type & getline (char_type ∗__s, streamsize __n, char_type __delim)
• __istream_type & getline (char_type ∗__s, streamsize __n)
• __istream_type & ignore (streamsize __n, int_type __delim)
• __istream_type & ignore (streamsize __n)
• __istream_type & ignore ()
• int_type peek ()
• __istream_type & read (char_type ∗__s, streamsize __n)
• streamsize readsome (char_type ∗__s, streamsize __n)
• __istream_type & putback (char_type __c)
• __istream_type & unget ()
• int sync ()
• pos_type tellg ()
• __istream_type & seekg (pos_type)
• __istream_type & seekg (off_type, ios_base::seekdir)
Generated by Doxygen
1282
Protected Types
• enum { _S_local_word_size }
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1283
Protected Attributes
• _Callback_list ∗ _M_callbacks
• const __ctype_type ∗ _M_ctype
• iostate _M_exception
• char_type _M_fill
• bool _M_fill_init
• fmtflags _M_flags
• streamsize _M_gcount
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
• const __num_get_type ∗ _M_num_get
• const __num_put_type ∗ _M_num_put
• streamsize _M_precision
• basic_streambuf< _CharT, _Traits > ∗ _M_streambuf
• iostate _M_streambuf_state
• basic_ostream< _CharT, _Traits > ∗ _M_tie
• streamsize _M_width
• _Words ∗ _M_word
• int _M_word_size
• _Words _M_word_zero
Template Parameters
This class supports reading from objects of type std::basic_string, using the inherited functions from std::basic_istream.
To control the associated sequence, an instance of std::basic_stringbuf is used, which this page refers to as sb.
__num_put_type
event_callback
Generated by Doxygen
1284
Parameters
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
iostate
• badbit
• eofbit
• failbit
• goodbit
openmode
• app
• ate
• binary
• in
• out
• trunc
seekdir
• beg
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1285
event
basic_istringstream() [1/3]
basic_istringstream() [2/3]
Parameters
basic_istringstream() [3/3]
Parameters
∼basic_istringstream()
template<typename _CharT , typename _Traits , typename _Alloc >
std::basic_istringstream< _CharT, _Traits, _Alloc >::∼basic_istringstream () [inline]
The destructor does nothing.
The buffer is deallocated by the stringbuf object, not the formatting stream.
Generated by Doxygen
1286
_M_getloc()
bad()
Returns
clear()
Parameters
See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.
Referenced by std::basic_ios< _CharT, _Traits >::exceptions(), std::__detail::operator>>(), and std::basic_ios< _CharT, _Traits >::setsta
copyfmt()
Parameters
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1287
Returns
All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword
and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new)
callback is invoked with copyfmt_event. The final step is to copy exceptions().
References std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(),
std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(),
std::tie(), and std::ios_base::width().
eof()
Returns
exceptions() [1/2]
Returns
This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return
value.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
exceptions() [2/2]
Parameters
__except The new exceptions mask.
By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set
in the error flags, then an exception of type std::ios_base::failure is thrown.
If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the
following under GCC 3.1 or later:
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
Generated by Doxygen
1288
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
std::ifstream f ("/etc/motd");
fail()
Returns
Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.
References std::ios_base::badbit, std::ios_base::failbit, and std::basic_ios< _CharT, _Traits >::rdstate().
Referenced by std::basic_ios< _CharT, _Traits >::operator bool(), std::basic_ios< _CharT, _Traits >::operator!(),
std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >
and std::regex_traits< typename >::value().
fill() [1/2]
Returns
fill() [2/2]
Parameters
__ch The new character.
Returns
The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are
actually used, and Q<P. It defaults to a space (' ') in the current locale.
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1289
flags() [1/2]
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once.
Parameters
Returns
gcount()
The number of characters extracted by the previous unformatted input function dispatched for this stream.
get() [1/6]
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.
get() [2/6]
Generated by Doxygen
1290
Parameters
Returns
∗this
Returns get(__sb,widen('\n')).
get() [3/6]
Returns
∗this
Characters are extracted and inserted into __sb until one of the following happens:
• the input sequence reaches EOF
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted)
• the next character equals __delim (in this case, the character is not extracted)
get() [4/6]
Parameters
_←- The character in which to store data.
_c
Returns
∗this
Tries to extract a character and store it in __c. If none are available, sets failbit and returns traits::eof().
Note
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1291
get() [5/6]
Parameters
_←- Pointer to an array.
_s
_←- Maximum number of characters to store in s.
_n
Returns
∗this
Returns get(__s,__n,widen('\n')).
get() [6/6]
Parameters
__s Pointer to an array.
__n Maximum number of characters to store in __s.
__delim A "stop" character.
Returns
∗this
Characters are extracted and stored into __s until one of the following happens:
• the next character equals __delim, in which case the character is not extracted
Note
Generated by Doxygen
1292
getline() [1/3]
Parameters
_←- A character array in which to store the data.
_s
_←- Maximum number of characters to extract.
_n
Returns
∗this
Returns getline(__s,__n,widen('\n')).
getline() [2/3]
Parameters
__s A character array in which to store the data.
__n Maximum number of characters to extract.
__delim A "stop" character.
Returns
∗this
Extracts and stores characters into __s until one of the following happens. Note that these criteria are required to be
tested in the order listed here, to allow an input line to exactly fill the __s array without setting failbit.
1. the input sequence reaches end-of-file, in which case eofbit is set in the stream error state
2. the next character equals __delim, in which case the character is extracted (and therefore counted in
gcount()) but not stored
3. __n-1 characters are stored, in which case failbit is set in the stream error state
If no characters are extracted, failbit is set. (An empty line of input should therefore not cause failbit to be set.)
In any case, a null character is stored in the next location in the array.
References std::ios_base::eofbit, std::ios_base::goodbit, std::basic_streambuf< _CharT, _Traits >::sbumpc(),
std::basic_streambuf< _CharT, _Traits >::sgetc(), and std::basic_streambuf< _CharT, _Traits >::snextc().
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1293
getline() [3/3]
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
good()
Returns
ignore() [1/3]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit.
ignore() [2/3]
Generated by Doxygen
1294
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
ignore() [3/3]
Parameters
Returns
∗this
Extracts characters and throws them away until one of the following happens:
• the next character equals __delim (in this case, the character is extracted); note that this condition will never occur
if __delim equals traits::eof().
NB: Provide three overloads, instead of the single function (with defaults) mandated by the Standard: this leads to a
better performing implementation, while still conforming to the Standard.
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
imbue()
Parameters
__loc The new locale.
Returns
Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that buffer's
pubimbue(loc).
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.←-
html
References std::ios_base::imbue().
Referenced by std::chrono::operator<<().
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1295
init()
iword()
Parameters
_←- Index into the array.
_ix
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
narrow()
Parameters
__c The character to narrow.
__dfault The character to narrow.
Returns
Generated by Doxygen
1296
operator bool()
operator"!()
operator>>() [1/17]
operator>>() [2/17]
operator>>() [3/17]
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from this stream and inserted into the __sb streambuf until one of the following occurs:
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted), or
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1297
operator>>() [4/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [5/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [6/17]
Parameters
Generated by Doxygen
1298
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [7/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [8/17]
operator>>() [9/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1299
operator>>() [10/17]
Generated by Doxygen
1300
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [12/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [13/17]
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1301
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [15/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [16/17]
Generated by Doxygen
1302
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
peek()
precision() [1/2]
precision() [2/2]
streamsize std::ios_base::precision (
streamsize __prec) [inline], [inherited]
Changing flags.
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1303
Parameters
__prec The new precision value.
Returns
putback()
Parameters
_←- The character to push back into the input stream.
_c
Returns
∗this
Note
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
pword()
Parameters
_←- Index into the array.
_ix
Returns
The pword function provides access to an array of pointers that can be used for any purpose. The array grows as
required to hold the supplied index. All pointers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
Generated by Doxygen
1304
rdbuf() [1/2]
Parameters
Returns
Associates a new buffer with the current stream, and clears the error state.
Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is
hidden in derived classes by overrides of the zero-argument rdbuf(), which is non-virtual for hysterical raisins. As a
result, you must use explicit qualifications to access this function via any derived class. For example:
std::fstream foo; // or some other derived type
std::streambuf* p = .....;
rdbuf() [2/2]
Returns
rdstate()
See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good().
Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(
std::basic_ios< _CharT, _Traits >::good(), and std::basic_ios< _CharT, _Traits >::setstate().
read()
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1305
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Returns
∗this
If the stream state is good(), extracts characters and stores them into __s until one of the following happens:
• __n characters are stored
• the input sequence reaches end-of-file, in which case the error state is set to failbit|eofbit.
Note
readsome()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Returns
• if A == 0, extracts no characters
register_callback()
void std::ios_base::register_callback (
event_callback __fn,
int __index) [inherited]
Add the callback __fn with parameter __index.
Generated by Doxygen
1306
Parameters
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple
copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
seekg() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(__off,__dir). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
seekg() [2/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(__pos). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1307
setf() [1/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
setf() [2/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl,
fmtflags __mask) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base←-
::adjustfield.
setstate()
Parameters
Generated by Doxygen
1308
str() [1/2]
Returns
rdbuf()->str()
str() [2/2]
Parameters
_←- The string to use as a new sequence.
_s
Calls rdbuf()->str(s).
sync()
Returns
0 on success, -1 on failure
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount().
sync_with_stdio()
Parameters
__sync Whether to synchronize or not.
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1309
Returns
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the stan-
dard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.←-
org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
tellg()
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,in).
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount(). At variance with putback, unget and seekg, eofbit is not cleared first.
tie() [1/2]
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream
is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().
tie() [2/2]
Parameters
__tiestr The output stream.
Returns
The previously tied output stream, or NULL if the stream was not tied.
Generated by Doxygen
1310
unget()
Returns
∗this
Note
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
unsetf()
void std::ios_base::unsetf (
fmtflags __mask) [inline], [inherited]
Clearing format flags.
Parameters
widen()
Parameters
_←- The character to widen.
_c
Returns
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1311
width() [1/2]
Returns
width() [2/2]
streamsize std::ios_base::width (
streamsize __wide) [inline], [inherited]
Changing flags.
Parameters
__wide The new width value.
Returns
xalloc()
Returns
This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to
be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain
an index in the iword and pword arrays that can be used without fear of conflict.
The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed
to return an index that is safe to use in the iword and pword arrays.
_M_gcount
adjustfield
Generated by Doxygen
1312
app
ate
badbit
basefield
beg
binary
boolalpha
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1313
cur
dec
end
eofbit
failbit
fixed
floatfield
Generated by Doxygen
1314
goodbit
hex
in
internal
left
oct
Generated by Doxygen
5.244 std::basic_istringstream< _CharT, _Traits, _Alloc > Class Template Reference 1315
out
right
scientific
showbase
showpoint
showpos
skipws
trunc
unitbuf
Generated by Doxygen
1316
uppercase
• iosfwd
• sstream
std::ios_base
std::basic_ios< _CharT,
_Traits >
std::basic_ostream
< _CharT, _Traits >
std::basic_ofstream
< _CharT, _Traits >
Public Types
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1317
• basic_ofstream ()
• basic_ofstream (basic_ofstream &&__rhs)
• template<typename _Path , typename _Require = _If_fs_path<_Path>>
basic_ofstream (const _Path &__s, ios_base::openmode __mode=ios_base::out)
• basic_ofstream (const basic_ofstream &)=delete
• basic_ofstream (const char ∗__s, ios_base::openmode __mode=ios_base::out)
• basic_ofstream (const std::string &__s, ios_base::openmode __mode=ios_base::out)
• ∼basic_ofstream ()
• const locale & _M_getloc () const
• template<typename _ValueT >
basic_ostream< _CharT, _Traits > & _M_insert (_ValueT __v)
• void _M_setstate (iostate __state)
• bool bad () const
• void clear (iostate __state=goodbit)
• void close ()
• basic_ios & copyfmt (const basic_ios &__rhs)
• bool eof () const
• iostate exceptions () const
• void exceptions (iostate __except)
• bool fail () const
• char_type fill () const
• char_type fill (char_type __ch)
• fmtflags flags () const
• fmtflags flags (fmtflags __fmtfl)
• __ostream_type & flush ()
• locale getloc () const
• bool good () const
• locale imbue (const locale &__loc)
• bool is_open ()
• bool is_open () const
• long & iword (int __ix)
• char narrow (char_type __c, char __dfault) const
• template<typename _Path >
_If_fs_path< _Path, void > open (const _Path &__s, ios_base::openmode __mode=ios_base::out)
• void open (const char ∗__s, ios_base::openmode __mode=ios_base::out)
• void open (const std::string &__s, ios_base::openmode __mode=ios_base::out)
• __ostream_type & operator<< (__streambuf_type ∗__sb)
• __ostream_type & operator<< (const void ∗__p)
• __ostream_type & operator<< (nullptr_t)
Generated by Doxygen
1318
Inserters
All the operator<< functions (aka formatted output functions) have some common behavior. Each starts by
constructing a temporary object of type std::basic_ostream::sentry. This can have several effects, concluding with
the setting of a status flag; see the sentry documentation for more.
If the sentry status is good, the function tries to generate whatever data is appropriate for the type of the argument.
If an exception is thrown during insertion, ios_base::badbit will be turned on in the stream's error state without
causing an ios_base::failure to be thrown. The original exception will then be rethrown.
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1319
Generated by Doxygen
1320
Protected Types
• enum { _S_local_word_size }
Protected Attributes
• _Callback_list ∗ _M_callbacks
• const __ctype_type ∗ _M_ctype
• iostate _M_exception
• char_type _M_fill
• bool _M_fill_init
• fmtflags _M_flags
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
• const __num_get_type ∗ _M_num_get
• const __num_put_type ∗ _M_num_put
• streamsize _M_precision
• basic_streambuf< _CharT, _Traits > ∗ _M_streambuf
• iostate _M_streambuf_state
• basic_ostream< _CharT, _Traits > ∗ _M_tie
• streamsize _M_width
• _Words ∗ _M_word
• int _M_word_size
• _Words _M_word_zero
Template Parameters
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1321
This class supports reading from named files, using the inherited functions from std::basic_ostream. To control the
associated sequence, an instance of std::basic_filebuf is used, which this page refers to as sb.
__num_get_type
event_callback
Parameters
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
iostate
• badbit
• eofbit
• failbit
• goodbit
openmode
• app
Generated by Doxygen
1322
• ate
• binary
• in
• out
• trunc
seekdir
event
basic_ofstream() [1/4]
basic_ofstream() [2/4]
Parameters
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1323
basic_ofstream() [3/4]
Parameters
basic_ofstream() [4/4]
Parameters
∼basic_ofstream()
template<typename _CharT , typename _Traits = char_traits<_CharT>>
std::basic_ofstream< _CharT, _Traits >::∼basic_ofstream () [inline]
The destructor does nothing.
The file is closed by the filebuf object, not the formatting stream.
_M_getloc()
Generated by Doxygen
1324
bad()
Returns
clear()
Parameters
See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.
Referenced by std::basic_ios< _CharT, _Traits >::exceptions(), std::__detail::operator>>(), and std::basic_ios< _CharT, _Traits >::setsta
close()
copyfmt()
Parameters
Returns
All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword
and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new)
callback is invoked with copyfmt_event. The final step is to copy exceptions().
References std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(),
std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(),
std::tie(), and std::ios_base::width().
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1325
eof()
Returns
exceptions() [1/2]
Returns
This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return
value.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
exceptions() [2/2]
Parameters
__except The new exceptions mask.
By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set
in the error flags, then an exception of type std::ios_base::failure is thrown.
If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the
following under GCC 3.1 or later:
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
std::ifstream f ("/etc/motd");
Generated by Doxygen
1326
fail()
fill() [1/2]
fill() [2/2]
Parameters
__ch The new character.
Returns
flags() [1/2]
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1327
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once.
Parameters
Returns
flush()
Returns
∗this
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
good()
Returns
Generated by Doxygen
1328
imbue()
Parameters
__loc The new locale.
Returns
Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that buffer's
pubimbue(loc).
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.←-
html
References std::ios_base::imbue().
Referenced by std::chrono::operator<<().
init()
is_open()
Returns
rdbuf()->is_open()
iword()
Parameters
_←- Index into the array.
_ix
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1329
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
narrow()
Parameters
__c The character to narrow.
__dfault The character to narrow.
Returns
open() [1/3]
Parameters
Calls std::basic_filebuf::open(__s,__mode|out). If that function fails, failbit is set in the stream's error
state.
open() [2/3]
Generated by Doxygen
1330
Parameters
Calls std::basic_filebuf::open(__s,__mode|out). If that function fails, failbit is set in the stream's error
state.
open() [3/3]
Parameters
Calls std::basic_filebuf::open(s,mode|out). If that function fails, failbit is set in the stream's error state.
operator bool()
operator"!()
operator<<() [1/17]
operator<<() [2/17]
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1331
operator<<() [3/17]
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from __sb and inserted into ∗this until one of the following occurs:
• insertion into the output sequence fails (in this case, the character that would have been inserted is not extracted),
or
• an exception occurs while getting a character from __sb, which sets failbit in the error state
operator<<() [4/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [5/17]
Generated by Doxygen
1332
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [6/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [7/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1333
operator<<() [8/17]
Generated by Doxygen
1334
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [9/17]
operator<<() [10/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1335
operator<<() [12/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [13/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
References std::ios_base::badbit, std::ios_base::goodbit, std::num_put< _CharT, _OutIter >::put(), std::basic_ios< _CharT, _Traits >::se
and std::use_facet().
operator<<() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
1336
operator<<() [15/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1337
precision() [1/2]
Returns
precision() [2/2]
streamsize std::ios_base::precision (
streamsize __prec) [inline], [inherited]
Changing flags.
Parameters
__prec The new precision value.
Returns
put()
Parameters
_←- The character to insert.
_c
Returns
∗this
Note
References std::ios_base::badbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >
pword()
Generated by Doxygen
1338
Parameters
_←- Index into the array.
_ix
Returns
The pword function provides access to an array of pointers that can be used for any purpose. The array grows as
required to hold the supplied index. All pointers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
rdbuf() [1/2]
Parameters
Returns
Associates a new buffer with the current stream, and clears the error state.
Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is
hidden in derived classes by overrides of the zero-argument rdbuf(), which is non-virtual for hysterical raisins. As a
result, you must use explicit qualifications to access this function via any derived class. For example:
std::fstream foo; // or some other derived type
std::streambuf* p = .....;
rdbuf() [2/2]
Returns
rdstate()
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1339
Returns
See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good().
Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(
std::basic_ios< _CharT, _Traits >::good(), and std::basic_ios< _CharT, _Traits >::setstate().
register_callback()
void std::ios_base::register_callback (
event_callback __fn,
int __index) [inherited]
Add the callback __fn with parameter __index.
Parameters
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple
copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
seekp() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(off,dir). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
seekp() [2/2]
Parameters
Generated by Doxygen
1340
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(pos). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
setf() [1/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
setf() [2/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl,
fmtflags __mask) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base←-
::adjustfield.
setstate()
Parameters
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1341
sync_with_stdio()
Parameters
__sync Whether to synchronize or not.
Returns
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the stan-
dard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.←-
org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
tellp()
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out).
References std::ios_base::cur, std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::out, and std::basic_ios< _CharT, _Traits >::rdbuf()
tie() [1/2]
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream
is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().
Generated by Doxygen
1342
tie() [2/2]
Parameters
__tiestr The output stream.
Returns
The previously tied output stream, or NULL if the stream was not tied.
unsetf()
void std::ios_base::unsetf (
fmtflags __mask) [inline], [inherited]
Clearing format flags.
Parameters
widen()
Parameters
_←- The character to widen.
_c
Returns
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1343
width() [1/2]
Returns
width() [2/2]
streamsize std::ios_base::width (
streamsize __wide) [inline], [inherited]
Changing flags.
Parameters
__wide The new width value.
Returns
write()
Parameters
_←- The array to insert.
_s
_←- Maximum number of characters to insert.
_n
Returns
∗this
Characters are copied from __s and inserted into the stream until one of the following happens:
• inserting into the output sequence fails (in this case, badbit will be set in the stream's error state)
Note
Generated by Doxygen
1344
xalloc()
Returns
This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to
be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain
an index in the iword and pword arrays that can be used without fear of conflict.
The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed
to return an index that is safe to use in the iword and pword arrays.
adjustfield
app
ate
badbit
basefield
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1345
beg
binary
boolalpha
cur
dec
end
eofbit
Generated by Doxygen
1346
failbit
fixed
floatfield
goodbit
hex
in
Generated by Doxygen
5.245 std::basic_ofstream< _CharT, _Traits > Class Template Reference 1347
internal
left
oct
out
right
scientific
showbase
showpoint
Generated by Doxygen
1348
showpos
skipws
trunc
unitbuf
uppercase
• fstream
• iosfwd
std::basic_fstream
< _CharT, _Traits >
std::basic_iostream
< _CharT, _Traits >
std::basic_stringstream
< _CharT, _Traits, _Alloc >
std::basic_ios< _CharT, std::basic_ostream std::basic_ofstream
std::ios_base
_Traits > < _CharT, _Traits > < _CharT, _Traits >
std::basic_ostringstream
< _CharT, _Traits, _Alloc >
Classes
• class sentry
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1349
Public Types
Generated by Doxygen
1350
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1351
Protected Types
• enum { _S_local_word_size }
Generated by Doxygen
1352
Protected Attributes
• _Callback_list ∗ _M_callbacks
• const __ctype_type ∗ _M_ctype
• iostate _M_exception
• char_type _M_fill
• bool _M_fill_init
• fmtflags _M_flags
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
• const __num_get_type ∗ _M_num_get
• const __num_put_type ∗ _M_num_put
• streamsize _M_precision
• basic_streambuf< _CharT, _Traits > ∗ _M_streambuf
• iostate _M_streambuf_state
• basic_ostream< _CharT, _Traits > ∗ _M_tie
• streamsize _M_width
• _Words ∗ _M_word
• int _M_word_size
• _Words _M_word_zero
Friends
• class sentry
Template Parameters
This is the base class for all output streams. It provides text formatting of all builtin types, and communicates with any
class derived from basic_streambuf to do the actual output.
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1353
__num_get_type
event_callback
Parameters
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
iostate
• eofbit
• failbit
• goodbit
openmode
• ate
• binary
• in
• out
• trunc
Generated by Doxygen
1354
seekdir
• beg
event
basic_ostream()
∼basic_ostream()
template<typename _CharT , typename _Traits >
virtual std::basic_ostream< _CharT, _Traits >::∼basic_ostream () [inline], [virtual]
Base destructor.
This does very little apart from providing a virtual base dtor.
_M_getloc()
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1355
bad()
Returns
clear()
Parameters
See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.
Referenced by std::basic_ios< _CharT, _Traits >::exceptions(), std::__detail::operator>>(), and std::basic_ios< _CharT, _Traits >::setsta
copyfmt()
Parameters
Returns
All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword
and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new)
callback is invoked with copyfmt_event. The final step is to copy exceptions().
References std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(),
std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(),
std::tie(), and std::ios_base::width().
eof()
Generated by Doxygen
1356
Returns
exceptions() [1/2]
Returns
This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return
value.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
exceptions() [2/2]
Parameters
__except The new exceptions mask.
By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set
in the error flags, then an exception of type std::ios_base::failure is thrown.
If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the
following under GCC 3.1 or later:
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
std::ifstream f ("/etc/motd");
fail()
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1357
Returns
Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.
References std::ios_base::badbit, std::ios_base::failbit, and std::basic_ios< _CharT, _Traits >::rdstate().
Referenced by std::basic_ios< _CharT, _Traits >::operator bool(), std::basic_ios< _CharT, _Traits >::operator!(),
std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >
and std::regex_traits< typename >::value().
fill() [1/2]
Returns
fill() [2/2]
Parameters
__ch The new character.
Returns
The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are
actually used, and Q<P. It defaults to a space (' ') in the current locale.
flags() [1/2]
Returns
Generated by Doxygen
1358
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once.
Parameters
Returns
flush()
Returns
∗this
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
good()
Returns
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1359
imbue()
Parameters
__loc The new locale.
Returns
Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that buffer's
pubimbue(loc).
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.←-
html
References std::ios_base::imbue().
Referenced by std::chrono::operator<<().
init()
iword()
Parameters
_←- Index into the array.
_ix
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
narrow()
Generated by Doxygen
1360
char_type __c,
char __dfault) const [inline], [inherited]
Squeezes characters.
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1361
Parameters
__c The character to narrow.
__dfault The character to narrow.
Returns
operator bool()
operator"!()
operator<<() [1/17]
operator<<() [2/17]
operator<<() [3/17]
Generated by Doxygen
1362
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from __sb and inserted into ∗this until one of the following occurs:
• insertion into the output sequence fails (in this case, the character that would have been inserted is not extracted),
or
• an exception occurs while getting a character from __sb, which sets failbit in the error state
operator<<() [4/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [5/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1363
operator<<() [6/17]
Generated by Doxygen
1364
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [7/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [8/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1365
operator<<() [9/17]
operator<<() [10/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [12/17]
Generated by Doxygen
1366
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [13/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
References std::ios_base::badbit, std::ios_base::goodbit, std::num_put< _CharT, _OutIter >::put(), std::basic_ios< _CharT, _Traits >::se
and std::use_facet().
operator<<() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [15/17]
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1367
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
precision() [1/2]
Generated by Doxygen
1368
precision() [2/2]
streamsize std::ios_base::precision (
streamsize __prec) [inline], [inherited]
Changing flags.
Parameters
__prec The new precision value.
Returns
put()
Parameters
_←- The character to insert.
_c
Returns
∗this
References std::ios_base::badbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >
pword()
Parameters
_←- Index into the array.
_ix
Returns
The pword function provides access to an array of pointers that can be used for any purpose. The array grows as
required to hold the supplied index. All pointers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1369
rdbuf() [1/2]
rdbuf() [2/2]
Parameters
Returns
rdstate()
register_callback()
void std::ios_base::register_callback (
event_callback __fn,
int __index) [inherited]
Add the callback __fn with parameter __index.
Generated by Doxygen
1370
Parameters
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple
copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
seekp() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(off,dir). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
seekp() [2/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(pos). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
setf() [1/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags.
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1371
Parameters
Returns
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
setf() [2/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl,
fmtflags __mask) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base←-
::adjustfield.
setstate()
Parameters
sync_with_stdio()
Generated by Doxygen
1372
Parameters
__sync Whether to synchronize or not.
Returns
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the stan-
dard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.←-
org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
tellp()
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out).
References std::ios_base::cur, std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::out, and std::basic_ios< _CharT, _Traits >::rdbuf()
tie() [1/2]
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream
is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().
tie() [2/2]
Parameters
__tiestr The output stream.
Returns
The previously tied output stream, or NULL if the stream was not tied.
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1373
unsetf()
void std::ios_base::unsetf (
fmtflags __mask) [inline], [inherited]
Clearing format flags.
Parameters
widen()
Parameters
_←- The character to widen.
_c
Returns
width() [1/2]
width() [2/2]
streamsize std::ios_base::width (
streamsize __wide) [inline], [inherited]
Changing flags.
Parameters
__wide The new width value.
Generated by Doxygen
1374
Returns
write()
Parameters
_←- The array to insert.
_s
_←- Maximum number of characters to insert.
_n
Returns
∗this
Characters are copied from __s and inserted into the stream until one of the following happens:
• inserting into the output sequence fails (in this case, badbit will be set in the stream's error state)
Note
xalloc()
Returns
This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to
be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain
an index in the iword and pword arrays that can be used without fear of conflict.
The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed
to return an index that is safe to use in the iword and pword arrays.
adjustfield
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1375
app
ate
badbit
basefield
beg
binary
boolalpha
Generated by Doxygen
1376
cur
dec
end
eofbit
failbit
fixed
floatfield
Generated by Doxygen
5.246 std::basic_ostream< _CharT, _Traits > Class Template Reference 1377
goodbit
hex
in
internal
left
oct
Generated by Doxygen
1378
out
right
scientific
showbase
showpoint
showpos
skipws
trunc
unitbuf
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1379
uppercase
• iosfwd
• ostream.h
• ostream.tcc
std::ios_base
std::basic_ios< _CharT,
_Traits >
std::basic_ostream
< _CharT, _Traits >
std::basic_ostringstream
< _CharT, _Traits, _Alloc >
Public Types
Generated by Doxygen
1380
• basic_ostringstream ()
• basic_ostringstream (__string_type &&__str, ios_base::openmode __mode=ios_base::out)
• basic_ostringstream (basic_ostringstream &&__rhs)
• basic_ostringstream (const __string_type &__str, ios_base::openmode __mode=ios_base::out)
• basic_ostringstream (const basic_ostringstream &)=delete
• template<typename _SAlloc >
basic_ostringstream (const basic_string< _CharT, _Traits, _SAlloc > &__str, const allocator_type &__a)
• template<typename _SAlloc >
basic_ostringstream (const basic_string< _CharT, _Traits, _SAlloc > &__str, ios_base::openmode __mode,
const allocator_type &__a)
• template<typename _SAlloc >
basic_ostringstream (const basic_string< _CharT, _Traits, _SAlloc > &__str, ios_base::openmode __←-
mode=ios_base::out)
• basic_ostringstream (ios_base::openmode __mode)
• basic_ostringstream (ios_base::openmode __mode, const allocator_type &__a)
• ∼basic_ostringstream ()
• const locale & _M_getloc () const
• template<typename _ValueT >
basic_ostream< _CharT, _Traits > & _M_insert (_ValueT __v)
• void _M_setstate (iostate __state)
• bool bad () const
• void clear (iostate __state=goodbit)
• basic_ios & copyfmt (const basic_ios &__rhs)
• bool eof () const
• iostate exceptions () const
• void exceptions (iostate __except)
• bool fail () const
• char_type fill () const
• char_type fill (char_type __ch)
• fmtflags flags () const
• fmtflags flags (fmtflags __fmtfl)
• __ostream_type & flush ()
• locale getloc () const
• bool good () const
• locale imbue (const locale &__loc)
• long & iword (int __ix)
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1381
Inserters
All the operator<< functions (aka formatted output functions) have some common behavior. Each starts by
constructing a temporary object of type std::basic_ostream::sentry. This can have several effects, concluding with
the setting of a status flag; see the sentry documentation for more.
If the sentry status is good, the function tries to generate whatever data is appropriate for the type of the argument.
If an exception is thrown during insertion, ios_base::badbit will be turned on in the stream's error state without
causing an ios_base::failure to be thrown. The original exception will then be rethrown.
Generated by Doxygen
1382
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1383
Protected Types
• enum { _S_local_word_size }
Protected Attributes
• _Callback_list ∗ _M_callbacks
• const __ctype_type ∗ _M_ctype
• iostate _M_exception
• char_type _M_fill
• bool _M_fill_init
• fmtflags _M_flags
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
• const __num_get_type ∗ _M_num_get
• const __num_put_type ∗ _M_num_put
• streamsize _M_precision
• basic_streambuf< _CharT, _Traits > ∗ _M_streambuf
• iostate _M_streambuf_state
• basic_ostream< _CharT, _Traits > ∗ _M_tie
Generated by Doxygen
1384
• streamsize _M_width
• _Words ∗ _M_word
• int _M_word_size
• _Words _M_word_zero
Template Parameters
This class supports writing to objects of type std::basic_string, using the inherited functions from std::basic_ostream. To
control the associated sequence, an instance of std::basic_stringbuf is used, which this page refers to as sb.
__num_get_type
event_callback
Parameters
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
iostate
• badbit
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1385
• eofbit
• failbit
• goodbit
openmode
• app
• ate
• binary
• in
• out
• trunc
seekdir
event
basic_ostringstream() [1/3]
Generated by Doxygen
1386
basic_ostringstream() [2/3]
Parameters
basic_ostringstream() [3/3]
Parameters
∼basic_ostringstream()
template<typename _CharT , typename _Traits , typename _Alloc >
std::basic_ostringstream< _CharT, _Traits, _Alloc >::∼basic_ostringstream () [inline]
The destructor does nothing.
The buffer is deallocated by the stringbuf object, not the formatting stream.
_M_getloc()
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1387
bad()
Returns
clear()
Parameters
See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.
Referenced by std::basic_ios< _CharT, _Traits >::exceptions(), std::__detail::operator>>(), and std::basic_ios< _CharT, _Traits >::setsta
copyfmt()
Parameters
Returns
All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword
and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new)
callback is invoked with copyfmt_event. The final step is to copy exceptions().
References std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(),
std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(),
std::tie(), and std::ios_base::width().
eof()
Generated by Doxygen
1388
Returns
exceptions() [1/2]
Returns
This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return
value.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
exceptions() [2/2]
Parameters
__except The new exceptions mask.
By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set
in the error flags, then an exception of type std::ios_base::failure is thrown.
If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the
following under GCC 3.1 or later:
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
std::ifstream f ("/etc/motd");
fail()
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1389
Returns
Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.
References std::ios_base::badbit, std::ios_base::failbit, and std::basic_ios< _CharT, _Traits >::rdstate().
Referenced by std::basic_ios< _CharT, _Traits >::operator bool(), std::basic_ios< _CharT, _Traits >::operator!(),
std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >
and std::regex_traits< typename >::value().
fill() [1/2]
Returns
fill() [2/2]
Parameters
__ch The new character.
Returns
The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are
actually used, and Q<P. It defaults to a space (' ') in the current locale.
flags() [1/2]
Returns
Generated by Doxygen
1390
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once.
Parameters
Returns
flush()
Returns
∗this
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
good()
Returns
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1391
imbue()
Parameters
__loc The new locale.
Returns
Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that buffer's
pubimbue(loc).
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.←-
html
References std::ios_base::imbue().
Referenced by std::chrono::operator<<().
init()
iword()
Parameters
_←- Index into the array.
_ix
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
narrow()
Generated by Doxygen
1392
char_type __c,
char __dfault) const [inline], [inherited]
Squeezes characters.
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1393
Parameters
__c The character to narrow.
__dfault The character to narrow.
Returns
operator bool()
operator"!()
operator<<() [1/17]
operator<<() [2/17]
operator<<() [3/17]
Generated by Doxygen
1394
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from __sb and inserted into ∗this until one of the following occurs:
• insertion into the output sequence fails (in this case, the character that would have been inserted is not extracted),
or
• an exception occurs while getting a character from __sb, which sets failbit in the error state
operator<<() [4/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [5/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1395
operator<<() [6/17]
Generated by Doxygen
1396
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [7/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [8/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1397
operator<<() [9/17]
operator<<() [10/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [12/17]
Generated by Doxygen
1398
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [13/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
References std::ios_base::badbit, std::ios_base::goodbit, std::num_put< _CharT, _OutIter >::put(), std::basic_ios< _CharT, _Traits >::se
and std::use_facet().
operator<<() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [15/17]
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1399
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
precision() [1/2]
Generated by Doxygen
1400
precision() [2/2]
streamsize std::ios_base::precision (
streamsize __prec) [inline], [inherited]
Changing flags.
Parameters
__prec The new precision value.
Returns
put()
Parameters
_←- The character to insert.
_c
Returns
∗this
References std::ios_base::badbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >
pword()
Parameters
_←- Index into the array.
_ix
Returns
The pword function provides access to an array of pointers that can be used for any purpose. The array grows as
required to hold the supplied index. All pointers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1401
rdbuf() [1/2]
Parameters
Returns
Associates a new buffer with the current stream, and clears the error state.
Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is
hidden in derived classes by overrides of the zero-argument rdbuf(), which is non-virtual for hysterical raisins. As a
result, you must use explicit qualifications to access this function via any derived class. For example:
std::fstream foo; // or some other derived type
std::streambuf* p = .....;
rdbuf() [2/2]
Returns
rdstate()
See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good().
Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(
std::basic_ios< _CharT, _Traits >::good(), and std::basic_ios< _CharT, _Traits >::setstate().
register_callback()
void std::ios_base::register_callback (
event_callback __fn,
int __index) [inherited]
Add the callback __fn with parameter __index.
Generated by Doxygen
1402
Parameters
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple
copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
seekp() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(off,dir). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
seekp() [2/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(pos). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
setf() [1/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags.
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1403
Parameters
Returns
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
setf() [2/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl,
fmtflags __mask) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base←-
::adjustfield.
setstate()
Parameters
str() [1/2]
Generated by Doxygen
1404
Returns
rdbuf()->str()
str() [2/2]
Parameters
_←- The string to use as a new sequence.
_s
Calls rdbuf()->str(s).
sync_with_stdio()
Parameters
__sync Whether to synchronize or not.
Returns
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the stan-
dard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.←-
org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
tellp()
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out).
References std::ios_base::cur, std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::out, and std::basic_ios< _CharT, _Traits >::rdbuf()
tie() [1/2]
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1405
Returns
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream
is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().
tie() [2/2]
Parameters
__tiestr The output stream.
Returns
The previously tied output stream, or NULL if the stream was not tied.
unsetf()
void std::ios_base::unsetf (
fmtflags __mask) [inline], [inherited]
Clearing format flags.
Parameters
widen()
Parameters
_←- The character to widen.
_c
Returns
Generated by Doxygen
1406
width() [1/2]
Returns
width() [2/2]
streamsize std::ios_base::width (
streamsize __wide) [inline], [inherited]
Changing flags.
Parameters
__wide The new width value.
Returns
write()
Parameters
_←- The array to insert.
_s
_←- Maximum number of characters to insert.
_n
Returns
∗this
Characters are copied from __s and inserted into the stream until one of the following happens:
• inserting into the output sequence fails (in this case, badbit will be set in the stream's error state)
Note
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1407
xalloc()
Returns
This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to
be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain
an index in the iword and pword arrays that can be used without fear of conflict.
The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed
to return an index that is safe to use in the iword and pword arrays.
adjustfield
app
ate
badbit
basefield
Generated by Doxygen
1408
beg
binary
boolalpha
cur
dec
end
eofbit
Generated by Doxygen
5.247 std::basic_ostringstream< _CharT, _Traits, _Alloc > Class Template Reference 1409
failbit
fixed
floatfield
goodbit
hex
in
Generated by Doxygen
1410
internal
left
oct
out
right
scientific
showbase
showpoint
Generated by Doxygen
5.248 std::basic_regex< _Ch_type, _Rx_traits > Class Template Reference 1411
showpos
skipws
trunc
unitbuf
uppercase
• iosfwd
• sstream
Public Types
• basic_regex () noexcept
• template<typename _FwdIter >
basic_regex (_FwdIter __first, _FwdIter __last, flag_type __f=ECMAScript)
• basic_regex (basic_regex &&__rhs) noexcept=default
• basic_regex (const _Ch_type ∗__p, flag_type __f=ECMAScript)
• basic_regex (const _Ch_type ∗__p, std::size_t __len, flag_type __f=ECMAScript)
• basic_regex (const basic_regex &__rhs)=default
Generated by Doxygen
1412
Constants
std [28.8.1](1)
Friends
Related Symbols
Generated by Doxygen
5.248 std::basic_regex< _Ch_type, _Rx_traits > Class Template Reference 1413
A regular expression.
Specializations of this class template represent regular expressions constructed from sequences of character type _←-
Ch_type. Use the std::regex typedef for std::basic_regex<char>.
A character sequence passed to the constructor will be parsed according to the chosen grammar, and used to create
a state machine representing the regular expression. The regex object can then be passed to algorithms such as
std::regex_match to match sequences of characters.
The syntax_option_type flag passed to the constructor selects from one of the supported regular expression
grammars. The default is ECMAScript and the others are basic, extended, awk, grep, and egrep, which are
variations on POSIX regular expressions.
Since
C++11
basic_regex() [1/8]
basic_regex() [2/8]
Parameters
_←- A pointer to the start of a C-style null-terminated string containing a regular expression.
_p
_←- Flags indicating the syntax rules and options.
_f
Exceptions
basic_regex() [3/8]
Generated by Doxygen
1414
Parameters
Exceptions
basic_regex() [4/8]
Parameters
__rhs A regex object.
basic_regex() [5/8]
Parameters
__rhs A regex object.
basic_regex() [6/8]
Parameters
_←- A string containing a regular expression.
_s
_←- Flags indicating the syntax rules and options.
_f
Generated by Doxygen
5.248 std::basic_regex< _Ch_type, _Rx_traits > Class Template Reference 1415
Exceptions
basic_regex() [7/8]
Parameters
Exceptions
basic_regex() [8/8]
Parameters
←- The initializer list.
_←-
←-
_←-
l
←- The format flags of the regular expression.
_←-
←-
_←-
f
Exceptions
Generated by Doxygen
1416
∼basic_regex()
template<typename _Ch_type , typename _Rx_traits = regex_traits<_Ch_type>>
std::basic_regex< _Ch_type, _Rx_traits >::∼basic_regex () [inline]
Destroys a basic regular expression.
assign() [1/7]
Parameters
Exceptions
regex_error if p does not contain a valid regular expression pattern interpreted according to __flags. If
regex_error is thrown, the object remains unchanged.
assign() [2/7]
Parameters
__rhs Another regular expression object.
References std::move().
assign() [3/7]
Generated by Doxygen
5.248 std::basic_regex< _Ch_type, _Rx_traits > Class Template Reference 1417
Parameters
Exceptions
regex_error if __p does not contain a valid regular expression pattern interpreted according to __flags. If
regex_error is thrown, ∗this remains unchanged.
assign() [4/7]
Parameters
Exceptions
regex_error if p does not contain a valid regular expression pattern interpreted according to __flags. If
regex_error is thrown, ∗this remains unchanged.
assign() [5/7]
Parameters
__rhs Another regular expression object.
Generated by Doxygen
1418
assign() [6/7]
Parameters
__s A string containing a regular expression pattern.
__flags Syntax option flags.
Exceptions
regex_error if __s does not contain a valid regular expression pattern interpreted according to __flags. If
regex_error is thrown, ∗this remains unchanged.
References std::basic_string< _CharT, _Traits, _Alloc >::data(), and std::basic_string< _CharT, _Traits, _Alloc >::size().
assign() [7/7]
Parameters
__l An initializer list representing a regular expression.
__flags Syntax option flags.
Exceptions
regex_error if __l does not contain a valid regular expression pattern interpreted according to __flags. If
regex_error is thrown, the object remains unchanged.
flags()
getloc()
Generated by Doxygen
5.248 std::basic_regex< _Ch_type, _Rx_traits > Class Template Reference 1419
imbue()
Parameters
__loc A locale.
mark_count()
operator=() [1/5]
operator=() [2/5]
Parameters
_←- A pointer to the start of a null-terminated C-style string containing a regular expression.
_p
operator=() [3/5]
operator=() [4/5]
Generated by Doxygen
1420
Parameters
_←- A pointer to a string containing a regular expression.
_s
operator=() [5/5]
Parameters
←- The initializer list.
_←-
←-
_←-
l
Exceptions
swap()
Parameters
__rhs Another regular expression object.
The documentation for this class was generated from the following file:
• regex.h
Generated by Doxygen
5.249 std::basic_streambuf< _CharT, _Traits > Class Template Reference 1421
__gnu_cxx::stdio_sync
_filebuf< _CharT, _Traits >
std::basic_filebuf __gnu_cxx::stdio_filebuf
< _CharT, _Traits > < _CharT, _Traits >
std::basic_streambuf
< _CharT, _Traits >
std::basic_stringbuf
< _CharT, _Traits, _Alloc >
std::wbuffer_convert
< _Codecvt, _Elem, _Tr >
Public Types
• virtual ∼basic_streambuf ()
• locale getloc () const
• streamsize in_avail ()
• locale pubimbue (const locale &__loc)
• int_type sbumpc ()
• int_type sgetc ()
• streamsize sgetn (char_type ∗__s, streamsize __n)
• int_type snextc ()
• int_type sputbackc (char_type __c)
• int_type sputc (char_type __c)
• streamsize sputn (const char_type ∗__s, streamsize __n)
• int_type sungetc ()
Generated by Doxygen
1422
• basic_streambuf ()
• basic_streambuf (const basic_streambuf &)
• void __safe_gbump (streamsize __n)
• void __safe_pbump (streamsize __n)
• void gbump (int __n)
• virtual void imbue (const locale &__loc)
• basic_streambuf & operator= (const basic_streambuf &)
• virtual int_type overflow (int_type __c=traits_type::eof())
• virtual int_type pbackfail (int_type __c=traits_type::eof())
• void pbump (int __n)
• virtual pos_type seekoff (off_type, ios_base::seekdir, ios_base::openmode=ios_base::in|ios_base::out)
• virtual pos_type seekpos (pos_type, ios_base::openmode=ios_base::in|ios_base::out)
• virtual basic_streambuf< char_type, _Traits > ∗ setbuf (char_type ∗, streamsize)
• void setg (char_type ∗__gbeg, char_type ∗__gnext, char_type ∗__gend)
• void setp (char_type ∗__pbeg, char_type ∗__pend)
• virtual streamsize showmanyc ()
• void swap (basic_streambuf &__sb)
• virtual int sync ()
• virtual int_type uflow ()
• virtual int_type underflow ()
• virtual streamsize xsgetn (char_type ∗__s, streamsize __n)
• virtual streamsize xsputn (const char_type ∗__s, streamsize __n)
Protected Attributes
• locale _M_buf_locale
• char_type ∗ _M_in_beg
• char_type ∗ _M_in_cur
• char_type ∗ _M_in_end
• char_type ∗ _M_out_beg
• char_type ∗ _M_out_cur
• char_type ∗ _M_out_end
Generated by Doxygen
5.249 std::basic_streambuf< _CharT, _Traits > Class Template Reference 1423
Friends
Template Parameters
This is a base class. Derived stream buffers each control a pair of character sequences: one for input, and one for
output.
Section [27.5.1] of the standard describes the requirements and behavior of stream buffer classes. That section (three
paragraphs) is reproduced here, for simplicity and accuracy.
1. Stream buffers can impose various constraints on the sequences they control. Some constraints are:
Generated by Doxygen
1424
2. Each sequence is characterized by three pointers which, if non-null, all point into the same charT array ob-
ject. The array object represents, at any moment, a (sub)sequence of characters from the sequence. Operations
performed on a sequence alter the values stored in these pointers, perform reads and writes directly to or from as-
sociated sequences, and alter the stream position and conversion state as needed to maintain this subsequence
relationship. The three pointers are:
• the beginning pointer, or lowest element address in the array (called xbeg here);
• the next pointer, or next element address that is a current candidate for reading or writing (called xnext here);
• the end pointer, or first element address beyond the end of the array (called xend here).
3. The following semantic constraints shall always apply for any set of three pointers for a sequence, using the
pointer names given immediately above:
• If xnext is not a null pointer, then xbeg and xend shall also be non-null pointers into the same charT array,
as described above; otherwise, xbeg and xend shall also be null.
• If xnext is not a null pointer and xnext < xend for an output sequence, then a write position is available. In
this case, ∗xnext shall be assignable as the next element to write (to put, or to store a character value, into
the sequence).
• If xnext is not a null pointer and xbeg < xnext for an input sequence, then a putback position is available. In
this case, xnext[-1] shall have a defined value and is the next (preceding) element to store a character that
is put back into the input sequence.
• If xnext is not a null pointer and xnext< xend for an input sequence, then a read position is available. In
this case, ∗xnext shall have a defined value and is the next element to read (to get, or to obtain a character
value, from the sequence).
__streambuf_type
char_type
int_type
off_type
Generated by Doxygen
5.249 std::basic_streambuf< _CharT, _Traits > Class Template Reference 1425
pos_type
traits_type
∼basic_streambuf()
template<typename _CharT , typename _Traits >
virtual std::basic_streambuf< _CharT, _Traits >::∼basic_streambuf () [inline], [virtual]
Destructor deallocates no buffer space.
basic_streambuf()
eback()
egptr()
Generated by Doxygen
1426
epptr()
gbump()
Parameters
_←- The delta by which to move.
_n
This just advances the read position without returning any data.
getloc()
If pubimbue(loc) has been called, then the most recent loc is returned. Otherwise the global locale in effect at the time
of construction is returned.
gptr()
Generated by Doxygen
5.249 std::basic_streambuf< _CharT, _Traits > Class Template Reference 1427
imbue()
Parameters
__loc A new locale.
Translations done during I/O which depend on the current locale are changed by this call. The standard adds, Between
invocations of this function a class derived from streambuf can safely cache results of calls to locale functions and to
members of facets so obtained.
Note
Reimplemented in std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, encoding_char_traits< _CharT > >,
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, and std::basic_filebuf< char_type, traits_type >.
in_avail()
Returns
If a read position is available, returns the number of characters available for reading before the buffer must be refilled.
Otherwise returns the derived showmanyc().
overflow()
Parameters
_←- An additional character to consume.
_c
Returns
Informally, this function is called when the output buffer is full (or does not exist, as buffering need not actually be done).
If a buffer exists, it is consumed, with some effect on the controlled sequence. (Typically, the buffer is written out to the
sequence verbatim.) In either case, the character c is also written out, if __c is not eof().
For a formal definition of this function, see a good text such as Langer & Kreft, or [27.5.2.4.5]/3-7.
A functioning output streambuf can be created by overriding only this function (no buffer area will be used).
Generated by Doxygen
1428
Note
Reimplemented in __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, e
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, std::basic_filebuf< char_type, traits_type >, std::basic_stringbuf< _CharT, _T
and std::wbuffer_convert< _Codecvt, _Elem, _Tr >.
pbackfail()
Parameters
_←- The character to be inserted back into the sequence.
_c
Returns
Postcondition
The constraints of gptr(), eback(), and pptr() are the same as for underflow().
Note
Reimplemented in __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, e
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, std::basic_filebuf< char_type, traits_type >, and std::basic_stringbuf< _CharT
pbase()
pbump()
Generated by Doxygen
5.249 std::basic_streambuf< _CharT, _Traits > Class Template Reference 1429
Parameters
_←- The delta by which to move.
_n
This just advances the write position without returning any data.
pptr()
pubimbue()
Parameters
__loc The new locale.
Returns
pubseekoff()
Parameters
__off Offset.
__way Value for ios_base::seekdir.
__mode Value for ios_base::openmode.
Generated by Doxygen
1430
pubseekpos()
Parameters
__sp Position
__mode Value for ios_base::openmode.
pubsetbuf()
pubsync()
sbumpc()
Returns
If the input read position is available, returns that character and increments the read pointer, otherwise calls and returns
uflow().
Referenced by std::basic_istream< _CharT, _Traits >::getline(), std::istreambuf_iterator< _CharT, _Traits >::operator++(),
and std::istreambuf_iterator< _CharT, _Traits >::operator++().
seekoff()
Generated by Doxygen
5.249 std::basic_streambuf< _CharT, _Traits > Class Template Reference 1431
Note
Base class version does nothing, returns a pos_type that represents an invalid stream position.
Reimplemented in std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, encoding_char_traits< _CharT > >,
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, std::basic_filebuf< char_type, traits_type >, and std::basic_stringbuf< _CharT
seekpos()
Note
Base class version does nothing, returns a pos_type that represents an invalid stream position.
Reimplemented in std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, encoding_char_traits< _CharT > >,
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, std::basic_filebuf< char_type, traits_type >, and std::basic_stringbuf< _CharT
setbuf()
Reimplemented in std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, encoding_char_traits< _CharT > >,
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, std::basic_filebuf< char_type, traits_type >, and std::basic_stringbuf< _CharT
setg()
Parameters
__gbeg A pointer.
__gnext A pointer.
__gend A pointer.
Generated by Doxygen
1432
Postcondition
setp()
Parameters
__pbeg A pointer.
__pend A pointer.
Postcondition
sgetc()
Returns
If the input read position is available, returns that character, otherwise calls and returns underflow(). Does not
move the read position after fetching the character.
Referenced by std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::getline(),
std::basic_istream< _CharT, _Traits >::ignore(), std::basic_istream< _CharT, _Traits >::ignore(), std::istreambuf_iterator< _CharT, _Trait
and std::istreambuf_iterator< _CharT, _Traits >::operator++().
sgetn()
Parameters
Returns xsgetn(__s,__n). The effect is to fill __s[0] through __s[__n-1] with characters from the input sequence, if
possible.
Generated by Doxygen
5.249 std::basic_streambuf< _CharT, _Traits > Class Template Reference 1433
showmanyc()
Returns
If it returns a positive value, then successive calls to underflow() will not return traits::eof() until at least that
number of characters have been supplied. If showmanyc() returns -1, then calls to underflow() or uflow()
will fail. [27.5.2.4.3]/1
Note
Reimplemented in std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, encoding_char_traits< _CharT > >,
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, std::basic_filebuf< char_type, traits_type >, and std::basic_stringbuf< _CharT
snextc()
Returns
Calls sbumpc(), and if that function returns traits::eof(), so does this function. Otherwise, sgetc().
Referenced by std::basic_istream< _CharT, _Traits >::getline(), std::basic_istream< _CharT, char_traits< _CharT > >::ignore(),
std::basic_istream< _CharT, char_traits< _CharT > >::operator>>(), and std::basic_istream< _CharT, char_traits< _CharT > >::putba
sputbackc()
Parameters
_←- The character to push back.
_c
Returns
Similar to sungetc(), but __c is pushed onto the stream instead of the previous character. If successful, the next character
fetched from the input stream will be __c.
Referenced by std::basic_istream< _CharT, _Traits >::putback().
Generated by Doxygen
1434
sputc()
Parameters
_←- A character to output.
_c
Returns
__c, if possible.
sputn()
Parameters
sungetc()
Returns
If a putback position is available, this function decrements the input pointer and returns that character. Otherwise, calls
and returns pbackfail(). The effect is to unget the last character gotten.
Referenced by std::basic_istream< _CharT, char_traits< _CharT > >::sentry::sentry().
Generated by Doxygen
5.249 std::basic_streambuf< _CharT, _Traits > Class Template Reference 1435
sync()
Returns
-1 on failure.
Each derived class provides its own appropriate behavior, including the definition of failure.
Note
Reimplemented in __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, e
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, std::basic_filebuf< char_type, traits_type >, and std::wbuffer_convert< _Code
uflow()
Returns
Informally, this function does the same thing as underflow(), and in fact is required to call that function. It also
returns the new character, like underflow() does. However, this function also moves the read position forward by
one.
Reimplemented in __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >.
underflow()
Returns
Informally, this function is called when the input buffer is exhausted (or does not exist, as buffering need not actually be
done). If a buffer exists, it is refilled. In either case, the next available character is returned, or traits::eof() to
indicate a null pending sequence.
For a formal definition of the pending sequence, see a good text such as Langer & Kreft, or [27.5.2.4.3]/7-14.
A functioning input streambuf can be created by overriding only this function (no buffer area will be used). For an
example, see https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.html
Note
Reimplemented in __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, e
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, std::basic_filebuf< char_type, traits_type >, std::basic_stringbuf< _CharT, _T
and std::wbuffer_convert< _Codecvt, _Elem, _Tr >.
Generated by Doxygen
1436
xsgetn()
Parameters
Returns
Fills __s[0] through __s[__n-1] with characters from the input sequence, as if by sbumpc(). Stops when either __n
characters have been copied, or when traits::eof() would be copied.
It is expected that derived classes provide a more efficient implementation by overriding this definition.
Reimplemented in std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, encoding_char_traits< _CharT > >,
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, and std::basic_filebuf< char_type, traits_type >.
References std::min().
xsputn()
Parameters
Returns
Writes __s[0] through __s[__n-1] to the output sequence, as if by sputc(). Stops when either n characters have been
copied, or when sputc() would return traits::eof().
It is expected that derived classes provide a more efficient implementation by overriding this definition.
Reimplemented in std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, encoding_char_traits< _CharT > >,
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, and std::basic_filebuf< char_type, traits_type >.
References std::min().
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1437
_M_buf_locale
_M_in_beg
_M_in_cur
_M_in_end
_M_out_beg
_M_out_cur
_M_out_end
• iosfwd
• streambuf
• streambuf.tcc
Generated by Doxygen
1438
__gnu_debug::_Safe
_container< _SafeContainer,
_Alloc, _SafeBase, _IsCxx11Allocator
Aware > __gnu_debug::basic
_string< _CharT, _Traits,
_Allocator >
std::basic_string<
_CharT, _Traits, _Alloc >
Public Types
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1439
Generated by Doxygen
1440
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1441
• constexpr size_type find_first_of (const _CharT ∗__s, size_type __pos, size_type __n) const noexcept
• constexpr size_type find_first_of (const _CharT ∗__s, size_type __pos=0) const noexcept
• template<typename _Tp >
constexpr _If_sv< _Tp, size_type > find_first_of (const _Tp &__svt, size_type __pos=0) const noexcept(is_←-
same< _Tp, __sv_type >::value)
• constexpr size_type find_first_of (const basic_string &__str, size_type __pos=0) const noexcept
• constexpr size_type find_last_not_of (_CharT __c, size_type __pos=npos) const noexcept
• constexpr size_type find_last_not_of (const _CharT ∗__s, size_type __pos, size_type __n) const noexcept
• constexpr size_type find_last_not_of (const _CharT ∗__s, size_type __pos=_Base::npos) const noexcept
• template<typename _Tp >
constexpr _If_sv< _Tp, size_type > find_last_not_of (const _Tp &__svt, size_type __pos=npos) const
noexcept(is_same< _Tp, __sv_type >::value)
• constexpr size_type find_last_not_of (const basic_string &__str, size_type __pos=npos) const noexcept
• constexpr size_type find_last_of (_CharT __c, size_type __pos=npos) const noexcept
• constexpr size_type find_last_of (const _CharT ∗__s, size_type __pos, size_type __n) const noexcept
• constexpr size_type find_last_of (const _CharT ∗__s, size_type __pos=_Base::npos) const noexcept
• template<typename _Tp >
constexpr _If_sv< _Tp, size_type > find_last_of (const _Tp &__svt, size_type __pos=npos) const noexcept(is←-
_same< _Tp, __sv_type >::value)
• constexpr size_type find_last_of (const basic_string &__str, size_type __pos=npos) const noexcept
• constexpr const_reference front () const noexcept
• constexpr reference front () noexcept
• constexpr allocator_type get_allocator () const noexcept
• iterator insert (__const_iterator __p, _CharT __c)
• template<typename _InputIterator >
iterator insert (__const_iterator __p, _InputIterator __first, _InputIterator __last)
• iterator insert (const_iterator __p, size_type __n, _CharT __c)
• iterator insert (const_iterator __p, std::initializer_list< _CharT > __l)
• basic_string & insert (size_type __pos, const _CharT ∗__s)
• basic_string & insert (size_type __pos, const _CharT ∗__s, size_type __n)
• basic_string & insert (size_type __pos, size_type __n, _CharT __c)
• basic_string & insert (size_type __pos1, const basic_string &__str)
• basic_string & insert (size_type __pos1, const basic_string &__str, size_type __pos2, size_type __n)
• constexpr iterator insert (__const_iterator __p, _CharT __c)
• template<class _InputIterator , typename = std::_RequireInputIter<_InputIterator>>
constexpr iterator insert (const_iterator __p, _InputIterator __beg, _InputIterator __end)
• constexpr iterator insert (const_iterator __p, initializer_list< _CharT > __l)
• constexpr iterator insert (const_iterator __p, size_type __n, _CharT __c)
• iterator insert (iterator __p, _CharT __c)
• template<class _InputIterator >
void insert (iterator __p, _InputIterator __beg, _InputIterator __end)
• void insert (iterator __p, initializer_list< _CharT > __l)
• void insert (iterator __p, size_type __n, _CharT __c)
• template<typename _Tp >
constexpr _If_sv< _Tp, basic_string & > insert (size_type __pos, const _Tp &__svt)
• template<typename _Tp >
constexpr _If_sv< _Tp, basic_string & > insert (size_type __pos1, const _Tp &__svt, size_type __pos2, size_←-
type __n=npos)
• constexpr basic_string & insert (size_type __pos1, const basic_string &__str)
• constexpr basic_string & insert (size_type __pos1, const basic_string &__str, size_type __pos2, size_type __←-
n=npos)
Generated by Doxygen
1442
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1443
• basic_string & replace (iterator __i1, iterator __i2, _CharT ∗__k1, _CharT ∗__k2)
• template<class _InputIterator >
basic_string & replace (iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2)
• basic_string & replace (iterator __i1, iterator __i2, const _CharT ∗__k1, const _CharT ∗__k2)
• basic_string & replace (iterator __i1, iterator __i2, const _CharT ∗__s)
• basic_string & replace (iterator __i1, iterator __i2, const _CharT ∗__s, size_type __n)
• basic_string & replace (iterator __i1, iterator __i2, const basic_string &__str)
• basic_string & replace (iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2)
• basic_string & replace (iterator __i1, iterator __i2, initializer_list< _CharT > __l)
• basic_string & replace (iterator __i1, iterator __i2, iterator __k1, iterator __k2)
• basic_string & replace (iterator __i1, iterator __i2, size_type __n, _CharT __c)
• template<typename _Tp >
constexpr _If_sv< _Tp, basic_string & > replace (size_type __pos, size_type __n, const _Tp &__svt)
• constexpr basic_string & replace (size_type __pos, size_type __n, const basic_string &__str)
• template<typename _Tp >
constexpr _If_sv< _Tp, basic_string & > replace (size_type __pos1, size_type __n1, const _Tp &__svt, size_type
__pos2, size_type __n2=npos)
• constexpr basic_string & replace (size_type __pos1, size_type __n1, const basic_string &__str, size_type __←-
pos2, size_type __n2=npos)
• constexpr void reserve ()
• constexpr void reserve (size_type __res_arg)
• void resize (size_type __n)
• void resize (size_type __n, _CharT __c)
• constexpr size_type rfind (_CharT __c, size_type __pos=npos) const noexcept
• constexpr size_type rfind (const _CharT ∗__s, size_type __pos, size_type __n) const
• constexpr size_type rfind (const _CharT ∗__s, size_type __pos=_Base::npos) const
• template<typename _Tp >
constexpr _If_sv< _Tp, size_type > rfind (const _Tp &__svt, size_type __pos=npos) const noexcept(is_same<
_Tp, __sv_type >::value)
• constexpr size_type rfind (const basic_string &__str, size_type __pos=npos) const noexcept
• void shrink_to_fit () noexcept
• constexpr size_type size () const noexcept
• constexpr bool starts_with (_CharT __x) const noexcept
• bool starts_with (_CharT __x) const noexcept
• constexpr bool starts_with (basic_string_view< _CharT, _Traits > __x) const noexcept
• bool starts_with (basic_string_view< _CharT, _Traits > __x) const noexcept
• constexpr bool starts_with (const _CharT ∗__x) const noexcept
• bool starts_with (const _CharT ∗__x) const noexcept
• basic_string substr (size_type __pos=0, size_type __n=_Base::npos) const
• void swap (basic_string &__x) noexcept(/∗conditional ∗/)
• constexpr void swap (basic_string &__s) noexcept
Generated by Doxygen
1444
Friends
__resize_and_overwrite() [1/2]
__resize_and_overwrite() [2/2]
append() [1/5]
Parameters
__svt An object convertible to string_view to be appended.
Returns
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1445
append() [2/5]
Parameters
Returns
append() [3/5]
Parameters
__str The string to append.
Returns
append() [4/5]
Generated by Doxygen
1446
Parameters
__str The string to append.
__pos Index of the first character of str to append.
__n The number of characters to append.
Returns
Exceptions
This function appends __n characters from __str starting at __pos to this string. If __n is is larger than the number of
available characters in __str, the remainder of __str is appended.
References std::basic_string< _CharT, _Traits, _Alloc >::append().
append() [5/5]
Parameters
Returns
assign() [1/5]
Parameters
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1447
Returns
This function sets this string to the exact contents of __str. __str is a valid, but unspecified string.
References std::move().
assign() [2/5]
Parameters
__svt The source object convertible to string_view.
Returns
assign() [3/5]
Parameters
__svt The source object convertible to string_view.
__pos The position in the string_view to assign from.
__n The number of characters to assign.
Returns
assign() [4/5]
Generated by Doxygen
1448
Parameters
Returns
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::assign(), std::basic_string< _CharT, _Traits, _Alloc >::assign(),
std::basic_string< _CharT, _Traits, _Alloc >::assign(), std::basic_string< _CharT, _Traits, _Alloc >::assign(), std::basic_string< _CharT, _
std::basic_string< _CharT, _Traits, _Alloc >::operator=(), std::basic_string< _CharT, _Traits, _Alloc >::operator=(),
std::basic_string< _CharT, _Traits, _Alloc >::operator=(), std::basic_string< _CharT, _Traits, _Alloc >::operator=(),
and std::basic_stringbuf< _CharT, _Traits, _Alloc >::overflow().
assign() [5/5]
Parameters
__str The string to use.
__pos Index of the first character of str.
__n Number of characters to use.
Returns
Exceptions
This function sets this string to the substring of __str consisting of __n characters at __pos. If __n is is larger than the
number of available characters in __str, the remainder of __str is used.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
at() [1/2]
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1449
Parameters
Returns
Exceptions
This function provides for safer data access. The parameter is first checked that it is in the range of the string. The
function throws out_of_range if the check fails.
at() [2/2]
Parameters
Returns
Exceptions
This function provides for safer data access. The parameter is first checked that it is in the range of the string. The
function throws out_of_range if the check fails.
back() [1/2]
back() [2/2]
Generated by Doxygen
1450
capacity()
compare() [1/6]
Parameters
__svt An object convertible to string_view to compare against.
Returns
compare() [2/6]
Parameters
Returns
Returns an integer < 0 if this string is ordered before __str, 0 if their values are equivalent, or > 0 if this string is ordered
after __str. Determines the effective length rlen of the strings to compare as the smallest of size() and str.size(). The
function then compares the two strings by calling traits::compare(data(), str.data(),rlen). If the result of the comparison
is nonzero returns it, otherwise the shorter one is ordered first.
compare() [3/6]
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1451
size_type __n,
const _Tp & __svt) const [inline], [nodiscard], [constexpr], [noexcept]
Compare to a string_view.
Generated by Doxygen
1452
Parameters
Returns
compare() [4/6]
Parameters
Returns
Form the substring of this string from the __n characters starting at __pos. Returns an integer < 0 if the substring
is ordered before __str, 0 if their values are equivalent, or > 0 if the substring is ordered after __str. Determines the
effective length rlen of the strings to compare as the smallest of the length of the substring and __str.size(). The function
then compares the two strings by calling traits::compare(substring.data(),str.data(),rlen). If the result of the comparison
is nonzero returns it, otherwise the shorter one is ordered first.
compare() [5/6]
Parameters
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1453
Parameters
Returns
compare() [6/6]
Parameters
Returns
Form the substring of this string from the __n1 characters starting at __pos1. Form the substring of __str from the
__n2 characters starting at __pos2. Returns an integer < 0 if this substring is ordered before the substring of __str,
0 if their values are equivalent, or > 0 if this substring is ordered after the substring of __str. Determines the effective
length rlen of the strings to compare as the smallest of the lengths of the substrings. The function then compares the
two strings by calling traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen). If the result of the comparison is
nonzero returns it, otherwise the shorter one is ordered first.
data()
Generated by Doxygen
1454
empty()
erase() [1/4]
Parameters
Returns
erase() [2/4]
Returns
erase() [3/4]
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1455
Parameters
Returns
Removes the characters in the range [first,last) from this string. The value of the string doesn't change if an error is
thrown.
erase() [4/4]
Parameters
Returns
Removes the character at __position from this string. The value of the string doesn't change if an error is thrown.
find() [1/3]
Parameters
Returns
Starting from __pos, searches forward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
Generated by Doxygen
1456
find() [2/3]
Parameters
__svt The object convertible to string_view to locate.
__pos Index of character to search from (default 0).
Returns
find() [3/3]
Parameters
Returns
Starting from __pos, searches forward for value of __str within this string. If found, returns the index where it begins. If
not found, returns npos.
find_first_not_of() [1/3]
Parameters
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1457
Returns
Starting from __pos, searches forward for a character other than __c within this string. If found, returns the index where
it was found. If not found, returns npos.
find_first_not_of() [2/3]
Parameters
__svt A object convertible to string_view containing characters to avoid.
__pos Index of character to search from (default 0).
Returns
find_first_not_of() [3/3]
Parameters
Returns
Starting from __pos, searches forward for a character not contained in __str within this string. If found, returns the index
where it was found. If not found, returns npos.
find_first_of() [1/3]
Generated by Doxygen
1458
Parameters
Returns
Starting from __pos, searches forward for the character __c within this string. If found, returns the index where it was
found. If not found, returns npos.
Note: equivalent to find(__c, __pos).
find_first_of() [2/3]
Parameters
__svt An object convertible to string_view containing characters to locate.
__pos Index of character to search from (default 0).
Returns
find_first_of() [3/3]
Parameters
Returns
Starting from __pos, searches forward for one of the characters of __str within this string. If found, returns the index
where it was found. If not found, returns npos.
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1459
find_last_not_of() [1/3]
Parameters
Returns
Starting from __pos, searches backward for a character other than __c within this string. If found, returns the index
where it was found. If not found, returns npos.
find_last_not_of() [2/3]
Parameters
__svt An object convertible to string_view containing characters to avoid.
__pos Index of character to search back from (default end).
Returns
find_last_not_of() [3/3]
Parameters
Generated by Doxygen
1460
Returns
Starting from __pos, searches backward for a character not contained in __str within this string. If found, returns the
index where it was found. If not found, returns npos.
find_last_of() [1/3]
Parameters
Returns
Starting from __pos, searches backward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
Note: equivalent to rfind(__c, __pos).
find_last_of() [2/3]
Parameters
__svt An object convertible to string_view containing characters to locate.
__pos Index of character to search back from (default end).
Returns
find_last_of() [3/3]
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1461
Parameters
Returns
Starting from __pos, searches backward for one of the characters of __str within this string. If found, returns the index
where it was found. If not found, returns npos.
front() [1/2]
front() [2/2]
get_allocator()
insert() [1/12]
Parameters
Returns
Generated by Doxygen
1462
Exceptions
Inserts character __c at position referenced by __p. If adding character causes the length to exceed max_size(),
length_error is thrown. If __p is beyond end of string, out_of_range is thrown. The value of the string doesn't change if
an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().
insert() [2/12]
Parameters
Returns
Exceptions
Inserts characters in range [beg,end). If adding characters causes the length to exceed max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end(),
and std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [3/12]
Parameters
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1463
Generated by Doxygen
1464
Exceptions
insert() [4/12]
Parameters
Returns
Exceptions
Inserts __n copies of character __c starting at the position referenced by iterator __p. If adding characters causes the
length to exceed max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end(),
and std::basic_string< _CharT, _Traits, _Alloc >::replace().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::insert(),
std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _T
and std::basic_string< _CharT, _Traits, _Alloc >::insert().
insert() [5/12]
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1465
Parameters
Returns
Exceptions
Inserts character __c at position referenced by __p. If adding character causes the length to exceed max_size(),
length_error is thrown. If __p is beyond end of string, out_of_range is thrown. The value of the string doesn't change if
an error is thrown.
insert() [6/12]
Parameters
Exceptions
Inserts characters in range [__beg,__end). If adding characters causes the length to exceed max_size(), length_error
is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [7/12]
Generated by Doxygen
1466
Parameters
Exceptions
insert() [8/12]
Parameters
Exceptions
Inserts __n copies of character __c starting at the position referenced by iterator __p. If adding characters causes the
length to exceed max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [9/12]
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1467
Parameters
__pos Position in string to insert at.
__svt The object convertible to string_view to insert.
Returns
insert() [10/12]
Parameters
__pos1 Position in string to insert at.
__svt The object convertible to string_view to insert from.
__pos2 Start of characters in str to insert.
__n The number of characters to insert.
Returns
insert() [11/12]
Parameters
__pos1 Position in string to insert at.
__str The string to insert.
Returns
Generated by Doxygen
1468
Exceptions
Inserts value of __str starting at __pos1. If adding characters causes the length to exceed max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [12/12]
Parameters
__pos1 Position in string to insert at.
__str The string to insert.
__pos2 Start of characters in str to insert.
__n Number of characters to insert.
Returns
Exceptions
Starting at pos1, insert __n character of __str beginning with __pos2. If adding characters causes the length to exceed
max_size(), length_error is thrown. If __pos1 is beyond the end of this string or __pos2 is beyond the end of __str,
out_of_range is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
length()
max_size()
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1469
operator __sv_type()
Returns
A string_view.
References std::basic_string< _CharT, _Traits, _Alloc >::data(), and std::basic_string< _CharT, _Traits, _Alloc >::size().
operator+=() [1/2]
Parameters
__svt An object convertible to string_view to be appended.
Returns
operator+=() [2/2]
Parameters
__str The string to append.
Returns
Generated by Doxygen
1470
replace() [1/17]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, the characters of __s are inserted. If the length of result
exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [2/17]
Parameters
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1471
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, the first __n characters of __s are inserted. If the length of
result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end(),
and std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [3/17]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, the value of __str is inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [4/17]
Generated by Doxygen
1472
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, __n copies of __c are inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().
replace() [5/17]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, characters in the range [__k1,__k2) are inserted. If the length
of result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1473
replace() [6/17]
Parameters
Returns
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [7/17]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, characters in the range [__k1,__k2) are inserted. If the length
of result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
Generated by Doxygen
1474
replace() [8/17]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, characters in the range [__k1,__k2) are inserted. If the length
of result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
replace() [9/17]
Parameters
Returns
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1475
Exceptions
Removes the characters in the range [__i1,__i2). In place, the characters of __s are inserted. If the length of result
exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [10/17]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, the first __n characters of __s are inserted. If the length of
result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [11/17]
Generated by Doxygen
1476
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, the value of __str is inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [12/17]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, characters in the range [__k1,__k2) are inserted. If the length
of result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1477
replace() [13/17]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, __n copies of __c are inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
replace() [14/17]
Parameters
__pos The position to replace at.
__n The number of characters to replace.
__svt The object convertible to string_view to insert.
Returns
Generated by Doxygen
1478
replace() [15/17]
Parameters
Returns
Exceptions
Removes the characters in the range [__pos,__pos+__n) from this string. In place, the value of __str is inserted. If
__pos is beyond end of string, out_of_range is thrown. If the length of the result exceeds max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::append(), std::basic_string< _CharT, _Traits, _Alloc >::assign(),
std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _T
std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _T
std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _T
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), and std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [16/17]
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1479
Parameters
__pos1 The position to replace at.
__n1 The number of characters to replace.
__svt The object convertible to string_view to insert from.
__pos2 The position in the string_view to insert from.
__n2 The number of characters to insert.
Returns
replace() [17/17]
Parameters
Returns
Exceptions
Removes the characters in the range [__pos1,__pos1 + n) from this string. In place, the value of __str is inserted. If
__pos is beyond end of string, out_of_range is thrown. If the length of the result exceeds max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
reserve() [1/2]
Generated by Doxygen
1480
reserve() [2/2]
Parameters
Exceptions
This function attempts to reserve enough memory for the string to hold the specified number of characters. If the number
requested is more than max_size(), length_error is thrown.
The advantage of this function is that if optimal code is a necessity and the user can determine the string length that
will be required, the user can reserve the memory in advance, and thus prevent a possible reallocation of memory and
copying of string data.
rfind() [1/3]
Parameters
Returns
Starting from __pos, searches backward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
rfind() [2/3]
Generated by Doxygen
5.250 __gnu_debug::basic_string< _CharT, _Traits, _Allocator > Class Template Reference 1481
Parameters
__svt The object convertible to string_view to locate.
__pos Index of character to search back from (default end).
Returns
rfind() [3/3]
Parameters
Returns
Starting from __pos, searches backward for value of __str within this string. If found, returns the index where it begins.
If not found, returns npos.
size()
swap()
Parameters
Exchanges the contents of this string with that of __s in constant time.
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::assign(), and std::basic_string< _CharT, _Traits, _Alloc >::operator=().
Generated by Doxygen
1482
npos
• debug/string
std::basic_string<
_CharT, _Traits, _Alloc >
__gnu_debug::basic
_string< _CharT, _Traits,
_Allocator >
Public Types
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1483
• basic_string () noexcept
• constexpr basic_string () noexcept(/∗conditional ∗/)
• template<typename _InputIterator , typename = std::_RequireInputIter<_InputIterator>>
constexpr basic_string (_InputIterator __beg, _InputIterator __end, const _Alloc &__a=_Alloc())
• template<class _InputIterator >
basic_string (_InputIterator __beg, _InputIterator __end, const _Alloc &__a=_Alloc())
• constexpr basic_string (basic_string &&__str) noexcept
• basic_string (basic_string &&__str) noexcept
• basic_string (basic_string &&__str, const _Alloc &__a)
• constexpr basic_string (basic_string &&__str, const _Alloc &__a) noexcept(_Alloc_traits::_S_always_equal())
• basic_string (const _Alloc &__a)
• constexpr basic_string (const _Alloc &__a) noexcept
• template<typename = _RequireAllocator<_Alloc>>
constexpr basic_string (const _CharT ∗__s, const _Alloc &__a=_Alloc())
• template<typename = _RequireAllocator<_Alloc>>
basic_string (const _CharT ∗__s, const _Alloc &__a=_Alloc())
• constexpr basic_string (const _CharT ∗__s, size_type __n, const _Alloc &__a=_Alloc())
• basic_string (const _CharT ∗__s, size_type __n, const _Alloc &__a=_Alloc())
• template<typename _Tp , typename = _If_sv<_Tp, void>>
constexpr basic_string (const _Tp &__t, const _Alloc &__a=_Alloc())
• template<typename _Tp , typename = enable_if_t<is_convertible_v<const _Tp&, __sv_type>>>
constexpr basic_string (const _Tp &__t, size_type __pos, size_type __n, const _Alloc &__a=_Alloc())
• constexpr basic_string (const basic_string &__str)
• basic_string (const basic_string &__str)
• constexpr basic_string (const basic_string &__str, const _Alloc &__a)
• basic_string (const basic_string &__str, const _Alloc &__a)
• constexpr basic_string (const basic_string &__str, size_type __pos, const _Alloc &__a=_Alloc())
• basic_string (const basic_string &__str, size_type __pos, const _Alloc &__a=_Alloc())
• constexpr basic_string (const basic_string &__str, size_type __pos, size_type __n)
• basic_string (const basic_string &__str, size_type __pos, size_type __n)
• constexpr basic_string (const basic_string &__str, size_type __pos, size_type __n, const _Alloc &__a)
• basic_string (const basic_string &__str, size_type __pos, size_type __n, const _Alloc &__a)
• constexpr basic_string (initializer_list< _CharT > __l, const _Alloc &__a=_Alloc())
• basic_string (initializer_list< _CharT > __l, const _Alloc &__a=_Alloc())
• template<typename = _RequireAllocator<_Alloc>>
constexpr basic_string (size_type __n, _CharT __c, const _Alloc &__a=_Alloc())
• basic_string (size_type __n, _CharT __c, const _Alloc &__a=_Alloc())
• constexpr ∼basic_string ()
• ∼basic_string () noexcept
• template<typename _Operation >
constexpr void __resize_and_overwrite (size_type __n, _Operation __op)
• template<typename _Operation >
void __resize_and_overwrite (size_type __n, _Operation __op)
Generated by Doxygen
1484
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1485
• reference back ()
• constexpr const_reference back () const noexcept
• const_reference back () const noexcept
• constexpr reference back () noexcept
• iterator begin ()
• constexpr const_iterator begin () const noexcept
• const_iterator begin () const noexcept
• constexpr iterator begin () noexcept
• constexpr const _CharT ∗ c_str () const noexcept
• const _CharT ∗ c_str () const noexcept
• constexpr size_type capacity () const noexcept
• size_type capacity () const noexcept
• constexpr const_iterator cbegin () const noexcept
• const_iterator cbegin () const noexcept
• constexpr const_iterator cend () const noexcept
• const_iterator cend () const noexcept
• constexpr void clear () noexcept
• void clear () noexcept
• constexpr int compare (const _CharT ∗__s) const noexcept
• int compare (const _CharT ∗__s) const noexcept
• template<typename _Tp >
constexpr _If_sv< _Tp, int > compare (const _Tp &__svt) const noexcept(is_same< _Tp, __sv_type >::value)
• constexpr int compare (const basic_string &__str) const
• int compare (const basic_string &__str) const
• template<typename _Tp >
constexpr _If_sv< _Tp, int > compare (size_type __pos, size_type __n, const _Tp &__svt) const
noexcept(is_same< _Tp, __sv_type >::value)
• constexpr int compare (size_type __pos, size_type __n, const basic_string &__str) const
• int compare (size_type __pos, size_type __n, const basic_string &__str) const
• constexpr int compare (size_type __pos, size_type __n1, const _CharT ∗__s) const
• int compare (size_type __pos, size_type __n1, const _CharT ∗__s) const
• constexpr int compare (size_type __pos, size_type __n1, const _CharT ∗__s, size_type __n2) const
• int compare (size_type __pos, size_type __n1, const _CharT ∗__s, size_type __n2) const
• template<typename _Tp >
constexpr _If_sv< _Tp, int > compare (size_type __pos1, size_type __n1, const _Tp &__svt, size_type __pos2,
size_type __n2=npos) const noexcept(is_same< _Tp, __sv_type >::value)
• constexpr int compare (size_type __pos1, size_type __n1, const basic_string &__str, size_type __pos2, size_type
__n2=npos) const
• int compare (size_type __pos1, size_type __n1, const basic_string &__str, size_type __pos2, size_type __←-
n2=npos) const
• constexpr size_type copy (_CharT ∗__s, size_type __n, size_type __pos=0) const
• size_type copy (_CharT ∗__s, size_type __n, size_type __pos=0) const
• constexpr const_reverse_iterator crbegin () const noexcept
• const_reverse_iterator crbegin () const noexcept
• constexpr const_reverse_iterator crend () const noexcept
• const_reverse_iterator crend () const noexcept
• constexpr const _CharT ∗ data () const noexcept
• const _CharT ∗ data () const noexcept
• constexpr _CharT ∗ data () noexcept
• _CharT ∗ data () noexcept(false)
• constexpr bool empty () const noexcept
Generated by Doxygen
1486
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1487
Generated by Doxygen
1488
• constexpr basic_string & insert (size_type __pos1, const basic_string &__str, size_type __pos2, size_type __←-
n=npos)
• basic_string & insert (size_type __pos1, const basic_string &__str, size_type __pos2, size_type __n=npos)
• constexpr size_type length () const noexcept
• size_type length () const noexcept
• constexpr size_type max_size () const noexcept
• size_type max_size () const noexcept
• constexpr operator __sv_type () const noexcept
• constexpr basic_string & operator+= (_CharT __c)
• basic_string & operator+= (_CharT __c)
• constexpr basic_string & operator+= (const _CharT ∗__s)
• basic_string & operator+= (const _CharT ∗__s)
• template<typename _Tp >
constexpr _If_sv< _Tp, basic_string & > operator+= (const _Tp &__svt)
• constexpr basic_string & operator+= (const basic_string &__str)
• basic_string & operator+= (const basic_string &__str)
• constexpr basic_string & operator+= (initializer_list< _CharT > __l)
• basic_string & operator+= (initializer_list< _CharT > __l)
• constexpr basic_string & operator= (_CharT __c)
• basic_string & operator= (_CharT __c)
• basic_string & operator= (basic_string &&__str) noexcept(/∗conditional ∗/)
• constexpr basic_string & operator= (basic_string &&__str) noexcept(_Alloc_traits::_S_nothrow_move())
• constexpr basic_string & operator= (const _CharT ∗__s)
• basic_string & operator= (const _CharT ∗__s)
• template<typename _Tp >
constexpr _If_sv< _Tp, basic_string & > operator= (const _Tp &__svt)
• constexpr basic_string & operator= (const basic_string &__str)
• basic_string & operator= (const basic_string &__str)
• constexpr basic_string & operator= (initializer_list< _CharT > __l)
• basic_string & operator= (initializer_list< _CharT > __l)
• constexpr reference operator[ ] (size_type __pos)
• reference operator[ ] (size_type __pos)
• constexpr const_reference operator[ ] (size_type __pos) const noexcept
• const_reference operator[ ] (size_type __pos) const noexcept
• void pop_back ()
• constexpr void pop_back () noexcept
• constexpr void push_back (_CharT __c)
• void push_back (_CharT __c)
• reverse_iterator rbegin ()
• constexpr const_reverse_iterator rbegin () const noexcept
• const_reverse_iterator rbegin () const noexcept
• constexpr reverse_iterator rbegin () noexcept
• reverse_iterator rend ()
• constexpr const_reverse_iterator rend () const noexcept
• const_reverse_iterator rend () const noexcept
• constexpr reverse_iterator rend () noexcept
• constexpr basic_string & replace (__const_iterator __i1, __const_iterator __i2, _CharT ∗__k1, _CharT ∗__k2)
• constexpr basic_string & replace (__const_iterator __i1, __const_iterator __i2, const _CharT ∗__k1, const _←-
CharT ∗__k2)
• constexpr basic_string & replace (__const_iterator __i1, __const_iterator __i2, const _CharT ∗__s)
• constexpr basic_string & replace (__const_iterator __i1, __const_iterator __i2, const _CharT ∗__s, size_type __n)
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1489
• constexpr basic_string & replace (__const_iterator __i1, __const_iterator __i2, const basic_string &__str)
• constexpr basic_string & replace (__const_iterator __i1, __const_iterator __i2, const_iterator __k1, const_iterator
__k2)
• constexpr basic_string & replace (__const_iterator __i1, __const_iterator __i2, iterator __k1, iterator __k2)
• constexpr basic_string & replace (__const_iterator __i1, __const_iterator __i2, size_type __n, _CharT __c)
• template<class _InputIterator , typename = std::_RequireInputIter<_InputIterator>>
constexpr basic_string & replace (const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2)
• template<typename _Tp >
constexpr _If_sv< _Tp, basic_string & > replace (const_iterator __i1, const_iterator __i2, const _Tp &__svt)
• constexpr basic_string & replace (const_iterator __i1, const_iterator __i2, initializer_list< _CharT > __l)
• basic_string & replace (iterator __i1, iterator __i2, _CharT ∗__k1, _CharT ∗__k2)
• template<class _InputIterator >
basic_string & replace (iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2)
• basic_string & replace (iterator __i1, iterator __i2, const _CharT ∗__k1, const _CharT ∗__k2)
• basic_string & replace (iterator __i1, iterator __i2, const _CharT ∗__s)
• basic_string & replace (iterator __i1, iterator __i2, const _CharT ∗__s, size_type __n)
• basic_string & replace (iterator __i1, iterator __i2, const basic_string &__str)
• basic_string & replace (iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2)
• basic_string & replace (iterator __i1, iterator __i2, initializer_list< _CharT > __l)
• basic_string & replace (iterator __i1, iterator __i2, iterator __k1, iterator __k2)
• basic_string & replace (iterator __i1, iterator __i2, size_type __n, _CharT __c)
• template<typename _Tp >
constexpr _If_sv< _Tp, basic_string & > replace (size_type __pos, size_type __n, const _Tp &__svt)
• constexpr basic_string & replace (size_type __pos, size_type __n, const basic_string &__str)
• basic_string & replace (size_type __pos, size_type __n, const basic_string &__str)
• constexpr basic_string & replace (size_type __pos, size_type __n1, const _CharT ∗__s)
• basic_string & replace (size_type __pos, size_type __n1, const _CharT ∗__s)
• constexpr basic_string & replace (size_type __pos, size_type __n1, const _CharT ∗__s, size_type __n2)
• basic_string & replace (size_type __pos, size_type __n1, const _CharT ∗__s, size_type __n2)
• constexpr basic_string & replace (size_type __pos, size_type __n1, size_type __n2, _CharT __c)
• basic_string & replace (size_type __pos, size_type __n1, size_type __n2, _CharT __c)
• template<typename _Tp >
constexpr _If_sv< _Tp, basic_string & > replace (size_type __pos1, size_type __n1, const _Tp &__svt, size_type
__pos2, size_type __n2=npos)
• constexpr basic_string & replace (size_type __pos1, size_type __n1, const basic_string &__str, size_type __←-
pos2, size_type __n2=npos)
• basic_string & replace (size_type __pos1, size_type __n1, const basic_string &__str, size_type __pos2, size_type
__n2=npos)
• constexpr void reserve ()
• void reserve ()
• constexpr void reserve (size_type __res_arg)
• void reserve (size_type __res_arg)
• constexpr void resize (size_type __n)
• void resize (size_type __n)
• constexpr void resize (size_type __n, _CharT __c)
• void resize (size_type __n, _CharT __c)
• constexpr size_type rfind (_CharT __c, size_type __pos=npos) const noexcept
• size_type rfind (_CharT __c, size_type __pos=npos) const noexcept
• constexpr size_type rfind (const _CharT ∗__s, size_type __pos, size_type __n) const noexcept
• size_type rfind (const _CharT ∗__s, size_type __pos, size_type __n) const noexcept
• constexpr size_type rfind (const _CharT ∗__s, size_type __pos=npos) const
Generated by Doxygen
1490
Protected Types
Friends
C++98
Template Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1491
Since
C++98
Template Parameters
basic_string() [1/26]
basic_string() [2/26]
Generated by Doxygen
1492
basic_string() [3/26]
Parameters
basic_string() [4/26]
Parameters
basic_string() [5/26]
Parameters
basic_string() [6/26]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1493
Generated by Doxygen
1494
Parameters
basic_string() [7/26]
Parameters
NB: __s must have at least __n characters, '\0' has no special meaning.
basic_string() [8/26]
Parameters
basic_string() [9/26]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1495
size_type __n,
_CharT __c,
const _Alloc & __a = _Alloc()) [inline], [constexpr]
Construct string as multiple characters.
Parameters
basic_string() [10/26]
Parameters
The newly-created string contains the exact contents of __str. __str is a valid, but unspecified string.
basic_string() [11/26]
Parameters
basic_string() [12/26]
Generated by Doxygen
1496
_InputIterator __end,
const _Alloc & __a = _Alloc()) [inline], [constexpr]
Construct string as copy of a range.
Parameters
References std::__iterator_category().
basic_string() [13/26]
Parameters
basic_string() [14/26]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1497
∼basic_string() [1/2]
template<typename _CharT , typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<←-
_CharT>>
std::basic_string< _CharT, _Traits, _Alloc >::∼basic_string () [inline], [constexpr]
Destroy the string instance.
basic_string() [15/26]
basic_string() [16/26]
basic_string() [17/26]
Parameters
basic_string() [18/26]
Parameters
Generated by Doxygen
1498
basic_string() [19/26]
Parameters
basic_string() [20/26]
Parameters
basic_string() [21/26]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1499
NB: __s must have at least __n characters, '\0' has no special meaning.
basic_string() [22/26]
Parameters
basic_string() [23/26]
Parameters
basic_string() [24/26]
Parameters
The newly-created string contains the exact contents of __str. __str is a valid, but unspecified string.
Generated by Doxygen
1500
basic_string() [25/26]
Parameters
basic_string() [26/26]
Parameters
∼basic_string() [2/2]
template<typename _CharT , typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<←-
_CharT>>
std::basic_string< _CharT, _Traits, _Alloc >::∼basic_string () [inline], [noexcept]
Destroy the string instance.
References std::basic_string< _CharT, _Traits, _Alloc >::get_allocator().
__resize_and_overwrite() [1/2]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1501
__resize_and_overwrite() [2/2]
append() [1/16]
Parameters
Returns
append() [2/16]
Parameters
Returns
Generated by Doxygen
1502
append() [3/16]
Parameters
Returns
append() [4/16]
Parameters
Returns
append() [5/16]
Parameters
Returns
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1503
append() [6/16]
Parameters
Returns
append() [7/16]
Parameters
__svt An object convertible to string_view to be appended.
Returns
append() [8/16]
Parameters
Generated by Doxygen
1504
Returns
append() [9/16]
Parameters
__str The string to append.
Returns
append() [10/16]
Parameters
__str The string to append.
Returns
append() [11/16]
Parameters
__str The string to append.
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1505
Returns
Exceptions
This function appends __n characters from __str starting at __pos to this string. If __n is is larger than the number of
available characters in __str, the remainder of __str is appended.
References std::basic_string< _CharT, _Traits, _Alloc >::append().
append() [12/16]
Parameters
__str The string to append.
__pos Index of the first character of str to append.
__n The number of characters to append.
Returns
Exceptions
This function appends __n characters from __str starting at __pos to this string. If __n is is larger than the number of
available characters in __str, the remainder of __str is appended.
append() [13/16]
Generated by Doxygen
1506
Parameters
Returns
append() [14/16]
Parameters
Returns
append() [15/16]
Parameters
Returns
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1507
append() [16/16]
Parameters
Returns
assign() [1/18]
Parameters
Returns
assign() [2/18]
Generated by Doxygen
1508
Parameters
Returns
assign() [3/18]
Parameters
Returns
assign() [4/18]
Parameters
Returns
assign() [5/18]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1509
Parameters
Returns
This function sets the value of this string to the value of __s. The data is copied, so there is no dependence on __s once
the function returns.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
assign() [6/18]
Parameters
Returns
This function sets the value of this string to the value of __s. The data is copied, so there is no dependence on __s once
the function returns.
References std::basic_string< _CharT, _Traits, _Alloc >::assign().
assign() [7/18]
Parameters
Returns
This function sets the value of this string to the first __n characters of __s. If __n is is larger than the number of available
characters in __s, the remainder of __s is used.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
Generated by Doxygen
1510
assign() [8/18]
Parameters
Returns
This function sets the value of this string to the first __n characters of __s. If __n is is larger than the number of available
characters in __s, the remainder of __s is used.
assign() [9/18]
Parameters
__svt The source object convertible to string_view.
Returns
assign() [10/18]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1511
Parameters
__svt The source object convertible to string_view.
__pos The position in the string_view to assign from.
__n The number of characters to assign.
Returns
assign() [11/18]
Parameters
Returns
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::assign(), std::basic_string< _CharT, _Traits, _Alloc >::assign(),
std::basic_string< _CharT, _Traits, _Alloc >::assign(), std::basic_string< _CharT, _Traits, _Alloc >::assign(), std::basic_string< _CharT, _
std::basic_string< _CharT, _Traits, _Alloc >::operator=(), std::basic_string< _CharT, _Traits, _Alloc >::operator=(),
std::basic_string< _CharT, _Traits, _Alloc >::operator=(), std::basic_string< _CharT, _Traits, _Alloc >::operator=(),
and std::basic_stringbuf< _CharT, _Traits, _Alloc >::overflow().
assign() [12/18]
Parameters
Returns
Generated by Doxygen
1512
assign() [13/18]
Parameters
__str The string to use.
__pos Index of the first character of str.
__n Number of characters to use.
Returns
Exceptions
This function sets this string to the substring of __str consisting of __n characters at __pos. If __n is is larger than the
number of available characters in __str, the remainder of __str is used.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
assign() [14/18]
Parameters
__str The string to use.
__pos Index of the first character of str.
__n Number of characters to use.
Returns
Exceptions
This function sets this string to the substring of __str consisting of __n characters at __pos. If __n is is larger than the
number of available characters in __str, the remainder of __str is used.
References std::basic_string< _CharT, _Traits, _Alloc >::assign().
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1513
assign() [15/18]
Parameters
Returns
References std::basic_string< _CharT, _Traits, _Alloc >::basic_string(), std::basic_string< _CharT, _Traits, _Alloc >::capacity(),
and std::basic_string< _CharT, _Traits, _Alloc >::get_allocator().
assign() [16/18]
Parameters
Returns
assign() [17/18]
Generated by Doxygen
1514
Parameters
Returns
This function sets the value of this string to __n copies of character __c.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
assign() [18/18]
Parameters
Returns
This function sets the value of this string to __n copies of character __c.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
at() [1/4]
Parameters
Returns
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1515
Exceptions
This function provides for safer data access. The parameter is first checked that it is in the range of the string. The
function throws out_of_range if the check fails.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
at() [2/4]
Parameters
Returns
Exceptions
This function provides for safer data access. The parameter is first checked that it is in the range of the string. The
function throws out_of_range if the check fails. Success results in unsharing the string.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
at() [3/4]
Parameters
Returns
Generated by Doxygen
1516
Exceptions
This function provides for safer data access. The parameter is first checked that it is in the range of the string. The
function throws out_of_range if the check fails.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
at() [4/4]
Parameters
Returns
Exceptions
This function provides for safer data access. The parameter is first checked that it is in the range of the string. The
function throws out_of_range if the check fails.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
back() [1/4]
back() [2/4]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1517
back() [3/4]
back() [4/4]
begin() [1/4]
begin() [2/4]
begin() [3/4]
begin() [4/4]
Generated by Doxygen
1518
c_str() [1/2]
c_str() [2/2]
capacity() [1/2]
capacity() [2/2]
cbegin() [1/2]
cbegin() [2/2]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1519
cend() [1/2]
cend() [2/2]
clear() [1/2]
clear() [2/2]
compare() [1/15]
Parameters
Returns
Returns an integer < 0 if this string is ordered before __s, 0 if their values are equivalent, or > 0 if this string is ordered
after __s. Determines the effective length rlen of the strings to compare as the smallest of size() and the length of a
string constructed from __s. The function then compares the two strings by calling traits::compare(data(),s,rlen). If the
result of the comparison is nonzero returns it, otherwise the shorter one is ordered first.
References std::min(), and std::basic_string< _CharT, _Traits, _Alloc >::size().
Generated by Doxygen
1520
compare() [2/15]
Parameters
Returns
Returns an integer < 0 if this string is ordered before __s, 0 if their values are equivalent, or > 0 if this string is ordered
after __s. Determines the effective length rlen of the strings to compare as the smallest of size() and the length of a
string constructed from __s. The function then compares the two strings by calling traits::compare(data(),s,rlen). If the
result of the comparison is nonzero returns it, otherwise the shorter one is ordered first.
References std::min(), and std::basic_string< _CharT, _Traits, _Alloc >::size().
compare() [3/15]
Parameters
__svt An object convertible to string_view to compare against.
Returns
compare() [4/15]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1521
Returns
Returns an integer < 0 if this string is ordered before __str, 0 if their values are equivalent, or > 0 if this string is ordered
after __str. Determines the effective length rlen of the strings to compare as the smallest of size() and str.size(). The
function then compares the two strings by calling traits::compare(data(), str.data(),rlen). If the result of the comparison
is nonzero returns it, otherwise the shorter one is ordered first.
References std::min(), and std::basic_string< _CharT, _Traits, _Alloc >::size().
compare() [5/15]
Parameters
Returns
Returns an integer < 0 if this string is ordered before __str, 0 if their values are equivalent, or > 0 if this string is ordered
after __str. Determines the effective length rlen of the strings to compare as the smallest of size() and str.size(). The
function then compares the two strings by calling traits::compare(data(), str.data(),rlen). If the result of the comparison
is nonzero returns it, otherwise the shorter one is ordered first.
References std::min(), and std::basic_string< _CharT, _Traits, _Alloc >::size().
compare() [6/15]
Parameters
Returns
Generated by Doxygen
1522
compare() [7/15]
Parameters
Returns
Form the substring of this string from the __n characters starting at __pos. Returns an integer < 0 if the substring
is ordered before __str, 0 if their values are equivalent, or > 0 if the substring is ordered after __str. Determines the
effective length rlen of the strings to compare as the smallest of the length of the substring and __str.size(). The function
then compares the two strings by calling traits::compare(substring.data(),str.data(),rlen). If the result of the comparison
is nonzero returns it, otherwise the shorter one is ordered first.
References std::min().
compare() [8/15]
Parameters
Returns
Form the substring of this string from the __n characters starting at __pos. Returns an integer < 0 if the substring
is ordered before __str, 0 if their values are equivalent, or > 0 if the substring is ordered after __str. Determines the
effective length rlen of the strings to compare as the smallest of the length of the substring and __str.size(). The function
then compares the two strings by calling traits::compare(substring.data(),str.data(),rlen). If the result of the comparison
is nonzero returns it, otherwise the shorter one is ordered first.
References std::min().
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1523
compare() [9/15]
Parameters
Returns
Form the substring of this string from the __n1 characters starting at pos. Returns an integer < 0 if the substring is
ordered before __s, 0 if their values are equivalent, or > 0 if the substring is ordered after __s. Determines the effective
length rlen of the strings to compare as the smallest of the length of the substring and the length of a string constructed
from __s. The function then compares the two string by calling traits::compare(substring.data(),__s,rlen). If the result of
the comparison is nonzero returns it, otherwise the shorter one is ordered first.
References std::min().
compare() [10/15]
Parameters
Returns
Form the substring of this string from the __n1 characters starting at pos. Returns an integer < 0 if the substring is
ordered before __s, 0 if their values are equivalent, or > 0 if the substring is ordered after __s. Determines the effective
length rlen of the strings to compare as the smallest of the length of the substring and the length of a string constructed
from __s. The function then compares the two string by calling traits::compare(substring.data(),__s,rlen). If the result of
the comparison is nonzero returns it, otherwise the shorter one is ordered first.
References std::min().
Generated by Doxygen
1524
compare() [11/15]
Parameters
Returns
Form the substring of this string from the __n1 characters starting at __pos. Form a string from the first __n2 characters
of __s. Returns an integer < 0 if this substring is ordered before the string from __s, 0 if their values are equivalent, or
> 0 if this substring is ordered after the string from __s. Determines the effective length rlen of the strings to compare
as the smallest of the length of the substring and __n2. The function then compares the two strings by calling traits←-
::compare(substring.data(),s,rlen). If the result of the comparison is nonzero returns it, otherwise the shorter one is
ordered first.
NB: s must have at least n2 characters, '\0' has no special meaning.
References std::min().
compare() [12/15]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1525
Returns
Form the substring of this string from the __n1 characters starting at __pos. Form a string from the first __n2 characters
of __s. Returns an integer < 0 if this substring is ordered before the string from __s, 0 if their values are equivalent, or
> 0 if this substring is ordered after the string from __s. Determines the effective length rlen of the strings to compare
as the smallest of the length of the substring and __n2. The function then compares the two strings by calling traits←-
::compare(substring.data(),s,rlen). If the result of the comparison is nonzero returns it, otherwise the shorter one is
ordered first.
NB: s must have at least n2 characters, '\0' has no special meaning.
References std::min().
compare() [13/15]
Parameters
Returns
compare() [14/15]
Parameters
Generated by Doxygen
1526
Parameters
Returns
Form the substring of this string from the __n1 characters starting at __pos1. Form the substring of __str from the
__n2 characters starting at __pos2. Returns an integer < 0 if this substring is ordered before the substring of __str,
0 if their values are equivalent, or > 0 if this substring is ordered after the substring of __str. Determines the effective
length rlen of the strings to compare as the smallest of the lengths of the substrings. The function then compares the
two strings by calling traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen). If the result of the comparison is
nonzero returns it, otherwise the shorter one is ordered first.
References std::min().
compare() [15/15]
Parameters
Returns
Form the substring of this string from the __n1 characters starting at __pos1. Form the substring of __str from the
__n2 characters starting at __pos2. Returns an integer < 0 if this substring is ordered before the substring of __str,
0 if their values are equivalent, or > 0 if this substring is ordered after the substring of __str. Determines the effective
length rlen of the strings to compare as the smallest of the lengths of the substrings. The function then compares the
two strings by calling traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen). If the result of the comparison is
nonzero returns it, otherwise the shorter one is ordered first.
References std::min().
copy() [1/2]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1527
>::copy (
_CharT ∗ __s,
size_type __n,
size_type __pos = 0) const [constexpr]
Copy substring into C string.
Parameters
Returns
Exceptions
Copies up to __n characters starting at __pos into the C string __s. If __pos is greater than size(), out_of_range is
thrown.
copy() [2/2]
Parameters
Returns
Exceptions
Copies up to __n characters starting at __pos into the C string __s. If __pos is greater than size(), out_of_range is
thrown.
Generated by Doxygen
1528
crbegin() [1/2]
crbegin() [2/2]
crend() [1/2]
crend() [2/2]
data() [1/4]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1529
data() [2/4]
data() [3/4]
data() [4/4]
empty() [1/2]
empty() [2/2]
end() [1/4]
Generated by Doxygen
1530
end() [2/4]
end() [3/4]
end() [4/4]
erase() [1/6]
Parameters
Returns
Removes the characters in the range [first,last) from this string. The value of the string doesn't change if an error is
thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1531
erase() [2/6]
Parameters
Returns
Removes the character at __position from this string. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().
erase() [3/6]
Parameters
Returns
Removes the characters in the range [first,last) from this string. The value of the string doesn't change if an error is
thrown.
erase() [4/6]
Parameters
Returns
Removes the character at __position from this string. The value of the string doesn't change if an error is thrown.
Generated by Doxygen
1532
erase() [5/6]
Parameters
Returns
Exceptions
Removes __n characters from this string starting at __pos. The length of the string is reduced by __n. If there are < __n
characters to remove, the remainder of the string is truncated. If __p is beyond end of string, out_of_range is thrown.
The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::npos.
Referenced by std::getline(), std::operator>>(), std::basic_string< _CharT, _Traits, _Alloc >::pop_back(), and
std::basic_string< _CharT, _Traits, _Alloc >::resize().
erase() [6/6]
Parameters
Returns
Exceptions
Removes __n characters from this string starting at __pos. The length of the string is reduced by __n. If there are < __n
characters to remove, the remainder of the string is truncated. If __p is beyond end of string, out_of_range is thrown.
The value of the string doesn't change if an error is thrown.
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1533
find() [1/9]
Parameters
Returns
Starting from __pos, searches forward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
References std::size().
find() [2/9]
Parameters
Returns
Starting from __pos, searches forward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find().
find() [3/9]
Generated by Doxygen
1534
Parameters
Returns
Starting from __pos, searches forward for the first __n characters in __s within this string. If found, returns the index
where it begins. If not found, returns npos.
References std::data(), and std::size().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::find(), std::basic_string< _CharT, _Traits, _Alloc >::find(),
std::basic_string< _CharT, _Traits, _Alloc >::find(), std::basic_string< _CharT, _Traits, _Alloc >::find(), and std::basic_string< _CharT, _T
find() [4/9]
Parameters
Returns
Starting from __pos, searches forward for the first __n characters in __s within this string. If found, returns the index
where it begins. If not found, returns npos.
find() [5/9]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1535
Returns
Starting from __pos, searches forward for the value of __s within this string. If found, returns the index where it begins.
If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find().
find() [6/9]
Parameters
Returns
Starting from __pos, searches forward for the value of __s within this string. If found, returns the index where it begins.
If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find().
find() [7/9]
Parameters
__svt The object convertible to string_view to locate.
__pos Index of character to search from (default 0).
Returns
Generated by Doxygen
1536
find() [8/9]
Parameters
Returns
Starting from __pos, searches forward for value of __str within this string. If found, returns the index where it begins. If
not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find().
find() [9/9]
Parameters
Returns
Starting from __pos, searches forward for value of __str within this string. If found, returns the index where it begins. If
not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find().
find_first_not_of() [1/9]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1537
Parameters
Returns
Starting from __pos, searches forward for a character other than __c within this string. If found, returns the index where
it was found. If not found, returns npos.
References std::size().
find_first_not_of() [2/9]
Parameters
Returns
Starting from __pos, searches forward for a character other than __c within this string. If found, returns the index where
it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of().
find_first_not_of() [3/9]
Parameters
Generated by Doxygen
1538
Returns
Starting from __pos, searches forward for a character not contained in the first __n characters of __s within this string.
If found, returns the index where it was found. If not found, returns npos.
References std::size().
find_first_not_of() [4/9]
Parameters
Returns
Starting from __pos, searches forward for a character not contained in the first __n characters of __s within this string.
If found, returns the index where it was found. If not found, returns npos.
find_first_not_of() [5/9]
Parameters
Returns
Starting from __pos, searches forward for a character not contained in __s within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of().
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1539
find_first_not_of() [6/9]
Parameters
Returns
Starting from __pos, searches forward for a character not contained in __s within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of().
find_first_not_of() [7/9]
Parameters
__svt A object convertible to string_view containing characters to avoid.
__pos Index of character to search from (default 0).
Returns
find_first_not_of() [8/9]
Parameters
Generated by Doxygen
1540
Returns
Starting from __pos, searches forward for a character not contained in __str within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of(), std::basic_string< _CharT, _Traits, _Alloc >::find_first_no
std::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of(), and std::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of().
find_first_not_of() [9/9]
Parameters
Returns
Starting from __pos, searches forward for a character not contained in __str within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_first_not_of().
find_first_of() [1/9]
Parameters
Returns
Starting from __pos, searches forward for the character __c within this string. If found, returns the index where it was
found. If not found, returns npos.
Note: equivalent to find(__c, __pos).
References std::basic_string< _CharT, _Traits, _Alloc >::find().
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1541
find_first_of() [2/9]
Parameters
Returns
Starting from __pos, searches forward for the character __c within this string. If found, returns the index where it was
found. If not found, returns npos.
Note: equivalent to find(__c, __pos).
References std::basic_string< _CharT, _Traits, _Alloc >::find().
find_first_of() [3/9]
Parameters
Returns
Starting from __pos, searches forward for one of the first __n characters of __s within this string. If found, returns the
index where it was found. If not found, returns npos.
References std::size().
find_first_of() [4/9]
Generated by Doxygen
1542
Parameters
Returns
Starting from __pos, searches forward for one of the first __n characters of __s within this string. If found, returns the
index where it was found. If not found, returns npos.
find_first_of() [5/9]
Parameters
Returns
Starting from __pos, searches forward for one of the characters of __s within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_first_of().
find_first_of() [6/9]
Parameters
Returns
Starting from __pos, searches forward for one of the characters of __s within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_first_of().
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1543
find_first_of() [7/9]
Parameters
__svt An object convertible to string_view containing characters to locate.
__pos Index of character to search from (default 0).
Returns
find_first_of() [8/9]
Parameters
Returns
Starting from __pos, searches forward for one of the characters of __str within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_first_of().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::find_first_of(), std::basic_string< _CharT, _Traits, _Alloc >::find_first_of(),
and std::basic_string< _CharT, _Traits, _Alloc >::find_first_of().
find_first_of() [9/9]
Generated by Doxygen
1544
Parameters
Returns
Starting from __pos, searches forward for one of the characters of __str within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_first_of().
find_last_not_of() [1/9]
Parameters
Returns
Starting from __pos, searches backward for a character other than __c within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::size().
find_last_not_of() [2/9]
Parameters
Returns
Starting from __pos, searches backward for a character other than __c within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of().
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1545
find_last_not_of() [3/9]
Parameters
Returns
Starting from __pos, searches backward for a character not contained in the first __n characters of __s within this string.
If found, returns the index where it was found. If not found, returns npos.
References std::size().
find_last_not_of() [4/9]
Parameters
Returns
Starting from __pos, searches backward for a character not contained in the first __n characters of __s within this string.
If found, returns the index where it was found. If not found, returns npos.
find_last_not_of() [5/9]
Generated by Doxygen
1546
Parameters
Returns
Starting from __pos, searches backward for a character not contained in __s within this string. If found, returns the
index where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of().
find_last_not_of() [6/9]
Parameters
Returns
Starting from __pos, searches backward for a character not contained in __s within this string. If found, returns the
index where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of().
find_last_not_of() [7/9]
Parameters
__svt An object convertible to string_view containing characters to avoid.
__pos Index of character to search back from (default end).
Returns
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1547
find_last_not_of() [8/9]
Parameters
Returns
Starting from __pos, searches backward for a character not contained in __str within this string. If found, returns the
index where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of(), std::basic_string< _CharT, _Traits, _Alloc >::find_last_not
std::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of(), and std::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of().
find_last_not_of() [9/9]
Parameters
Returns
Starting from __pos, searches backward for a character not contained in __str within this string. If found, returns the
index where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_last_not_of().
find_last_of() [1/9]
Generated by Doxygen
1548
Parameters
Returns
Starting from __pos, searches backward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
Note: equivalent to rfind(__c, __pos).
References std::basic_string< _CharT, _Traits, _Alloc >::rfind().
find_last_of() [2/9]
Parameters
Returns
Starting from __pos, searches backward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
Note: equivalent to rfind(__c, __pos).
References std::basic_string< _CharT, _Traits, _Alloc >::rfind().
find_last_of() [3/9]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1549
Returns
Starting from __pos, searches backward for one of the first __n characters of __s within this string. If found, returns the
index where it was found. If not found, returns npos.
References std::size().
find_last_of() [4/9]
Parameters
Returns
Starting from __pos, searches backward for one of the first __n characters of __s within this string. If found, returns the
index where it was found. If not found, returns npos.
find_last_of() [5/9]
Parameters
Returns
Starting from __pos, searches backward for one of the characters of __s within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_last_of().
Generated by Doxygen
1550
find_last_of() [6/9]
Parameters
Returns
Starting from __pos, searches backward for one of the characters of __s within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_last_of().
find_last_of() [7/9]
Parameters
__svt An object convertible to string_view containing characters to locate.
__pos Index of character to search back from (default end).
Returns
find_last_of() [8/9]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1551
Returns
Starting from __pos, searches backward for one of the characters of __str within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_last_of().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::find_last_of(), std::basic_string< _CharT, _Traits, _Alloc >::find_last_of(),
and std::basic_string< _CharT, _Traits, _Alloc >::find_last_of().
find_last_of() [9/9]
Parameters
Returns
Starting from __pos, searches backward for one of the characters of __str within this string. If found, returns the index
where it was found. If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::find_last_of().
front() [1/4]
front() [2/4]
Generated by Doxygen
1552
front() [3/4]
front() [4/4]
get_allocator() [1/2]
get_allocator() [2/2]
insert() [1/20]
Returns
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1553
Exceptions
Inserts character __c at position referenced by __p. If adding character causes the length to exceed max_size(),
length_error is thrown. If __p is beyond end of string, out_of_range is thrown. The value of the string doesn't change if
an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().
insert() [2/20]
Parameters
Returns
Exceptions
Inserts characters in range [beg,end). If adding characters causes the length to exceed max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end(),
and std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [3/20]
Parameters
Generated by Doxygen
1554
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1555
Exceptions
insert() [4/20]
Parameters
Returns
Exceptions
Inserts __n copies of character __c starting at the position referenced by iterator __p. If adding characters causes the
length to exceed max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end(),
and std::basic_string< _CharT, _Traits, _Alloc >::replace().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::insert(),
std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _T
and std::basic_string< _CharT, _Traits, _Alloc >::insert().
insert() [5/20]
Generated by Doxygen
1556
Parameters
Returns
Exceptions
Inserts character __c at position referenced by __p. If adding character causes the length to exceed max_size(),
length_error is thrown. If __p is beyond end of string, out_of_range is thrown. The value of the string doesn't change if
an error is thrown.
insert() [6/20]
Parameters
Exceptions
Inserts characters in range [__beg,__end). If adding characters causes the length to exceed max_size(), length_error
is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [7/20]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1557
Parameters
Exceptions
insert() [8/20]
Parameters
Exceptions
Inserts __n copies of character __c starting at the position referenced by iterator __p. If adding characters causes the
length to exceed max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [9/20]
Generated by Doxygen
1558
Parameters
__pos Position in string to insert at.
__s The C string to insert.
Returns
Exceptions
Inserts the first n characters of __s starting at __pos. If adding characters causes the length to exceed max_size(),
length_error is thrown. If __pos is beyond end(), out_of_range is thrown. The value of the string doesn't change if an
error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [10/20]
Parameters
__pos Position in string to insert at.
__s The C string to insert.
Returns
Exceptions
Inserts the first n characters of __s starting at __pos. If adding characters causes the length to exceed max_size(),
length_error is thrown. If __pos is beyond end(), out_of_range is thrown. The value of the string doesn't change if an
error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::insert().
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1559
insert() [11/20]
Parameters
__pos Position in string to insert at.
__s The C string to insert.
__n The number of characters to insert.
Returns
Exceptions
Inserts the first __n characters of __s starting at __pos. If adding characters causes the length to exceed max_size(),
length_error is thrown. If __pos is beyond end(), out_of_range is thrown. The value of the string doesn't change if an
error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [12/20]
Parameters
__pos Position in string to insert at.
__s The C string to insert.
__n The number of characters to insert.
Returns
Exceptions
Generated by Doxygen
1560
Inserts the first __n characters of __s starting at __pos. If adding characters causes the length to exceed max_size(),
length_error is thrown. If __pos is beyond end(), out_of_range is thrown. The value of the string doesn't change if an
error is thrown.
insert() [13/20]
Parameters
__pos Position in string to insert at.
__svt The object convertible to string_view to insert.
Returns
insert() [14/20]
Parameters
__pos Index in string to insert at.
__n Number of characters to insert
__c The character to insert.
Returns
Exceptions
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1561
Inserts __n copies of character __c starting at index __pos. If adding characters causes the length to exceed max_←-
size(), length_error is thrown. If __pos > length(), out_of_range is thrown. The value of the string doesn't change if an
error is thrown.
insert() [15/20]
Parameters
__pos Index in string to insert at.
__n Number of characters to insert
__c The character to insert.
Returns
Exceptions
Inserts __n copies of character __c starting at index __pos. If adding characters causes the length to exceed max_←-
size(), length_error is thrown. If __pos > length(), out_of_range is thrown. The value of the string doesn't change if an
error is thrown.
insert() [16/20]
Parameters
__pos1 Position in string to insert at.
__svt The object convertible to string_view to insert from.
__pos2 Start of characters in str to insert.
Generated by Doxygen
1562
Returns
insert() [17/20]
Parameters
__pos1 Position in string to insert at.
__str The string to insert.
Returns
Exceptions
Inserts value of __str starting at __pos1. If adding characters causes the length to exceed max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [18/20]
Parameters
__pos1 Position in string to insert at.
__str The string to insert.
Returns
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1563
Exceptions
Inserts value of __str starting at __pos1. If adding characters causes the length to exceed max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::insert().
insert() [19/20]
Parameters
__pos1 Position in string to insert at.
__str The string to insert.
__pos2 Start of characters in str to insert.
__n Number of characters to insert.
Returns
Exceptions
Starting at pos1, insert __n character of __str beginning with __pos2. If adding characters causes the length to exceed
max_size(), length_error is thrown. If __pos1 is beyond the end of this string or __pos2 is beyond the end of __str,
out_of_range is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
insert() [20/20]
Generated by Doxygen
1564
Parameters
__pos1 Position in string to insert at.
__str The string to insert.
__pos2 Start of characters in str to insert.
__n Number of characters to insert.
Returns
Exceptions
Starting at pos1, insert __n character of __str beginning with __pos2. If adding characters causes the length to exceed
max_size(), length_error is thrown. If __pos1 is beyond the end of this string or __pos2 is beyond the end of __str,
out_of_range is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::insert().
length() [1/2]
length() [2/2]
max_size() [1/2]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1565
max_size() [2/2]
operator __sv_type()
A string_view.
References std::basic_string< _CharT, _Traits, _Alloc >::data(), and std::basic_string< _CharT, _Traits, _Alloc >::size().
operator+=() [1/9]
Parameters
_←- The character to append.
_c
Returns
operator+=() [2/9]
Parameters
_←- The character to append.
_c
Returns
Generated by Doxygen
1566
operator+=() [3/9]
Parameters
Returns
operator+=() [4/9]
Parameters
Returns
operator+=() [5/9]
Parameters
__svt An object convertible to string_view to be appended.
Returns
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1567
operator+=() [6/9]
Parameters
__str The string to append.
Returns
operator+=() [7/9]
Parameters
__str The string to append.
Returns
operator+=() [8/9]
Parameters
Returns
Generated by Doxygen
1568
operator+=() [9/9]
Parameters
Returns
operator=() [1/11]
Parameters
operator=() [2/11]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1569
operator=() [3/11]
Parameters
The contents of str are moved into this string (without copying). str is a valid, but unspecified string.
References std::basic_string< _CharT, _Traits, _Alloc >::swap().
operator=() [4/11]
Parameters
The contents of str are moved into this string (without copying). str is a valid, but unspecified string.
References std::__addressof().
operator=() [5/11]
Parameters
operator=() [6/11]
Generated by Doxygen
1570
Parameters
operator=() [7/11]
Parameters
__svt An object convertible to string_view.
operator=() [8/11]
Parameters
operator=() [9/11]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1571
operator=() [10/11]
Parameters
←- std::initializer_list.
_←-
←-
_←-
l
operator=() [11/11]
Parameters
←- std::initializer_list.
_←-
←-
_←-
l
operator[]() [1/4]
Parameters
Returns
This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and
out_of_range lookups are not defined. (For checked lookups see at().)
References std::basic_string< _CharT, _Traits, _Alloc >::size().
Generated by Doxygen
1572
operator[]() [2/4]
Parameters
Returns
This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and
out_of_range lookups are not defined. (For checked lookups see at().) Unshares the string.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
operator[]() [3/4]
Parameters
Returns
This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and
out_of_range lookups are not defined. (For checked lookups see at().)
References std::basic_string< _CharT, _Traits, _Alloc >::size().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::back(), std::basic_string< _CharT, _Traits, _Alloc >::back(),
std::basic_string< _CharT, _Traits, _Alloc >::back(), std::basic_string< _CharT, _Traits, _Alloc >::front(), std::basic_string< _CharT, _Tra
and std::basic_string< _CharT, _Traits, _Alloc >::front().
operator[]() [4/4]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1573
Returns
This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and
out_of_range lookups are not defined. (For checked lookups see at().)
References std::basic_string< _CharT, _Traits, _Alloc >::size().
pop_back() [1/2]
pop_back() [2/2]
push_back() [1/2]
Parameters
References std::basic_string< _CharT, _Traits, _Alloc >::capacity(), and std::basic_string< _CharT, _Traits, _Alloc >::size().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::operator+=(), std::tr2::operator>>(), and std::basic_stringbuf< _CharT, _Trai
push_back() [2/2]
Parameters
Generated by Doxygen
1574
References std::basic_string< _CharT, _Traits, _Alloc >::capacity(), std::basic_string< _CharT, _Traits, _Alloc >::reserve(),
and std::basic_string< _CharT, _Traits, _Alloc >::size().
rbegin() [1/4]
rbegin() [2/4]
rbegin() [3/4]
rbegin() [4/4]
rend() [1/4]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1575
rend() [2/4]
rend() [3/4]
rend() [4/4]
replace() [1/25]
Parameters
Returns
Generated by Doxygen
1576
Exceptions
Removes the characters in the range [__i1,__i2). In place, the characters of __s are inserted. If the length of result
exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [2/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, the first __n characters of __s are inserted. If the length of
result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), std::basic_string< _CharT, _Traits, _Alloc >::end(),
and std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [3/25]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1577
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, the value of __str is inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [4/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, __n copies of __c are inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().
Generated by Doxygen
1578
replace() [5/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, characters in the range [__k1,__k2) are inserted. If the length
of result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::end().
replace() [6/25]
Parameters
Returns
References std::basic_string< _CharT, _Traits, _Alloc >::begin(), and std::basic_string< _CharT, _Traits, _Alloc >::replace().
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1579
replace() [7/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, characters in the range [__k1,__k2) are inserted. If the length
of result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [8/25]
Parameters
Returns
Generated by Doxygen
1580
Exceptions
Removes the characters in the range [__i1,__i2). In place, characters in the range [__k1,__k2) are inserted. If the length
of result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
replace() [9/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, the characters of __s are inserted. If the length of result
exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [10/25]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1581
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, the first __n characters of __s are inserted. If the length of
result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [11/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, the value of __str is inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
Generated by Doxygen
1582
replace() [12/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, characters in the range [__k1,__k2) are inserted. If the length
of result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [13/25]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1583
Returns
Exceptions
Removes the characters in the range [__i1,__i2). In place, __n copies of __c are inserted. If the length of result exceeds
max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
replace() [14/25]
Parameters
__pos The position to replace at.
__n The number of characters to replace.
__svt The object convertible to string_view to insert.
Returns
replace() [15/25]
Parameters
Returns
Generated by Doxygen
1584
Exceptions
Removes the characters in the range [__pos,__pos+__n) from this string. In place, the value of __str is inserted. If
__pos is beyond end of string, out_of_range is thrown. If the length of the result exceeds max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::append(), std::basic_string< _CharT, _Traits, _Alloc >::assign(),
std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _T
std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _T
std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::basic_string< _CharT, _T
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), std::basic_string< _CharT, _Traits, _Alloc >::replace(),
std::basic_string< _CharT, _Traits, _Alloc >::replace(), and std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [16/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__pos,__pos+__n) from this string. In place, the value of __str is inserted. If
__pos is beyond end of string, out_of_range is thrown. If the length of the result exceeds max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1585
replace() [17/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__pos,__pos + __n1) from this string. In place, the characters of __s are inserted.
If __pos is beyond end of string, out_of_range is thrown. If the length of result exceeds max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [18/25]
Parameters
Returns
Generated by Doxygen
1586
Exceptions
Removes the characters in the range [__pos,__pos + __n1) from this string. In place, the characters of __s are inserted.
If __pos is beyond end of string, out_of_range is thrown. If the length of result exceeds max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [19/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__pos,__pos + __n1) from this string. In place, the first __n2 characters of __s
are inserted, or all of __s if __n2 is too large. If __pos is beyond end of string, out_of_range is thrown. If the length of
result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
replace() [20/25]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1587
Parameters
Returns
Exceptions
Removes the characters in the range [__pos,__pos + __n1) from this string. In place, the first __n2 characters of __s
are inserted, or all of __s if __n2 is too large. If __pos is beyond end of string, out_of_range is thrown. If the length of
result exceeds max_size(), length_error is thrown. The value of the string doesn't change if an error is thrown.
replace() [21/25]
Parameters
Returns
Exceptions
Removes the characters in the range [pos,pos + n1) from this string. In place, __n2 copies of __c are inserted. If __pos
is beyond end of string, out_of_range is thrown. If the length of result exceeds max_size(), length_error is thrown. The
value of the string doesn't change if an error is thrown.
Generated by Doxygen
1588
replace() [22/25]
Parameters
Returns
Exceptions
Removes the characters in the range [pos,pos + n1) from this string. In place, __n2 copies of __c are inserted. If __pos
is beyond end of string, out_of_range is thrown. If the length of result exceeds max_size(), length_error is thrown. The
value of the string doesn't change if an error is thrown.
replace() [23/25]
Parameters
__pos1 The position to replace at.
__n1 The number of characters to replace.
__svt The object convertible to string_view to insert from.
__pos2 The position in the string_view to insert from.
__n2 The number of characters to insert.
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1589
Returns
replace() [24/25]
Parameters
Returns
Exceptions
Removes the characters in the range [__pos1,__pos1 + n) from this string. In place, the value of __str is inserted. If
__pos is beyond end of string, out_of_range is thrown. If the length of the result exceeds max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
replace() [25/25]
Generated by Doxygen
1590
Parameters
Returns
Exceptions
Removes the characters in the range [__pos1,__pos1 + n) from this string. In place, the value of __str is inserted. If
__pos is beyond end of string, out_of_range is thrown. If the length of the result exceeds max_size(), length_error is
thrown. The value of the string doesn't change if an error is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::replace().
reserve() [1/4]
reserve() [2/4]
reserve() [3/4]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1591
Exceptions
This function attempts to reserve enough memory for the string to hold the specified number of characters. If the number
requested is more than max_size(), length_error is thrown.
The advantage of this function is that if optimal code is a necessity and the user can determine the string length that
will be required, the user can reserve the memory in advance, and thus prevent a possible reallocation of memory and
copying of string data.
References std::size().
Referenced by std::num_get< _CharT, _InIter >::do_get(), std::num_get< _CharT, _InIter >::do_get(), std::num_get< _CharT, _InIter >:
std::tr2::operator>>(), and std::basic_stringbuf< _CharT, _Traits, _Alloc >::overflow().
reserve() [4/4]
Parameters
Exceptions
This function attempts to reserve enough memory for the string to hold the specified number of characters. If the number
requested is more than max_size(), length_error is thrown.
The advantage of this function is that if optimal code is a necessity and the user can determine the string length that
will be required, the user can reserve the memory in advance, and thus prevent a possible reallocation of memory and
copying of string data.
resize() [1/4]
Parameters
This function will resize the string to the specified length. If the new size is smaller than the string's current size the
string is truncated, otherwise the string is extended and new characters are default-constructed. For basic types such
as char, this means setting them to 0.
References std::basic_string< _CharT, _Traits, _Alloc >::resize().
Generated by Doxygen
1592
resize() [2/4]
Parameters
This function will resize the string to the specified length. If the new size is smaller than the string's current size the
string is truncated, otherwise the string is extended and new characters are default-constructed. For basic types such
as char, this means setting them to 0.
References std::basic_string< _CharT, _Traits, _Alloc >::resize().
resize() [3/4]
Parameters
This function will resize the string to the specified number of characters. If the number is smaller than the string's current
size the string is truncated, otherwise the string is extended and new elements are set to __c.
References std::basic_string< _CharT, _Traits, _Alloc >::append(), std::basic_string< _CharT, _Traits, _Alloc >::erase(),
and std::basic_string< _CharT, _Traits, _Alloc >::size().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::resize().
resize() [4/4]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1593
This function will resize the string to the specified number of characters. If the number is smaller than the string's current
size the string is truncated, otherwise the string is extended and new elements are set to __c.
rfind() [1/9]
Parameters
Returns
Starting from __pos, searches backward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
References std::size().
rfind() [2/9]
Parameters
Returns
Starting from __pos, searches backward for __c within this string. If found, returns the index where it was found. If not
found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::rfind().
rfind() [3/9]
Generated by Doxygen
1594
Parameters
Returns
Starting from __pos, searches backward for the first __n characters in __s within this string. If found, returns the index
where it begins. If not found, returns npos.
References std::min(), and std::size().
rfind() [4/9]
Parameters
Returns
Starting from __pos, searches backward for the first __n characters in __s within this string. If found, returns the index
where it begins. If not found, returns npos.
rfind() [5/9]
Parameters
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1595
Returns
Starting from __pos, searches backward for the value of __s within this string. If found, returns the index where it begins.
If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::rfind().
rfind() [6/9]
Parameters
Returns
Starting from __pos, searches backward for the value of __s within this string. If found, returns the index where it begins.
If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::rfind().
rfind() [7/9]
Parameters
__svt The object convertible to string_view to locate.
__pos Index of character to search back from (default end).
Returns
Generated by Doxygen
1596
rfind() [8/9]
Parameters
Returns
Starting from __pos, searches backward for value of __str within this string. If found, returns the index where it begins.
If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::rfind().
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::find_last_of(), std::basic_string< _CharT, _Traits, _Alloc >::rfind(),
std::basic_string< _CharT, _Traits, _Alloc >::rfind(), std::basic_string< _CharT, _Traits, _Alloc >::rfind(), std::basic_string< _CharT, _Tra
and std::basic_string< _CharT, _Traits, _Alloc >::rfind().
rfind() [9/9]
Parameters
Returns
Starting from __pos, searches backward for value of __str within this string. If found, returns the index where it begins.
If not found, returns npos.
References std::basic_string< _CharT, _Traits, _Alloc >::rfind().
shrink_to_fit() [1/2]
Generated by Doxygen
5.251 std::basic_string< _CharT, _Traits, _Alloc > Class Template Reference 1597
shrink_to_fit() [2/2]
size() [1/2]
size() [2/2]
substr() [1/2]
Parameters
Generated by Doxygen
1598
Returns
Exceptions
Construct and return a new string using the __n characters starting at __pos. If the string is too short, use the remainder
of the characters. If __pos is beyond the end of the string, out_of_range is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::basic_string().
substr() [2/2]
Parameters
Returns
Exceptions
Construct and return a new string using the __n characters starting at __pos. If the string is too short, use the remainder
of the characters. If __pos is beyond the end of the string, out_of_range is thrown.
References std::basic_string< _CharT, _Traits, _Alloc >::basic_string().
swap() [1/2]
Parameters
Exchanges the contents of this string with that of __s in constant time.
Referenced by std::basic_string< _CharT, _Traits, _Alloc >::assign(), and std::basic_string< _CharT, _Traits, _Alloc >::operator=().
Generated by Doxygen
5.252 std::basic_string_view< _CharT, _Traits > Class Template Reference 1599
swap() [2/2]
Parameters
Exchanges the contents of this string with that of __s in constant time.
npos
• basic_string.h
• cow_string.h
• stringfwd.h
• basic_string.tcc
Public Types
• using const_iterator
• using const_pointer
• using const_reference
• using const_reverse_iterator
• using difference_type
• using iterator
• using pointer
• using reference
• using reverse_iterator
• using size_type
• using traits_type
• using value_type
Generated by Doxygen
1600
Generated by Doxygen
5.253 std::experimental::fundamentals_v1::basic_string_view< _CharT, _Traits > Class Template Reference
1601
Template Parameters
• string_view
• bits/string_view.tcc
Public Types
• using const_iterator
• using const_pointer
• using const_reference
• using const_reverse_iterator
• using difference_type
• using iterator
• using pointer
• using reference
• using reverse_iterator
• using size_type
• using traits_type
• using value_type
Generated by Doxygen
1602
Generated by Doxygen
5.254 std::basic_stringbuf< _CharT, _Traits, _Alloc > Class Template Reference 1603
Template Parameters
• experimental/string_view
• experimental/bits/string_view.tcc
Generated by Doxygen
1604
std::basic_streambuf
< _CharT, _Traits >
std::basic_stringbuf
< _CharT, _Traits, _Alloc >
Public Types
• basic_stringbuf ()
• basic_stringbuf (__string_type &&__s, ios_base::openmode __mode=ios_base::in|ios_base::out)
• basic_stringbuf (basic_stringbuf &&__rhs)
• basic_stringbuf (basic_stringbuf &&__rhs, const allocator_type &__a)
• basic_stringbuf (const __string_type &__str, ios_base::openmode __mode=ios_base::in|ios_base::out)
• basic_stringbuf (const allocator_type &__a)
• template<typename _SAlloc >
basic_stringbuf (const basic_string< _CharT, _Traits, _SAlloc > &__s, const allocator_type &__a)
• template<typename _SAlloc >
basic_stringbuf (const basic_string< _CharT, _Traits, _SAlloc > &__s, ios_base::openmode __mode, const
allocator_type &__a)
• template<typename _SAlloc >
basic_stringbuf (const basic_string< _CharT, _Traits, _SAlloc > &__s, ios_base::openmode __←-
mode=ios_base::in|ios_base::out)
• basic_stringbuf (const basic_stringbuf &)=delete
• basic_stringbuf (ios_base::openmode __mode)
• basic_stringbuf (ios_base::openmode __mode, const allocator_type &__a)
• allocator_type get_allocator () const noexcept
• locale getloc () const
• streamsize in_avail ()
Generated by Doxygen
5.254 std::basic_stringbuf< _CharT, _Traits, _Alloc > Class Template Reference 1605
Generated by Doxygen
1606
Protected Attributes
• locale _M_buf_locale
• char_type ∗ _M_in_beg
• char_type ∗ _M_in_cur
• char_type ∗ _M_in_end
• ios_base::openmode _M_mode
• char_type ∗ _M_out_beg
• char_type ∗ _M_out_cur
• char_type ∗ _M_out_end
• __string_type _M_string
Template Parameters
This class associates either or both of its input and output sequences with a sequence of characters, which can be
initialized from, or made available as, a std::basic_string. (Paraphrased from [27.7.1]/1.)
For this class, open modes (of type ios_base::openmode) have in set if the input sequence can be read, and
out set if the output sequence can be written.
basic_stringbuf() [1/3]
Generated by Doxygen
5.254 std::basic_stringbuf< _CharT, _Traits, _Alloc > Class Template Reference 1607
basic_stringbuf() [2/3]
Parameters
The default constructor initializes the parent class using its own default ctor.
basic_stringbuf() [3/3]
Parameters
This constructor initializes the parent class using its own default ctor.
eback()
egptr()
Generated by Doxygen
1608
epptr()
gbump()
Parameters
_←- The delta by which to move.
_n
This just advances the read position without returning any data.
getloc()
gptr()
imbue()
Generated by Doxygen
5.254 std::basic_stringbuf< _CharT, _Traits, _Alloc > Class Template Reference 1609
Parameters
__loc A new locale.
Translations done during I/O which depend on the current locale are changed by this call. The standard adds, Between
invocations of this function a class derived from streambuf can safely cache results of calls to locale functions and to
members of facets so obtained.
Note
Reimplemented in std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, encoding_char_traits< _CharT > >,
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, and std::basic_filebuf< char_type, traits_type >.
in_avail()
Returns
If a read position is available, returns the number of characters available for reading before the buffer must be refilled.
Otherwise returns the derived showmanyc().
overflow()
Parameters
_←- An additional character to consume.
_c
Returns
Informally, this function is called when the output buffer is full (or does not exist, as buffering need not actually be done).
If a buffer exists, it is consumed, with some effect on the controlled sequence. (Typically, the buffer is written out to the
sequence verbatim.) In either case, the character c is also written out, if __c is not eof().
For a formal definition of this function, see a good text such as Langer & Kreft, or [27.5.2.4.5]/3-7.
A functioning output streambuf can be created by overriding only this function (no buffer area will be used).
Note
Generated by Doxygen
1610
pbackfail()
Parameters
_←- The character to be inserted back into the sequence.
_c
Returns
Postcondition
The constraints of gptr(), eback(), and pptr() are the same as for underflow().
Note
pbase()
pbump()
Parameters
_←- The delta by which to move.
_n
This just advances the write position without returning any data.
Generated by Doxygen
5.254 std::basic_stringbuf< _CharT, _Traits, _Alloc > Class Template Reference 1611
pptr()
pubimbue()
Parameters
__loc The new locale.
Returns
pubseekoff()
Parameters
__off Offset.
__way Value for ios_base::seekdir.
__mode Value for ios_base::openmode.
pubseekpos()
Generated by Doxygen
1612
Parameters
__sp Position
__mode Value for ios_base::openmode.
pubsetbuf()
pubsync()
sbumpc()
Returns
If the input read position is available, returns that character and increments the read pointer, otherwise calls and returns
uflow().
Referenced by std::basic_istream< _CharT, _Traits >::getline(), std::istreambuf_iterator< _CharT, _Traits >::operator++(),
and std::istreambuf_iterator< _CharT, _Traits >::operator++().
seekoff()
Note
Base class version does nothing, returns a pos_type that represents an invalid stream position.
Generated by Doxygen
5.254 std::basic_stringbuf< _CharT, _Traits, _Alloc > Class Template Reference 1613
seekpos()
Note
Base class version does nothing, returns a pos_type that represents an invalid stream position.
setbuf()
Parameters
Returns
this
If no buffer has already been created, and both __s and __n are non-zero, then __s is used as a buffer; see
https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.html#io.streambuf.←-
buffering for more.
Reimplemented from std::basic_streambuf< _CharT, _Traits >.
setg()
Parameters
__gbeg A pointer.
__gnext A pointer.
__gend A pointer.
Generated by Doxygen
1614
Postcondition
setp()
Parameters
__pbeg A pointer.
__pend A pointer.
Postcondition
sgetc()
Returns
If the input read position is available, returns that character, otherwise calls and returns underflow(). Does not
move the read position after fetching the character.
Referenced by std::basic_istream< _CharT, _Traits >::get(), std::basic_istream< _CharT, _Traits >::getline(),
std::basic_istream< _CharT, _Traits >::ignore(), std::basic_istream< _CharT, _Traits >::ignore(), std::istreambuf_iterator< _CharT, _Trait
and std::istreambuf_iterator< _CharT, _Traits >::operator++().
sgetn()
Parameters
Returns xsgetn(__s,__n). The effect is to fill __s[0] through __s[__n-1] with characters from the input sequence, if
possible.
Generated by Doxygen
5.254 std::basic_stringbuf< _CharT, _Traits, _Alloc > Class Template Reference 1615
showmanyc()
Returns
If it returns a positive value, then successive calls to underflow() will not return traits::eof() until at least that
number of characters have been supplied. If showmanyc() returns -1, then calls to underflow() or uflow()
will fail. [27.5.2.4.3]/1
Note
snextc()
Returns
Calls sbumpc(), and if that function returns traits::eof(), so does this function. Otherwise, sgetc().
Referenced by std::basic_istream< _CharT, _Traits >::getline(), std::basic_istream< _CharT, char_traits< _CharT > >::ignore(),
std::basic_istream< _CharT, char_traits< _CharT > >::operator>>(), and std::basic_istream< _CharT, char_traits< _CharT > >::putba
sputbackc()
Parameters
_←- The character to push back.
_c
Returns
Similar to sungetc(), but __c is pushed onto the stream instead of the previous character. If successful, the next character
fetched from the input stream will be __c.
Referenced by std::basic_istream< _CharT, _Traits >::putback().
Generated by Doxygen
1616
sputc()
Parameters
_←- A character to output.
_c
Returns
__c, if possible.
sputn()
Parameters
str() [1/2]
Returns
If the buffer is only created in input mode, the underlying character sequence is equal to the input sequence; otherwise,
it is equal to the output sequence. [27.7.1.2]/1
Generated by Doxygen
5.254 std::basic_stringbuf< _CharT, _Traits, _Alloc > Class Template Reference 1617
str() [2/2]
Generated by Doxygen
1618
Parameters
_←- The string to use as a new sequence.
_s
Deallocates any previous stored sequence, then copies s to use as a new one.
sungetc()
Returns
If a putback position is available, this function decrements the input pointer and returns that character. Otherwise, calls
and returns pbackfail(). The effect is to unget the last character gotten.
Referenced by std::basic_istream< _CharT, char_traits< _CharT > >::sentry::sentry().
sync()
Returns
-1 on failure.
Each derived class provides its own appropriate behavior, including the definition of failure.
Note
Reimplemented in __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, e
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, std::basic_filebuf< char_type, traits_type >, and std::wbuffer_convert< _Code
uflow()
Returns
Informally, this function does the same thing as underflow(), and in fact is required to call that function. It also
returns the new character, like underflow() does. However, this function also moves the read position forward by
one.
Reimplemented in __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >.
Generated by Doxygen
5.254 std::basic_stringbuf< _CharT, _Traits, _Alloc > Class Template Reference 1619
underflow()
Informally, this function is called when the input buffer is exhausted (or does not exist, as buffering need not actually be
done). If a buffer exists, it is refilled. In either case, the next available character is returned, or traits::eof() to
indicate a null pending sequence.
For a formal definition of the pending sequence, see a good text such as Langer & Kreft, or [27.5.2.4.3]/7-14.
A functioning input streambuf can be created by overriding only this function (no buffer area will be used). For an
example, see https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.html
Note
xsgetn()
Parameters
Returns
Fills __s[0] through __s[__n-1] with characters from the input sequence, as if by sbumpc(). Stops when either __n
characters have been copied, or when traits::eof() would be copied.
It is expected that derived classes provide a more efficient implementation by overriding this definition.
Reimplemented in std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, encoding_char_traits< _CharT > >,
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, and std::basic_filebuf< char_type, traits_type >.
References std::min().
xsputn()
Generated by Doxygen
1620
Parameters
Returns
Writes __s[0] through __s[__n-1] to the output sequence, as if by sputc(). Stops when either n characters have been
copied, or when sputc() would return traits::eof().
It is expected that derived classes provide a more efficient implementation by overriding this definition.
Reimplemented in std::basic_filebuf< _CharT, _Traits >, std::basic_filebuf< _CharT, encoding_char_traits< _CharT > >,
std::basic_filebuf< _CharT, std::char_traits< _CharT > >, and std::basic_filebuf< char_type, traits_type >.
References std::min().
_M_buf_locale
_M_in_beg
_M_in_cur
_M_in_end
_M_mode
_M_out_beg
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1621
_M_out_cur
_M_out_end
• iosfwd
• sstream
• sstream.tcc
std::ios_base
std::basic_ios< _CharT,
_Traits >
std::basic_istream std::basic_ostream
< _CharT, _Traits > < _CharT, _Traits >
std::basic_iostream
< _CharT, _Traits >
std::basic_stringstream
< _CharT, _Traits, _Alloc >
Generated by Doxygen
1622
Public Types
• basic_stringstream ()
• basic_stringstream (__string_type &&__str, ios_base::openmode __mode=ios_base::in|ios_base::out)
• basic_stringstream (basic_stringstream &&__rhs)
• basic_stringstream (const __string_type &__str, ios_base::openmode __m=ios_base::out|ios_base::in)
• template<typename _SAlloc >
basic_stringstream (const basic_string< _CharT, _Traits, _SAlloc > &__str, const allocator_type &__a)
• template<typename _SAlloc >
basic_stringstream (const basic_string< _CharT, _Traits, _SAlloc > &__str, ios_base::openmode __mode,
const allocator_type &__a)
• template<typename _SAlloc >
basic_stringstream (const basic_string< _CharT, _Traits, _SAlloc > &__str, ios_base::openmode __←-
mode=ios_base::in|ios_base::out)
• basic_stringstream (const basic_stringstream &)=delete
• basic_stringstream (ios_base::openmode __m)
• basic_stringstream (ios_base::openmode __mode, const allocator_type &__a)
• ∼basic_stringstream ()
• template<typename _ValueT >
basic_istream< _CharT, _Traits > & _M_extract (_ValueT &__v)
• const locale & _M_getloc () const
• template<typename _ValueT >
basic_ostream< _CharT, _Traits > & _M_insert (_ValueT __v)
• void _M_setstate (iostate __state)
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1623
Generated by Doxygen
1624
• template<__allocator_like _SAlloc>
requires (!is_same_v<_SAlloc, _Alloc>)
void str (const basic_string< _CharT, _Traits, _SAlloc > &__s)
• void swap (basic_stringstream &__rhs)
• pos_type tellp ()
• basic_ostream< _CharT, _Traits > ∗ tie () const
• basic_ostream< _CharT, _Traits > ∗ tie (basic_ostream< _CharT, _Traits > ∗__tiestr)
• void unsetf (fmtflags __mask)
• basic_string_view< char_type, traits_type > view () const noexcept
• char_type widen (char __c) const
• streamsize width () const
• streamsize width (streamsize __wide)
Extractors
All the operator>> functions (aka formatted input functions) have some common behavior. Each starts by
constructing a temporary object of type std::basic_istream::sentry with the second argument (noskipws) set to false.
This has several effects, concluding with the setting of a status flag; see the sentry documentation for more.
If the sentry status is good, the function tries to extract whatever data is appropriate for the type of the argument.
If an exception is thrown during extraction, ios_base::badbit will be turned on in the stream's error state (without
causing an ios_base::failure to be thrown) and the original exception will be rethrown if badbit is set in the exceptions
mask.
• int_type get ()
• __istream_type & get (char_type &__c)
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1625
Generated by Doxygen
1626
Protected Types
• enum { _S_local_word_size }
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1627
Protected Attributes
• _Callback_list ∗ _M_callbacks
• const __ctype_type ∗ _M_ctype
• iostate _M_exception
• char_type _M_fill
• bool _M_fill_init
• fmtflags _M_flags
• streamsize _M_gcount
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
• const __num_get_type ∗ _M_num_get
• const __num_put_type ∗ _M_num_put
• streamsize _M_precision
• basic_streambuf< _CharT, _Traits > ∗ _M_streambuf
• iostate _M_streambuf_state
• basic_ostream< _CharT, _Traits > ∗ _M_tie
• streamsize _M_width
• _Words ∗ _M_word
• int _M_word_size
• _Words _M_word_zero
Template Parameters
This class supports reading from and writing to objects of type std::basic_string, using the inherited functions from std←-
::basic_iostream. To control the associated sequence, an instance of std::basic_stringbuf is used, which this page refers
to as sb.
Generated by Doxygen
1628
event_callback
Parameters
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
iostate
• badbit
• eofbit
• failbit
• goodbit
openmode
• app
• ate
• binary
• in
• out
• trunc
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1629
seekdir
• beg
event
basic_stringstream() [1/3]
basic_stringstream() [2/3]
Parameters
Initializes sb using the mode from __m, and passes &sb to the base class initializer. Does not allocate any buffer.
That's a lie. We initialize the base class with NULL, because the string class does its own memory management.
basic_stringstream() [3/3]
Parameters
Generated by Doxygen
1630
Initializes sb using __str and __m, and passes &sb to the base class initializer.
That's a lie. We initialize the base class with NULL, because the string class does its own memory management.
∼basic_stringstream()
template<typename _CharT , typename _Traits , typename _Alloc >
std::basic_stringstream< _CharT, _Traits, _Alloc >::∼basic_stringstream () [inline]
The destructor does nothing.
The buffer is deallocated by the stringbuf object, not the formatting stream.
_M_getloc()
bad()
clear()
Parameters
See std::ios_base::iostate for the possible bit values. Most users will not need to pass an argument.
Referenced by std::basic_ios< _CharT, _Traits >::exceptions(), std::__detail::operator>>(), and std::basic_ios< _CharT, _Traits >::setsta
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1631
copyfmt()
Parameters
Returns
All fields of __rhs are copied into this object except that rdbuf() and rdstate() remain unchanged. All values in the pword
and iword arrays are copied. Before copying, each callback is invoked with erase_event. After copying, each (new)
callback is invoked with copyfmt_event. The final step is to copy exceptions().
References std::__addressof(), std::basic_ios< _CharT, _Traits >::exceptions(), std::basic_ios< _CharT, _Traits >::fill(),
std::ios_base::flags(), std::ios_base::getloc(), std::ios_base::precision(), std::basic_ios< _CharT, _Traits >::tie(),
std::tie(), and std::ios_base::width().
eof()
Returns
exceptions() [1/2]
Returns
This changes nothing in the stream. See the one-argument version of exceptions(iostate) for the meaning of the return
value.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt().
exceptions() [2/2]
Generated by Doxygen
1632
Parameters
__except The new exceptions mask.
By default, error flags are set silently. You can set an exceptions mask for each stream; if a bit in the mask becomes set
in the error flags, then an exception of type std::ios_base::failure is thrown.
If the error flag is already set when the exceptions mask is added, the exception is immediately thrown. Try running the
following under GCC 3.1 or later:
#include <iostream>
#include <fstream>
#include <exception>
int main()
{
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
std::ifstream f ("/etc/motd");
fail()
Checking the badbit in fail() is historical practice. Note that other iostate flags may also be set.
References std::ios_base::badbit, std::ios_base::failbit, and std::basic_ios< _CharT, _Traits >::rdstate().
Referenced by std::basic_ios< _CharT, _Traits >::operator bool(), std::basic_ios< _CharT, _Traits >::operator!(),
std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >::seekp(), std::basic_ostream< _CharT, _Traits >
and std::regex_traits< typename >::value().
fill() [1/2]
fill() [2/2]
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1633
Parameters
__ch The new character.
Returns
The fill character is used to fill out space when P+ characters have been requested (e.g., via setw), Q characters are
actually used, and Q<P. It defaults to a space (' ') in the current locale.
flags() [1/2]
Returns
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags all at once.
Parameters
Returns
flush()
Returns
∗this
Generated by Doxygen
1634
gcount()
Returns
The number of characters extracted by the previous unformatted input function dispatched for this stream.
get() [1/6]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.
get() [2/6]
Parameters
Returns
∗this
Returns get(__sb,widen('\n')).
get() [3/6]
Parameters
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1635
Returns
∗this
Characters are extracted and inserted into __sb until one of the following happens:
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted)
• the next character equals __delim (in this case, the character is not extracted)
get() [4/6]
Parameters
_←- The character in which to store data.
_c
Returns
∗this
Tries to extract a character and store it in __c. If none are available, sets failbit and returns traits::eof().
Note
get() [5/6]
Parameters
_←- Pointer to an array.
_s
_←- Maximum number of characters to store in s.
_n
Returns
∗this
Returns get(__s,__n,widen('\n')).
Generated by Doxygen
1636
get() [6/6]
Parameters
__s Pointer to an array.
__n Maximum number of characters to store in __s.
__delim A "stop" character.
Returns
∗this
Characters are extracted and stored into __s until one of the following happens:
• the next character equals __delim, in which case the character is not extracted
Note
getline() [1/3]
Parameters
_←- A character array in which to store the data.
_s
_←- Maximum number of characters to extract.
_n
Returns
∗this
Returns getline(__s,__n,widen('\n')).
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1637
getline() [2/3]
Parameters
__s A character array in which to store the data.
__n Maximum number of characters to extract.
__delim A "stop" character.
Returns
∗this
Extracts and stores characters into __s until one of the following happens. Note that these criteria are required to be
tested in the order listed here, to allow an input line to exactly fill the __s array without setting failbit.
1. the input sequence reaches end-of-file, in which case eofbit is set in the stream error state
2. the next character equals __delim, in which case the character is extracted (and therefore counted in
gcount()) but not stored
3. __n-1 characters are stored, in which case failbit is set in the stream error state
If no characters are extracted, failbit is set. (An empty line of input should therefore not cause failbit to be set.)
In any case, a null character is stored in the next location in the array.
References std::ios_base::eofbit, std::ios_base::goodbit, std::basic_streambuf< _CharT, _Traits >::sbumpc(),
std::basic_streambuf< _CharT, _Traits >::sgetc(), and std::basic_streambuf< _CharT, _Traits >::snextc().
getline() [3/3]
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
Generated by Doxygen
1638
good()
Returns
ignore() [1/3]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit.
ignore() [2/3]
Returns
A character, or eof().
Tries to extract a character. If none are available, sets failbit and returns traits::eof().
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
ignore() [3/3]
Parameters
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1639
Returns
∗this
Extracts characters and throws them away until one of the following happens:
• if __n != std::numeric_limits<int>::max(), __n characters are extracted
• the next character equals __delim (in this case, the character is extracted); note that this condition will never occur
if __delim equals traits::eof().
NB: Provide three overloads, instead of the single function (with defaults) mandated by the Standard: this leads to a
better performing implementation, while still conforming to the Standard.
References std::ios_base::goodbit, and std::basic_streambuf< _CharT, _Traits >::sgetc().
imbue()
Parameters
__loc The new locale.
Returns
Calls ios_base::imbue(loc), and if a stream buffer is associated with this stream, calls that buffer's
pubimbue(loc).
Additional l10n notes are at https://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.←-
html
References std::ios_base::imbue().
Referenced by std::chrono::operator<<().
init()
iword()
Parameters
_←- Index into the array.
_ix
Generated by Doxygen
1640
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
narrow()
Parameters
__c The character to narrow.
__dfault The character to narrow.
Returns
operator bool()
operator"!()
operator<<() [1/17]
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1641
operator<<() [2/17]
operator<<() [3/17]
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from __sb and inserted into ∗this until one of the following occurs:
• insertion into the output sequence fails (in this case, the character that would have been inserted is not extracted),
or
• an exception occurs while getting a character from __sb, which sets failbit in the error state
operator<<() [4/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [5/17]
Generated by Doxygen
1642
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [6/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [7/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1643
operator<<() [8/17]
Generated by Doxygen
1644
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [9/17]
operator<<() [10/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1645
operator<<() [12/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [13/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
References std::ios_base::badbit, std::ios_base::goodbit, std::num_put< _CharT, _OutIter >::put(), std::basic_ios< _CharT, _Traits >::se
and std::use_facet().
operator<<() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
1646
operator<<() [15/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
operator<<() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to perform numeric formatting.
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1647
operator>>() [1/17]
operator>>() [2/17]
operator>>() [3/17]
Parameters
This function behaves like one of the basic arithmetic extractors, in that it also constructs a sentry object and has the
same error handling behavior.
If __sb is NULL, the stream will set failbit in its error state.
Characters are extracted from this stream and inserted into the __sb streambuf until one of the following occurs:
• insertion into the output buffer fails (in this case, the character that would have been inserted is not extracted), or
operator>>() [4/17]
Parameters
Generated by Doxygen
1648
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [5/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [6/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [7/17]
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1649
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [8/17]
operator>>() [9/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [10/17]
Parameters
Generated by Doxygen
1650
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [11/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [12/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
References std::ios_base::badbit, std::ios_base::failbit, std::num_get< _CharT, _InIter >::get(), std::ios_base::goodbit,
and std::use_facet().
operator>>() [13/17]
Parameters
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1651
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [14/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [15/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
operator>>() [16/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
Generated by Doxygen
1652
operator>>() [17/17]
Parameters
Returns
∗this if successful
These functions use the stream's current locale (specifically, the num_get facet) to parse the input data.
peek()
Returns
If, after constructing the sentry object, good() is false, returns traits::eof(). Otherwise reads but does not
extract the next input character.
precision() [1/2]
Returns
precision() [2/2]
streamsize std::ios_base::precision (
streamsize __prec) [inline], [inherited]
Changing flags.
Parameters
__prec The new precision value.
Returns
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1653
put()
Parameters
_←- The character to insert.
_c
Returns
∗this
Note
References std::ios_base::badbit, std::ios_base::goodbit, std::basic_ios< _CharT, _Traits >::rdbuf(), and std::basic_ios< _CharT, _Traits >
putback()
Parameters
_←- The character to push back into the input stream.
_c
Returns
∗this
Note
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
pword()
Generated by Doxygen
1654
Parameters
_←- Index into the array.
_ix
Returns
The pword function provides access to an array of pointers that can be used for any purpose. The array grows as
required to hold the supplied index. All pointers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
rdbuf() [1/2]
Parameters
Returns
Associates a new buffer with the current stream, and clears the error state.
Due to historical accidents which the LWG refuses to correct, the I/O library suffers from a design error: this function is
hidden in derived classes by overrides of the zero-argument rdbuf(), which is non-virtual for hysterical raisins. As a
result, you must use explicit qualifications to access this function via any derived class. For example:
std::fstream foo; // or some other derived type
std::streambuf* p = .....;
rdbuf() [2/2]
Returns
rdstate()
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1655
Returns
See std::ios_base::iostate for the possible bit values. Most users will call one of the interpreting wrappers, e.g., good().
Referenced by std::basic_ios< _CharT, _Traits >::bad(), std::basic_ios< _CharT, _Traits >::eof(), std::basic_ios< _CharT, _Traits >::fail(
std::basic_ios< _CharT, _Traits >::good(), and std::basic_ios< _CharT, _Traits >::setstate().
read()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Returns
∗this
If the stream state is good(), extracts characters and stores them into __s until one of the following happens:
• the input sequence reaches end-of-file, in which case the error state is set to failbit|eofbit.
Note
readsome()
Parameters
_←- A character array.
_s
_←- Maximum number of characters to store.
_n
Generated by Doxygen
1656
Returns
Extracts characters and stores them into __s depending on the number of characters remaining in the streambuf's buffer,
rdbuf()->in_avail(), called A here:
• if A == -1, sets eofbit and extracts no characters
• if A == 0, extracts no characters
The goal is to empty the current buffer, and to not request any more from the external input sequence controlled by the
streambuf.
References std::ios_base::badbit, std::ios_base::eofbit, std::ios_base::goodbit, and std::min().
register_callback()
void std::ios_base::register_callback (
event_callback __fn,
int __index) [inherited]
Add the callback __fn with parameter __index.
Parameters
Registers a function as an event callback with an integer parameter to be passed to the function when invoked. Multiple
copies of the function are allowed. If there are multiple callbacks, they are invoked in the order they were registered.
seekg() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(__off,__dir). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1657
seekg() [2/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(__pos). If that function fails, sets failbit.
Note
This function first clears eofbit. It does not count the number of characters extracted, if any, and therefore does not
affect the next call to gcount().
seekp() [1/2]
Parameters
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekoff(off,dir). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
seekp() [2/2]
Parameters
Generated by Doxygen
1658
Returns
∗this
If fail() is not true, calls rdbuf()->pubseekpos(pos). If that function fails, sets failbit.
References std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::failbit, std::ios_base::out, std::basic_ios< _CharT, _Traits >::rdbuf(),
and std::basic_ios< _CharT, _Traits >::setstate().
setf() [1/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function sets additional flags in format control. Flags that were previously set remain set.
Referenced by std::__detail::operator>>().
setf() [2/2]
fmtflags std::ios_base::setf (
fmtflags __fmtfl,
fmtflags __mask) [inline], [inherited]
Setting new format flags.
Parameters
Returns
This function clears mask in the format flags, then sets fmtfl & mask. An example mask is ios_base←-
::adjustfield.
setstate()
Parameters
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1659
str() [1/2]
Returns
rdbuf()->str()
str() [2/2]
Parameters
_←- The string to use as a new sequence.
_s
Calls rdbuf()->str(s).
sync()
Returns
0 on success, -1 on failure
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount().
Generated by Doxygen
1660
sync_with_stdio()
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1661
Parameters
__sync Whether to synchronize or not.
Returns
The synchronization referred to is only that between the standard C facilities (e.g., stdout) and the stan-
dard C++ objects (e.g., cout). User-declared streams are unaffected. See https://gcc.gnu.←-
org/onlinedocs/libstdc++/manual/fstreams.html#std.io.filestreams.binary
tellg()
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,in).
Note
This function does not count the number of characters extracted, if any, and therefore does not affect the next call
to gcount(). At variance with putback, unget and seekg, eofbit is not cleared first.
tellp()
Returns
If fail() is not false, returns pos_type(-1) to indicate failure. Otherwise returns rdbuf()->pubseekoff(0,cur,out).
References std::ios_base::cur, std::basic_ios< _CharT, _Traits >::fail(), std::ios_base::out, and std::basic_ios< _CharT, _Traits >::rdbuf()
tie() [1/2]
A stream may be tied (or synchronized) to a second output stream. When this stream performs any I/O, the tied stream
is first flushed. For example, std::cin is tied to std::cout.
Referenced by std::basic_ostream< _CharT, _Traits >::sentry::sentry(), and std::basic_ios< _CharT, _Traits >::copyfmt().
Generated by Doxygen
1662
tie() [2/2]
Parameters
__tiestr The output stream.
Returns
The previously tied output stream, or NULL if the stream was not tied.
unget()
Returns
∗this
This function first clears eofbit. Since no characters are extracted, the next call to gcount() will return 0, as
required by DR 60.
unsetf()
void std::ios_base::unsetf (
fmtflags __mask) [inline], [inherited]
Clearing format flags.
Parameters
widen()
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1663
Parameters
_←- The character to widen.
_c
Returns
width() [1/2]
width() [2/2]
streamsize std::ios_base::width (
streamsize __wide) [inline], [inherited]
Changing flags.
Parameters
__wide The new width value.
Returns
write()
Parameters
_←- The array to insert.
_s
_←- Maximum number of characters to insert.
_n
Generated by Doxygen
1664
Returns
∗this
Characters are copied from __s and inserted into the stream until one of the following happens:
• inserting into the output sequence fails (in this case, badbit will be set in the stream's error state)
Note
xalloc()
Returns
This function returns a unique integer every time it is called. It can be used for any purpose, but is primarily intended to
be a unique index for the iword and pword functions. The expectation is that an application calls xalloc in order to obtain
an index in the iword and pword arrays that can be used without fear of conflict.
The implementation maintains a static variable that is incremented and returned on each invocation. xalloc is guaranteed
to return an index that is safe to use in the iword and pword arrays.
_M_gcount
adjustfield
app
ate
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1665
badbit
basefield
beg
binary
boolalpha
cur
dec
Generated by Doxygen
1666
end
eofbit
failbit
fixed
floatfield
goodbit
Generated by Doxygen
5.255 std::basic_stringstream< _CharT, _Traits, _Alloc > Class Template Reference 1667
std::basic_istream< _CharT, _Traits >::ignore(), std::basic_ostream< _CharT, _Traits >::operator<<(), std::basic_istream< _CharT, _Tr
std::basic_istream< _CharT, _Traits >::operator>>(), std::basic_istream< _CharT, _Traits >::operator>>(), std::operator>>(),
std::basic_ostream< _CharT, _Traits >::put(), std::basic_istream< _CharT, _Traits >::putback(), std::basic_istream< _CharT, _Traits >::r
std::basic_istream< _CharT, _Traits >::readsome(), std::basic_istream< _CharT, _Traits >::seekg(), std::basic_istream< _CharT, _Traits
std::basic_istream< _CharT, char_traits< _CharT > >::seekg(), std::basic_istream< _CharT, _Traits >::sync(),
std::basic_istream< _CharT, _Traits >::unget(), and std::ws().
hex
in
internal
left
oct
out
right
Generated by Doxygen
1668
Adds fill characters on the left (initial positions) of certain generated output. (I.e., the thing you print is flush right.)
Referenced by std::right().
scientific
showbase
showpoint
showpos
skipws
trunc
unitbuf
uppercase
• iosfwd
• sstream
Generated by Doxygen
5.256 std::bernoulli_distribution Class Reference 1669
Classes
• struct param_type
Public Types
• bernoulli_distribution ()
• bernoulli_distribution (const param_type &__p)
• bernoulli_distribution (double __p)
• template<typename _ForwardIterator , typename _UniformRandomNumberGenerator >
void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng)
• template<typename _ForwardIterator , typename _UniformRandomNumberGenerator >
void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng, const
param_type &__p)
• template<typename _UniformRandomNumberGenerator >
void __generate (result_type ∗__f, result_type ∗__t, _UniformRandomNumberGenerator &__urng, const
param_type &__p)
• result_type max () const
• result_type min () const
• template<typename _UniformRandomNumberGenerator >
result_type operator() (_UniformRandomNumberGenerator &__urng)
• template<typename _UniformRandomNumberGenerator >
result_type operator() (_UniformRandomNumberGenerator &__urng, const param_type &__p)
• double p () const
• param_type param () const
• void param (const param_type &__param)
• void reset ()
Friends
Since
C++11
result_type
bool std::bernoulli_distribution::result_type
The type of the range of the distribution.
Generated by Doxygen
1670
bernoulli_distribution() [1/2]
std::bernoulli_distribution::bernoulli_distribution () [inline]
Constructs a Bernoulli distribution with likelihood 0.5.
bernoulli_distribution() [2/2]
std::bernoulli_distribution::bernoulli_distribution (
double __p) [inline], [explicit]
Constructs a Bernoulli distribution with likelihood p.
Parameters
_←- [IN] The likelihood of a true result being returned. Must be in the interval [0, 1].
_p
max()
min()
operator()()
p()
param() [1/2]
Generated by Doxygen
5.257 std::bidirectional_iterator_tag Struct Reference 1671
param() [2/2]
void std::bernoulli_distribution::param (
const param_type & __param) [inline]
Sets the parameter set of the distribution.
Parameters
reset()
operator==
bool operator== (
const bernoulli_distribution & __d1,
const bernoulli_distribution & __d2) [friend]
Return true if two Bernoulli distributions have the same parameters.
The documentation for this class was generated from the following files:
• random.h
• bits/random.tcc
Generated by Doxygen
1672
std::input_iterator_tag
std::forward_iterator_tag
std::bidirectional
_iterator_tag
std::random_access
_iterator_tag
std::contiguous_iterator_tag
• stl_iterator_base_types.h
Generated by Doxygen
5.258 __gnu_pbds::detail::bin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer,
Reference, Const_Reference, Is_Forward_Iterator, _Alloc > Class Template Reference 1673
__gnu_pbds::detail __gnu_pbds::detail
::bin_search_tree_const ::bin_search_tree_it
_it_< Node_Pointer, Value _< Node_Pointer, Value
_Type, Pointer, Const_Pointer, _Type, Pointer, Const_Pointer,
Reference, Const_Reference, Reference, Const_Reference,
Is_Forward_Iterator, _Alloc > Is_Forward_Iterator, _Alloc >
Public Types
Generated by Doxygen
1674
Public Attributes
• Node_Pointer m_p_nd
Const iterator.
The documentation for this class was generated from the following file:
• point_iterators.hpp
__gnu_pbds::detail __gnu_pbds::detail
::bin_search_tree_const ::bin_search_tree_node
_node_it_< Node, Const _it_< Node, Const_Iterator,
_Iterator, Iterator, _Alloc > Iterator, _Alloc >
Public Types
Generated by Doxygen
5.259 __gnu_pbds::detail::bin_search_tree_const_node_it_< Node, Const_Iterator, Iterator, _Alloc > Class
Template Reference 1675
Public Attributes
• node_pointer m_p_nd
const_reference
difference_type
iterator_category
metadata_const_reference
metadata_type
Generated by Doxygen
1676
reference
value_type
get_l_child()
get_metadata()
get_r_child()
operator"!=()
operator∗()
Generated by Doxygen
5.260 __gnu_pbds::detail::bin_search_tree_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer,
Reference, Const_Reference, Is_Forward_Iterator, _Alloc > Class Template Reference 1677
operator==()
• bin_search_tree_/node_iterators.hpp
__gnu_pbds::detail __gnu_pbds::detail
::bin_search_tree_const ::bin_search_tree_it
_it_< Node_Pointer, Value _< Node_Pointer, Value
_Type, Pointer, Const_Pointer, _Type, Pointer, Const_Pointer,
Reference, Const_Reference, Reference, Const_Reference,
Is_Forward_Iterator, _Alloc > Is_Forward_Iterator, _Alloc >
Public Types
Generated by Doxygen
1678
Public Attributes
• Node_Pointer m_p_nd
Protected Types
Iterator.
The documentation for this class was generated from the following file:
• point_iterators.hpp
Generated by Doxygen
5.261 __gnu_pbds::detail::bin_search_tree_node_it_< Node, Const_Iterator, Iterator, _Alloc > Class
Template Reference 1679
__gnu_pbds::detail __gnu_pbds::detail
::bin_search_tree_const ::bin_search_tree_node
_node_it_< Node, Const _it_< Node, Const_Iterator,
_Iterator, Iterator, _Alloc > Iterator, _Alloc >
Public Types
Public Attributes
• node_pointer m_p_nd
Node iterator.
const_reference
Generated by Doxygen
1680
difference_type
iterator_category
metadata_const_reference
metadata_type
reference
value_type
get_l_child()
get_metadata()
Generated by Doxygen
5.262 __gnu_pbds::detail::bin_search_tree_traits< Key, Mapped, Cmp_Fn, Node_Update, Node, _Alloc >
Struct Template Reference 1681
Metadata access.
get_r_child()
operator"!=()
operator∗()
operator==()
• bin_search_tree_/node_iterators.hpp
Public Types
Generated by Doxygen
1682
template<typename Key, typename Mapped, class Cmp_Fn, template< typename Node_CItr, class Node_Itr,
class _Cmp_Fn, typename _Alloc > class Node_Update, class Node, typename _Alloc>
struct __gnu_pbds::detail::bin_search_tree_traits< Key, Mapped, Cmp_Fn, Node_Update, Node, _Alloc >
node_const_iterator
template<typename Key , typename Mapped , class Cmp_Fn , template< typename Node_CItr, class
Node_Itr, class _Cmp_Fn, typename _Alloc > class Node_Update, class Node , typename _Alloc >
bin_search_tree_const_node_it_< Node, point_const_iterator, point_iterator, _Alloc> __gnu_pbds::detail::bin_searc
Key, Mapped, Cmp_Fn, Node_Update, Node, _Alloc >::node_const_iterator
This is an iterator to an iterator: it iterates over nodes, and de-referencing it returns one of the tree's iterators.
The documentation for this struct was generated from the following file:
• bin_search_tree_/traits.hpp
Public Types
Generated by Doxygen
5.264 __gnu_cxx::binary_compose< _Operation1, _Operation2, _Operation3 > Class Template Reference
1683
template<typename Key, class Cmp_Fn, template< typename Node_CItr, class Node_Itr, class _Cmp_Fn, type-
name _Alloc > class Node_Update, class Node, typename _Alloc>
struct __gnu_pbds::detail::bin_search_tree_traits< Key, null_type, Cmp_Fn, Node_Update, Node, _Alloc >
Specialization.
node_const_iterator
template<typename Key , class Cmp_Fn , template< typename Node_CItr, class Node_Itr, class _Cmp←-
_Fn, typename _Alloc > class Node_Update, class Node , typename _Alloc >
bin_search_tree_const_node_it_< Node, point_const_iterator, point_iterator, _Alloc> __gnu_pbds::detail::bin_searc
Key, null_type, Cmp_Fn, Node_Update, Node, _Alloc >::node_const_iterator
This is an iterator to an iterator: it iterates over nodes, and de-referencing it returns one of the tree's iterators.
The documentation for this struct was generated from the following file:
• bin_search_tree_/traits.hpp
std::unary_function
< _Operation2::argument
_type, _Operation1::result_type >
__gnu_cxx::binary_compose
< _Operation1, _Operation2,
_Operation3 >
Public Types
• binary_compose (const _Operation1 &__x, const _Operation2 &__y, const _Operation3 &__z)
• _Operation1::result_type operator() (const typename _Operation2::argument_type &__x) const
Generated by Doxygen
1684
Protected Attributes
• _Operation1 _M_fn1
• _Operation2 _M_fn2
• _Operation3 _M_fn3
An SGI extension .
argument_type
result_type
• ext/functional
__gnu_parallel::_Multiplies
< _Tp1, _Tp2, _Result >
std::binary_function __gnu_parallel::_Plus
< _Arg1, _Arg2, _Result > < _Tp1, _Tp2, _Result >
std::pointer_to_binary
_function< _Arg1, _Arg2,
_Result >
Generated by Doxygen
5.266 __gnu_pbds::detail::binary_heap< Value_Type, Cmp_Fn, _Alloc > Class Template Reference 1685
Public Types
first_argument_type
result_type
second_argument_type
• stl_function.h
Generated by Doxygen
1686
__gnu_pbds::detail
::resize_policy< _Alloc
::size_type >
__gnu_pbds::detail
::binary_heap< Value
_Type, Cmp_Fn, _Alloc >
Public Types
Generated by Doxygen
5.266 __gnu_pbds::detail::binary_heap< Value_Type, Cmp_Fn, _Alloc > Class Template Reference 1687
• template<typename It >
void copy_from_range (It, It)
• binary_heap_.hpp
Generated by Doxygen
1688
__gnu_pbds::detail
__gnu_pbds::detail
::binary_heap_point
::binary_heap_const
_const_iterator_< Value
_iterator_< Value_Type,
_Type, Entry, Simple,
Entry, Simple, _Alloc >
_Alloc >
Public Types
• binary_heap_const_iterator_ ()
• binary_heap_const_iterator_ (const binary_heap_const_iterator_ &other)
• binary_heap_const_iterator_ (entry_pointer p_e)
• bool operator!= (const binary_heap_const_iterator_ &other) const
• bool operator!= (const binary_heap_point_const_iterator_ &other) const
• const_reference operator∗ () const
• binary_heap_const_iterator_ & operator++ ()
• binary_heap_const_iterator_ operator++ (int)
• const_pointer operator-> () const
• bool operator== (const binary_heap_const_iterator_ &other) const
• bool operator== (const binary_heap_point_const_iterator_ &other) const
Public Attributes
• entry_pointer m_p_e
Generated by Doxygen
5.267 __gnu_pbds::detail::binary_heap_const_iterator_< Value_Type, Entry, Simple, _Alloc > Class
Template Reference 1689
const_pointer
const_reference
difference_type
iterator_category
pointer
reference
value_type
binary_heap_const_iterator_() [1/2]
Generated by Doxygen
1690
binary_heap_const_iterator_() [2/2]
operator"!=() [1/2]
operator"!=() [2/2]
operator∗()
operator->()
operator==() [1/2]
Generated by Doxygen
5.268 __gnu_pbds::detail::binary_heap_point_const_iterator_< Value_Type, Entry, Simple, _Alloc > Class
Template Reference 1691
operator==() [2/2]
__gnu_pbds::detail
__gnu_pbds::detail
::binary_heap_point
::binary_heap_const
_const_iterator_< Value
_iterator_< Value_Type,
_Type, Entry, Simple,
Entry, Simple, _Alloc >
_Alloc >
Public Types
• binary_heap_point_const_iterator_ ()
• binary_heap_point_const_iterator_ (const binary_heap_point_const_iterator_ &other)
• binary_heap_point_const_iterator_ (entry_pointer p_e)
• bool operator!= (const binary_heap_point_const_iterator_ &other) const
• const_reference operator∗ () const
• const_pointer operator-> () const
• bool operator== (const binary_heap_point_const_iterator_ &other) const
Public Attributes
• entry_pointer m_p_e
Generated by Doxygen
1692
Protected Types
const_pointer
const_reference
difference_type
iterator_category
pointer
reference
Generated by Doxygen
5.268 __gnu_pbds::detail::binary_heap_point_const_iterator_< Value_Type, Entry, Simple, _Alloc > Class
Template Reference 1693
value_type
binary_heap_point_const_iterator_() [1/2]
binary_heap_point_const_iterator_() [2/2]
operator"!=()
operator∗()
operator->()
operator==()
Generated by Doxygen
1694
• binary_heap_/point_const_iterator.hpp
__gnu_pbds::container_tag
__gnu_pbds::priority
_queue_tag
__gnu_pbds::binary
_heap_tag
Binary-heap (array-based).
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
Generated by Doxygen
5.270 std::binary_negate< _Predicate > Class Template Reference 1695
std::binary_function
< _Predicate::first_argument std::binary_negate
_type, _Predicate::second < _Predicate >
_argument_type, bool >
Public Types
Protected Attributes
• _Predicate _M_pred
template<typename _Predicate>
class std::binary_negate< _Predicate >
first_argument_type
result_type
Generated by Doxygen
1696
second_argument_type
• stl_function.h
std::unary_function
< _Operation::second
_argument_type, _Operation
::result_type >
Public Types
Protected Attributes
• _Operation op
• _Operation::first_argument_type value
template<typename _Operation>
class std::binder1st< _Operation >
Generated by Doxygen
5.272 std::binder2nd< _Operation > Class Template Reference 1697
argument_type
result_type
• binders.h
std::unary_function
< _Operation::first
_argument_type, _Operation
::result_type >
Public Types
Protected Attributes
• _Operation op
• _Operation::second_argument_type value
Generated by Doxygen
1698
template<typename _Operation>
class std::binder2nd< _Operation >
argument_type
result_type
• binders.h
Classes
• struct param_type
Public Types
Generated by Doxygen
5.273 std::binomial_distribution< _IntType > Class Template Reference 1699
Friends
C++11
result_type
max()
min()
Generated by Doxygen
1700
operator()() [1/2]
operator()() [2/2]
p()
param() [1/2]
param() [2/2]
Parameters
reset()
Generated by Doxygen
5.273 std::binomial_distribution< _IntType > Class Template Reference 1701
t()
operator<<
Parameters
__os An output stream.
__x A binomial_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
operator==
operator>>
Parameters
_←- An input stream.
_is
_←- A binomial_distribution random number generator engine.
_x
Generated by Doxygen
1702
Returns
The documentation for this class was generated from the following files:
• random.h
• bits/random.tcc
__gnu_pbds::detail __gnu_pbds::detail
__gnu_pbds::detail
::left_child_next_sibling ::binomial_heap_base
::binomial_heap< Value
_heap< Value_Type, Cmp_Fn, < Value_Type, Cmp_Fn,
_Type, Cmp_Fn, _Alloc >
_Alloc::size_type, _Alloc > _Alloc >
Public Types
Generated by Doxygen
5.274 __gnu_pbds::detail::binomial_heap< Value_Type, Cmp_Fn, _Alloc > Class Template Reference 1703
Protected Types
Protected Attributes
• node_pointer m_p_max
• node_pointer m_p_root
• size_type m_size
Binomial heap.
The documentation for this class was generated from the following file:
• binomial_heap_.hpp
Generated by Doxygen
1704
__gnu_pbds::detail
::binomial_heap< Value
__gnu_pbds::detail __gnu_pbds::detail _Type, Cmp_Fn, _Alloc >
::left_child_next_sibling ::binomial_heap_base
_heap< Value_Type, Cmp_Fn, < Value_Type, Cmp_Fn,
_Alloc::size_type, _Alloc > _Alloc > __gnu_pbds::detail
::rc_binomial_heap<
Value_Type, Cmp_Fn,
_Alloc >
Public Types
• iterator begin ()
• const_iterator begin () const
• void clear ()
• bool empty () const
• iterator end ()
• const_iterator end () const
• void erase (point_iterator)
• template<typename Pred >
size_type erase_if (Pred)
• Cmp_Fn & get_cmp_fn ()
• const Cmp_Fn & get_cmp_fn () const
• void join (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)
• size_type max_size () const
• void modify (point_iterator, const_reference)
• void pop ()
• point_iterator push (const_reference)
Generated by Doxygen
5.275 __gnu_pbds::detail::binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > Class Template Reference
1705
Protected Types
Protected Attributes
• node_pointer m_p_max
• node_pointer m_p_root
• size_type m_size
• binomial_heap_base_.hpp
• rc_binomial_heap_.hpp
Generated by Doxygen
1706
__gnu_pbds::container_tag
__gnu_pbds::priority
_queue_tag
__gnu_pbds::binomial
_heap_tag
Binomial-heap.
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
__gnu_cxx::free_list
__gnu_cxx::bitmap_allocator
< _Tp >
Generated by Doxygen
5.277 __gnu_cxx::bitmap_allocator< _Tp > Class Template Reference 1707
Public Types
template<typename _Tp>
class __gnu_cxx::bitmap_allocator< _Tp >
_M_allocate_single_object()
Exceptions
Complexity: Worst case complexity is O(N), but that is hardly ever hit. If and when this particular case is encountered,
the next few cases are guaranteed to have a worst case complexity of O(1)! That's why this function performs very well
on average. You can consider this function to have a complexity referred to commonly as: Amortized Constant time.
References __gnu_cxx::__detail::__bit_allocate(), __gnu_cxx::__detail::__num_bitmaps(), and __gnu_cxx::_Bit_scan_forward().
Generated by Doxygen
1708
_M_deallocate_single_object()
• bitmap_allocator.h
Public Types
Generated by Doxygen
5.279 std::bitset< _Nb > Class Template Reference 1709
• constexpr bitset< _Nb > & set (size_t __pos, bool __val=true)
• template<typename _CharT , typename _Traits , typename _Alloc >
constexpr std::basic_string< _CharT, _Traits, _Alloc > to_string () const
• template<typename _CharT , typename _Traits >
constexpr std::basic_string< _CharT, _Traits, std::allocator< _CharT > > to_string () const
• template<typename _CharT >
constexpr std::basic_string< _CharT, std::char_traits< _CharT >, std::allocator< _CharT > > to_string () const
• constexpr std::basic_string< char, std::char_traits< char >, std::allocator< char > > to_string () const
• template<class _CharT , class _Traits , class _Alloc >
constexpr std::basic_string< _CharT, _Traits, _Alloc > to_string (_CharT __zero, _CharT __one=_CharT('1'))
const
• template<class _CharT , class _Traits >
constexpr std::basic_string< _CharT, _Traits, std::allocator< _CharT > > to_string (_CharT __zero, _CharT
__one=_CharT('1')) const
• template<class _CharT >
constexpr std::basic_string< _CharT, std::char_traits< _CharT >, std::allocator< _CharT > > to_string (_←-
CharT __zero, _CharT __one=_CharT('1')) const
• constexpr std::basic_string< char, std::char_traits< char >, std::allocator< char > > to_string (char __zero,
char __one='1') const
template<size_t _Nb>
class std::__debug::bitset< _Nb >
• debug/bitset
std::_Base_bitset<
((_Nb)/(__CHAR_BIT_
_ *__SIZEOF_LONG__)+
std::bitset< _Nb >
((_Nb) %(__CHAR_BIT__
*__SIZEOF_LONG__)==0
? 0 :1))>
Classes
• class reference
Generated by Doxygen
1710
• constexpr bitset< _Nb > & operator&= (const bitset< _Nb > &__rhs) noexcept
• constexpr bitset< _Nb > & operator|= (const bitset< _Nb > &__rhs) noexcept
Generated by Doxygen
5.279 std::bitset< _Nb > Class Template Reference 1711
• constexpr bitset< _Nb > & operator∧ = (const bitset< _Nb > &__rhs) noexcept
• constexpr bool operator== (const bitset< _Nb > &__rhs) const noexcept
Friends
template<size_t _Nb>
class std::bitset< _Nb >
Generated by Doxygen
1712
This behavior is preserved when translating to and from strings. For example, the first line of the following program
probably prints b('a') is 0001100001 on a modern ASCII system.
#include <bitset>
#include <iostream>
#include <sstream>
int main()
{
long a = ’a’;
bitset<10> b(a);
ostringstream s;
s « b;
string str = s.str();
cout « "index 3 in the string is " « str[3] « " but\n"
« "index 3 in the bitset is " « b[3] « endl;
}
Also see: https://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_containers.html for
a description of extensions.
Most of the actual code isn't contained in bitset<> itself, but in the base class _Base_bitset. The base class works with
whole words, not with individual bits. This allows us to specialize _Base_bitset for the important special case where the
bitset is only a single word.
Extra confusion can result due to the fact that the storage for _Base_bitset is a regular array, and is indexed as such.
This is carefully encapsulated.
bitset() [1/5]
template<size_t _Nb>
std::bitset< _Nb >::bitset () [inline], [constexpr], [noexcept]
All bits set to zero.
bitset() [2/5]
template<size_t _Nb>
std::bitset< _Nb >::bitset (
unsigned long long __val) [inline], [constexpr], [noexcept]
Initial bits bitwise-copied from a single word (others set to zero).
bitset() [3/5]
template<size_t _Nb>
template<class _CharT , class _Traits , class _Alloc >
std::bitset< _Nb >::bitset (
const std::basic_string< _CharT, _Traits, _Alloc > & __s,
size_t __position = 0) [inline], [explicit], [constexpr]
Use a subset of a string.
Parameters
Generated by Doxygen
5.279 std::bitset< _Nb > Class Template Reference 1713
Exceptions
bitset() [4/5]
template<size_t _Nb>
template<class _CharT , class _Traits , class _Alloc >
std::bitset< _Nb >::bitset (
const std::basic_string< _CharT, _Traits, _Alloc > & __s,
size_t __position,
size_t __n) [inline], [constexpr]
Use a subset of a string.
Parameters
Exceptions
bitset() [5/5]
template<size_t _Nb>
template<typename _CharT >
std::bitset< _Nb >::bitset (
const _CharT ∗ __str,
typename __bitset< _Nb >::__string< _CharT >::size_type __n = __bitset< _Nb >::__←-
string<_CharT>::npos,
_CharT __zero = _CharT('0'),
_CharT __one = _CharT('1')) [inline], [explicit], [constexpr]
Construct from a character array.
Parameters
Exceptions
std::invalid_argument If a character appears in the string which is neither __zero nor __one.
Generated by Doxygen
1714
all()
template<size_t _Nb>
bool std::bitset< _Nb >::all () const [inline], [constexpr], [noexcept]
Tests whether all the bits are on.
Returns
any()
template<size_t _Nb>
bool std::bitset< _Nb >::any () const [inline], [constexpr], [noexcept]
Tests whether any of the bits are on.
Returns
count()
template<size_t _Nb>
size_t std::bitset< _Nb >::count () const [inline], [constexpr], [noexcept]
Returns the number of bits which are set.
flip() [1/2]
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::flip () [inline], [constexpr], [noexcept]
Toggles every bit to its opposite value.
flip() [2/2]
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::flip (
size_t __position) [inline], [constexpr]
Toggles a given bit to its opposite value.
Parameters
Exceptions
Generated by Doxygen
5.279 std::bitset< _Nb > Class Template Reference 1715
none()
template<size_t _Nb>
bool std::bitset< _Nb >::none () const [inline], [constexpr], [noexcept]
Tests whether any of the bits are on.
Returns
operator&=()
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::operator&= (
const bitset< _Nb > & __rhs) [inline], [constexpr], [noexcept]
Operations on bitsets.
Parameters
__rhs A same-sized bitset.
operator<<()
template<size_t _Nb>
bitset< _Nb > std::bitset< _Nb >::operator<< (
size_t __position) const [inline], [constexpr], [noexcept]
Self-explanatory.
operator<<=()
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::operator<<= (
size_t __position) [inline], [constexpr], [noexcept]
Operations on bitsets.
Parameters
operator==()
template<size_t _Nb>
bool std::bitset< _Nb >::operator== (
const bitset< _Nb > & __rhs) const [inline], [constexpr], [noexcept]
These comparisons for equality/inequality are, well, bitwise.
operator>>()
template<size_t _Nb>
bitset< _Nb > std::bitset< _Nb >::operator>> (
size_t __position) const [inline], [constexpr], [noexcept]
Self-explanatory.
Generated by Doxygen
1716
operator>>=()
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::operator>>= (
size_t __position) [inline], [constexpr], [noexcept]
Operations on bitsets.
Parameters
operator[]() [1/2]
template<size_t _Nb>
reference std::bitset< _Nb >::operator[ ] (
size_t __position) [inline], [constexpr]
Array-indexing support.
Parameters
__position Index into the bitset.
Returns
A bool for a const bitset. For non-const bitsets, an instance of the reference proxy class.
Note
These operators do no range checking and throw no exceptions, as required by DR 11 to the standard.
_GLIBCXX_RESOLVE_LIB_DEFECTS Note that this implementation already resolves DR 11 (items 1 and 2), but does
not do the range-checking required by that DR's resolution. -pme The DR has since been changed: range-checking is
a precondition (users' responsibility), and these functions must not throw. -pme
operator[]() [2/2]
template<size_t _Nb>
bool std::bitset< _Nb >::operator[ ] (
size_t __position) const [inline], [constexpr]
Array-indexing support.
Parameters
__position Index into the bitset.
Returns
A bool for a const bitset. For non-const bitsets, an instance of the reference proxy class.
Note
These operators do no range checking and throw no exceptions, as required by DR 11 to the standard.
_GLIBCXX_RESOLVE_LIB_DEFECTS Note that this implementation already resolves DR 11 (items 1 and 2), but does
not do the range-checking required by that DR's resolution. -pme The DR has since been changed: range-checking is
a precondition (users' responsibility), and these functions must not throw. -pme
Generated by Doxygen
5.279 std::bitset< _Nb > Class Template Reference 1717
operator∧ =()
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::operator∧ = (
const bitset< _Nb > & __rhs) [inline], [constexpr], [noexcept]
Operations on bitsets.
Parameters
__rhs A same-sized bitset.
operator"|=()
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::operator|= (
const bitset< _Nb > & __rhs) [inline], [constexpr], [noexcept]
Operations on bitsets.
Parameters
__rhs A same-sized bitset.
operator∼()
template<size_t _Nb>
bitset< _Nb > std::bitset< _Nb >::operator∼ () const [inline], [constexpr], [noexcept]
See the no-argument flip().
reset() [1/2]
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::reset () [inline], [constexpr], [noexcept]
Sets every bit to false.
reset() [2/2]
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::reset (
size_t __position) [inline], [constexpr]
Sets a given bit to false.
Parameters
Exceptions
Generated by Doxygen
1718
set() [1/2]
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::set () [inline], [constexpr], [noexcept]
Sets every bit to true.
set() [2/2]
template<size_t _Nb>
bitset< _Nb > & std::bitset< _Nb >::set (
size_t __position,
bool __val = true) [inline], [constexpr]
Sets a given bit to a particular value.
Parameters
Exceptions
size()
template<size_t _Nb>
size_t std::bitset< _Nb >::size () const [inline], [constexpr], [noexcept]
Returns the total number of bits.
test()
template<size_t _Nb>
bool std::bitset< _Nb >::test (
size_t __position) const [inline], [constexpr]
Tests the value of a bit.
Parameters
Returns
Exceptions
Generated by Doxygen
5.280 std::tr2::bool_set Class Reference 1719
to_string()
template<size_t _Nb>
template<class _CharT , class _Traits , class _Alloc >
std::basic_string< _CharT, _Traits, _Alloc > std::bitset< _Nb >::to_string () const [inline],
[constexpr]
Returns a character interpretation of the bitset.
Returns
Note the ordering of the bits: decreasing character positions correspond to increasing bit positions (see the main class
notes for an example).
to_ulong()
template<size_t _Nb>
unsigned long std::bitset< _Nb >::to_ulong () const [inline], [constexpr]
Returns a numerical interpretation of the bitset.
Returns
Exceptions
The documentation for this class was generated from the following file:
• bitset
• constexpr bool_set ()
• constexpr bool_set (bool __t)
• bool contains (bool_set __b) const
• bool equals (bool_set __b) const
• bool is_emptyset () const
• bool is_indeterminate () const
• bool is_singleton () const
• operator bool () const
Generated by Doxygen
1720
Friends
bool_set
See N2136, Bool_set: multi-valued logic by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
The implicit conversion to bool is slippery! I may use the new explicit conversion. This has been specialized in the lan-
guage so that in contexts requiring a bool the conversion happens implicitly. Thus most objections should be eliminated.
bool_set() [1/2]
bool_set() [2/2]
std::tr2::bool_set::bool_set (
bool __t) [inline], [constexpr]
Constructor from bool.
equals()
bool std::tr2::bool_set::equals (
bool_set __b) const [inline]
Return true if states are equal.
is_emptyset()
is_indeterminate()
is_singleton()
Generated by Doxygen
5.281 __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc > Struct Template Reference 1721
operator bool()
• bool_set
• bool_set.tcc
__gnu_pbds::trie_order
_statistics_node_update
< Node_CItr, Node_Itr,
__gnu_pbds::detail _ATraits, _Alloc >
::trie_policy_base<
Node_CItr, Node_Itr,
_ATraits, _Alloc > __gnu_pbds::trie_prefix
__gnu_pbds::detail
_search_node_update< Node
::branch_policy< Node
_CItr, Node_Itr, _ATraits,
_CItr, Node_Itr, _Alloc >
__gnu_pbds::tree_order _Alloc >
_statistics_node_update
< Node_CItr, Node_Itr, Cmp
_Fn, _Alloc >
Protected Types
Generated by Doxygen
1722
• branch_policy.hpp
Protected Types
• branch_policy.hpp
Classes
• struct param_type
Public Types
Generated by Doxygen
5.283 std::cauchy_distribution< _RealType > Class Template Reference 1723
Friends
Since
C++11
result_type
max()
Generated by Doxygen
1724
min()
operator()()
param() [1/2]
param() [2/2]
Parameters
reset()
operator==
• random.h
• bits/random.tcc
Generated by Doxygen
5.284 __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >
Class Template Reference 1725
5.284 __gnu_pbds::cc_hash_max_collision_check_resize_trigger<
External_Load_Access, Size_Type > Class Template Reference
#include <hash_policy.hpp>
Public Types
• enum { external_load_access }
• typedef Size_Type size_type
A resize trigger policy based on collision checks. It keeps the simulated load factor lower than some given load factor.
anonymous enum
Enumerator
external_load_access Specifies whether the load factor can be accessed externally. The two options have
different trade-offs in terms of flexibility, genericity, and encapsulation.
Generated by Doxygen
1726
cc_hash_max_collision_check_resize_trigger()
get_load()
is_grow_needed()
is_resize_needed()
notify_cleared()
notify_erase_search_collision()
notify_erase_search_end()
Generated by Doxygen
5.284 __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >
Class Template Reference 1727
notify_erase_search_start()
notify_erased()
notify_externally_resized()
notify_find_search_collision()
notify_find_search_end()
notify_find_search_start()
notify_insert_search_collision()
notify_insert_search_end()
Generated by Doxygen
1728
notify_insert_search_start()
notify_inserted()
notify_resized()
set_load()
• hash_policy.hpp
__gnu_pbds::basic_hash __gnu_pbds::cc_hash
_table< Key, Mapped, Hash _table< Key, Mapped,
_Fn, Eq_Fn, Resize_Policy, Hash_Fn, Eq_Fn, Comb
Store_Hash, Tag, Policy_Tl, _Hash_Fn, Resize_Policy,
_Alloc > Store_Hash, _Alloc >
Generated by Doxygen
5.285 __gnu_pbds::cc_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Comb_Hash_Fn, Resize_Policy,
Store_Hash, _Alloc > Class Template Reference 1729
Public Types
• cc_hash_table ()
• cc_hash_table (const cc_hash_table &other)
• cc_hash_table (const hash_fn &h)
• cc_hash_table (const hash_fn &h, const eq_fn &e)
• cc_hash_table (const hash_fn &h, const eq_fn &e, const comb_hash_fn &ch)
• cc_hash_table (const hash_fn &h, const eq_fn &e, const comb_hash_fn &ch, const resize_policy &rp)
• template<typename It >
cc_hash_table (It first, It last)
• template<typename It >
cc_hash_table (It first, It last, const hash_fn &h)
• template<typename It >
cc_hash_table (It first, It last, const hash_fn &h, const eq_fn &e)
• template<typename It >
cc_hash_table (It first, It last, const hash_fn &h, const eq_fn &e, const comb_hash_fn &ch)
• template<typename It >
cc_hash_table (It first, It last, const hash_fn &h, const eq_fn &e, const comb_hash_fn &ch, const resize_policy
&rp)
• cc_hash_table & operator= (const cc_hash_table &other)
• void swap (cc_hash_table &other)
Template Parameters
Generated by Doxygen
1730
cc_hash_table() [1/10]
cc_hash_table() [2/10]
cc_hash_table() [3/10]
cc_hash_table() [4/10]
Generated by Doxygen
5.285 __gnu_pbds::cc_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Comb_Hash_Fn, Resize_Policy,
Store_Hash, _Alloc > Class Template Reference 1731
cc_hash_table() [5/10]
cc_hash_table() [6/10]
cc_hash_table() [7/10]
Generated by Doxygen
1732
cc_hash_table() [8/10]
cc_hash_table() [9/10]
cc_hash_table() [10/10]
Generated by Doxygen
5.286 __gnu_pbds::cc_hash_tag Struct Reference 1733
last_it will be inserted into the container object. r_hash_fn will be copied by the hash_fn object of the container object,
r_eq_fn will be copied by the eq_fn object of the container object, r_comb_hash_fn will be copied by the comb_hash_fn
object of the container object, and r_resize_policy will be copied by the resize_policy object of the container object.
The documentation for this class was generated from the following file:
• assoc_container.hpp
__gnu_pbds::container_tag
__gnu_pbds::associative_tag
__gnu_pbds::basic_hash_tag
__gnu_pbds::cc_hash_tag
Collision-chaining hash.
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
Generated by Doxygen
1734
__gnu_pbds::detail
::hash_eq_fn< Key, Eq
_Fn, _Alloc, Store_Hash >
__gnu_pbds::detail
__gnu_pbds::detail
::cc_ht_map< Key, Mapped,
::ranged_hash_fn< Key,
Hash_Fn, Eq_Fn, _Alloc,
Hash_Fn, _Alloc, Comb
Store_Hash, Comb_Hash_Fn,
_Hash_Fn, Store_Hash >
Resize_Policy >
__gnu_pbds::detail __gnu_pbds::detail
::maybe_null_type< Key, ::types_traits< Key,
Mapped, _Alloc, Store Mapped, _Alloc, Store
_Hash > _Hash >
Public Types
• enum { store_hash }
• typedef _Alloc allocator_type
• typedef Comb_Hash_Fn comb_hash_fn
• typedef const_iterator_ const_iterator
• typedef traits_base::const_pointer const_pointer
• typedef traits_base::const_reference const_reference
• typedef _Alloc::difference_type difference_type
• typedef Eq_Fn eq_fn
• typedef Hash_Fn hash_fn
• typedef iterator_ iterator
• typedef traits_base::key_const_pointer key_const_pointer
• typedef traits_base::key_const_reference key_const_reference
• typedef traits_base::key_pointer key_pointer
• typedef traits_base::key_reference key_reference
• typedef traits_base::key_type key_type
• typedef traits_base::mapped_const_pointer mapped_const_pointer
• typedef traits_base::mapped_const_reference mapped_const_reference
• typedef traits_base::mapped_pointer mapped_pointer
• typedef traits_base::mapped_reference mapped_reference
• typedef traits_base::mapped_type mapped_type
• typedef __nothrowcopy::indicator no_throw_indicator
• typedef point_const_iterator_ point_const_iterator
• typedef point_iterator_ point_iterator
• typedef traits_base::pointer pointer
• typedef traits_base::reference reference
• typedef Resize_Policy resize_policy
• typedef _Alloc::size_type size_type
• typedef integral_constant< int, Store_Hash > store_extra
• typedef stored_data< value_type, size_type, Store_Hash > stored_data_type
• typedef traits_base::value_type value_type
Generated by Doxygen
5.287 __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn,
Resize_Policy > Class Template Reference 1735
• cc_ht_map (const cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize←-
_Policy > &)
• cc_ht_map (const Hash_Fn &)
• cc_ht_map (const Hash_Fn &, const Eq_Fn &)
• cc_ht_map (const Hash_Fn &, const Eq_Fn &, const Comb_Hash_Fn &)
• cc_ht_map (const Hash_Fn &, const Eq_Fn &, const Comb_Hash_Fn &, const Resize_Policy &)
• iterator begin ()
• const_iterator begin () const
• void clear ()
• template<typename It >
void copy_from_range (It, It)
• bool empty () const
• iterator end ()
• const_iterator end () const
• bool erase (key_const_reference)
• template<typename Pred >
size_type erase_if (Pred)
• point_iterator find (key_const_reference)
• point_const_iterator find (key_const_reference) const
• point_iterator find_end ()
• point_const_iterator find_end () const
• Comb_Hash_Fn & get_comb_hash_fn ()
• const Comb_Hash_Fn & get_comb_hash_fn () const
• Eq_Fn & get_eq_fn ()
• const Eq_Fn & get_eq_fn () const
• Hash_Fn & get_hash_fn ()
• const Hash_Fn & get_hash_fn () const
• Resize_Policy & get_resize_policy ()
• const Resize_Policy & get_resize_policy () const
• void initialize ()
• std::pair< point_iterator, bool > insert (const_reference r_val)
• size_type max_size () const
• mapped_reference operator[ ] (key_const_reference r_key)
• size_type size () const
• void swap (cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn, Resize_Policy >
&)
Public Attributes
• no_throw_indicator m_no_throw_copies_indicator
• store_extra m_store_extra_indicator
Friends
• class const_iterator_
• class iterator_
Generated by Doxygen
1736
template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn, typename _Alloc, bool
Store_Hash, typename Comb_Hash_Fn, typename Resize_Policy>
class __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn,
Resize_Policy >
Template Parameters
anonymous enum
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Hash_Fn , typename Resize_Policy >
anonymous enum
Value stores hash, true or false.
empty()
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Hash_Fn , typename Resize_Policy >
bool __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_←-
Fn, Resize_Policy >::empty () const [inline], [nodiscard]
True if size() == 0.
get_comb_hash_fn() [1/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Hash_Fn , typename Resize_Policy >
Comb_Hash_Fn & __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Hash_Fn, Resize_Policy >::get_comb_hash_fn ()
Return current comb_hash_fn.
Generated by Doxygen
5.287 __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Hash_Fn,
Resize_Policy > Class Template Reference 1737
get_comb_hash_fn() [2/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Hash_Fn , typename Resize_Policy >
const Comb_Hash_Fn & __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_←-
Hash, Comb_Hash_Fn, Resize_Policy >::get_comb_hash_fn () const
Return current const comb_hash_fn.
get_eq_fn() [1/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Hash_Fn , typename Resize_Policy >
Eq_Fn & __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_←-
Hash_Fn, Resize_Policy >::get_eq_fn ()
Return current eq_fn.
get_eq_fn() [2/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Hash_Fn , typename Resize_Policy >
const Eq_Fn & __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Hash_Fn, Resize_Policy >::get_eq_fn () const
Return current const eq_fn.
get_hash_fn() [1/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Hash_Fn , typename Resize_Policy >
Hash_Fn & __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_←-
Hash_Fn, Resize_Policy >::get_hash_fn ()
Return current hash_fn.
get_hash_fn() [2/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Hash_Fn , typename Resize_Policy >
const Hash_Fn & __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Hash_Fn, Resize_Policy >::get_hash_fn () const
Return current const hash_fn.
get_resize_policy() [1/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Hash_Fn , typename Resize_Policy >
Resize_Policy & __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Hash_Fn, Resize_Policy >::get_resize_policy ()
Return current resize_policy.
get_resize_policy() [2/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Hash_Fn , typename Resize_Policy >
const Resize_Policy & __gnu_pbds::detail::cc_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_←-
Hash, Comb_Hash_Fn, Resize_Policy >::get_resize_policy () const
Return current const resize_policy.
The documentation for this class was generated from the following file:
Generated by Doxygen
1738
• cc_ht_map_.hpp
__gnu_cxx::char_traits
< _CharT >
std::char_traits<
_CharT >
__gnu_cxx::encoding
_char_traits< _CharT >
Public Types
Generated by Doxygen
5.289 std::char_traits< _CharT > Struct Template Reference 1739
template<typename _CharT>
struct __gnu_cxx::char_traits< _CharT >
For any given actual character type, this definition is probably wrong. (Most of the member functions are likely to be
right, but the int_type and state_type typedefs, and the eof() member function, are likely to be wrong.) The reason
this class exists is so users can specialize it. Classes in namespace std may not be specialized for fundamental
types, but classes in namespace __gnu_cxx may be.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/strings.html#strings.←-
string.character_types for advice on how to make use of this class for unusual character types. Also,
check out include/ext/pod_char_traits.h.
The documentation for this struct was generated from the following file:
• char_traits.h
__gnu_cxx::char_traits
< _CharT >
std::char_traits<
_CharT >
__gnu_cxx::encoding
_char_traits< _CharT >
Public Types
Generated by Doxygen
1740
template<class _CharT>
struct std::char_traits< _CharT >
Note
For any given actual character type, this definition is probably wrong. Since this is just a thin wrapper around __←-
gnu_cxx::char_traits, it is possible to achieve a more appropriate definition by specializing __gnu_cxx::char_traits.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/strings.html#strings.←-
string.character_types for advice on how to make use of this class for unusual character types. Also,
check out include/ext/pod_char_traits.h.
The documentation for this struct was generated from the following files:
• char_traits.h
• stl_algobase.h
• stringfwd.h
5.290 std::char_traits< __gnu_cxx::character< _Value, _Int, _St > > Struct Template
Reference
#include <pod_char_traits.h>
Public Types
Generated by Doxygen
5.291 std::char_traits< char > Struct Reference 1741
char_traits<__gnu_cxx::character> specialization.
The documentation for this struct was generated from the following file:
• pod_char_traits.h
Public Types
• static constexpr void assign (char_type &__c1, const char_type &__c2) noexcept
• static constexpr char_type ∗ assign (char_type ∗__s, size_t __n, char_type __a)
• static constexpr int compare (const char_type ∗__s1, const char_type ∗__s2, size_t __n)
• static constexpr char_type ∗ copy (char_type ∗__s1, const char_type ∗__s2, size_t __n)
• static constexpr int_type eof () noexcept
• static constexpr bool eq (const char_type &__c1, const char_type &__c2) noexcept
• static constexpr bool eq_int_type (const int_type &__c1, const int_type &__c2) noexcept
• static constexpr const char_type ∗ find (const char_type ∗__s, size_t __n, const char_type &__a)
• static constexpr size_t length (const char_type ∗__s)
• static constexpr bool lt (const char_type &__c1, const char_type &__c2) noexcept
• static constexpr char_type ∗ move (char_type ∗__s1, const char_type ∗__s2, size_t __n)
• static constexpr int_type not_eof (const int_type &__c) noexcept
• static constexpr char_type to_char_type (const int_type &__c) noexcept
• static constexpr int_type to_int_type (const char_type &__c) noexcept
Generated by Doxygen
1742
• char_traits.h
Public Types
• static constexpr void assign (char_type &__c1, const char_type &__c2) noexcept
• static constexpr char_type ∗ assign (char_type ∗__s, size_t __n, char_type __a)
• static constexpr int compare (const char_type ∗__s1, const char_type ∗__s2, size_t __n)
• static constexpr char_type ∗ copy (char_type ∗__s1, const char_type ∗__s2, size_t __n)
• static constexpr int_type eof () noexcept
• static constexpr bool eq (const char_type &__c1, const char_type &__c2) noexcept
• static constexpr bool eq_int_type (const int_type &__c1, const int_type &__c2) noexcept
• static constexpr const char_type ∗ find (const char_type ∗__s, size_t __n, const char_type &__a)
• static constexpr size_t length (const char_type ∗__s)
• static constexpr bool lt (const char_type &__c1, const char_type &__c2) noexcept
• static constexpr char_type ∗ move (char_type ∗__s1, const char_type ∗__s2, size_t __n)
• static constexpr int_type not_eof (const int_type &__c) noexcept
• static constexpr char_type to_char_type (const int_type &__c) noexcept
• static constexpr int_type to_int_type (const char_type &__c) noexcept
• char_traits.h
Public Types
Generated by Doxygen
5.294 std::chi_squared_distribution< _RealType > Class Template Reference 1743
• template<typename V2 >
static char_type from (const V2 &v)
• template<typename V2 >
static V2 to (const char_type &c)
Public Attributes
• value_type value
Classes
• struct param_type
Public Types
Generated by Doxygen
1744
Friends
Since
C++11
result_type
max()
min()
operator()()
param() [1/2]
Generated by Doxygen
5.294 std::chi_squared_distribution< _RealType > Class Template Reference 1745
param() [2/2]
Parameters
reset()
operator<<
Parameters
__os An output stream.
__x A chi_squared_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
operator==
operator>>
Generated by Doxygen
1746
Parameters
_←- An input stream.
_is
_←- A chi_squared_distribution random number generator engine.
_x
Returns
The documentation for this class was generated from the following files:
• random.h
• bits/random.tcc
std::locale::facet std::codecvt_base
std::__codecvt_abstract
_base< _InternT, _ExternT,
_StateT >
std::codecvt< _InternT,
_ExternT, _StateT >
std::codecvt_byname
< _InternT, _ExternT,
_StateT >
Generated by Doxygen
5.295 std::codecvt< _InternT, _ExternT, _StateT > Class Template Reference 1747
Public Types
• static locale::id id
Protected Attributes
• __c_locale _M_c_locale_codecvt
Generated by Doxygen
1748
do_always_noconv()
do_encoding()
do_in()
do_length()
do_max_length()
Generated by Doxygen
5.295 std::codecvt< _InternT, _ExternT, _StateT > Class Template Reference 1749
do_out()
do_unshift()
in()
Generated by Doxygen
1750
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
out()
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
Generated by Doxygen
5.296 std::codecvt< _InternT, _ExternT, encoding_state > Class Template Reference 1751
unshift()
Parameters
__state Persistent conversion state data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
The documentation for this class was generated from the following files:
• codecvt.h
• localefwd.h
Generated by Doxygen
1752
std::locale::facet std::codecvt_base
std::__codecvt_abstract
_base< _InternT, _ExternT,
encoding_state >
std::codecvt< _InternT,
_ExternT, encoding_state >
Public Types
• static locale::id id
Generated by Doxygen
5.296 std::codecvt< _InternT, _ExternT, encoding_state > Class Template Reference 1753
do_always_noconv()
do_encoding()
do_in()
Generated by Doxygen
1754
do_length()
do_max_length()
do_out()
do_unshift()
in()
Generated by Doxygen
5.296 std::codecvt< _InternT, _ExternT, encoding_state > Class Template Reference 1755
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
out()
Generated by Doxygen
1756
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
unshift()
Parameters
__state Persistent conversion state data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
The documentation for this class was generated from the following file:
• codecvt_specializations.h
Generated by Doxygen
5.297 std::codecvt< char, char, mbstate_t > Class Reference 1757
std::locale::facet std::codecvt_base
std::__codecvt_abstract
_base< char, char, mbstate_t >
std::codecvt< char,
char, mbstate_t >
Public Types
• static locale::id id
Generated by Doxygen
1758
• virtual result do_in (state_type &__state, const extern_type ∗__from, const extern_type ∗__from_end, const
extern_type ∗&__from_next, intern_type ∗__to, intern_type ∗__to_end, intern_type ∗&__to_next) const
• virtual int do_length (state_type &, const extern_type ∗__from, const extern_type ∗__end, size_t __max) const
• virtual int do_max_length () const throw ()
• virtual result do_out (state_type &__state, const intern_type ∗__from, const intern_type ∗__from_end, const
intern_type ∗&__from_next, extern_type ∗__to, extern_type ∗__to_end, extern_type ∗&__to_next) const
• virtual result do_unshift (state_type &__state, extern_type ∗__to, extern_type ∗__to_end, extern_type ∗&__to←-
_next) const
Protected Attributes
• __c_locale _M_c_locale_codecvt
Friends
do_always_noconv()
virtual bool std::codecvt< char, char, mbstate_t >::do_always_noconv () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< char, char, mbstate_t >.
do_encoding()
virtual int std::codecvt< char, char, mbstate_t >::do_encoding () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< char, char, mbstate_t >.
do_in()
Generated by Doxygen
5.297 std::codecvt< char, char, mbstate_t > Class Reference 1759
do_length()
do_max_length()
virtual int std::codecvt< char, char, mbstate_t >::do_max_length () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< char, char, mbstate_t >.
do_out()
do_unshift()
in()
Generated by Doxygen
1760
The source and destination character sets are determined by the facet's locale, internal and external types.
The characters in [from,from_end) are converted and written to [to,to_end). from_next and to_next are set to point to the
character following the last successfully converted character, respectively. If the result needed no conversion, from_next
and to_next are not affected.
The state argument should be initialized if the input is at the beginning and carried from a previous call if continuing
conversion. There are no guarantees about how state is used.
The result returned is a member of codecvt_base::result. If all the input is converted, returns codecvt_base::ok. If
no conversion is necessary, returns codecvt_base::noconv. If the input ends early or there is insufficient space in the
output, returns codecvt_base::partial. Otherwise the conversion failed and codecvt_base::error is returned.
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
out()
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
Generated by Doxygen
5.298 std::codecvt< char16_t, char, mbstate_t > Class Reference 1761
Parameters
Returns
codecvt_base::result.
unshift()
Parameters
__state Persistent conversion state data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
The documentation for this class was generated from the following file:
• codecvt.h
Generated by Doxygen
1762
std::locale::facet std::codecvt_base
std::__codecvt_abstract
_base< char16_t, char,
mbstate_t >
std::codecvt< char16
_t, char, mbstate_t >
Public Types
• static locale::id id
Generated by Doxygen
5.298 std::codecvt< char16_t, char, mbstate_t > Class Reference 1763
• virtual result do_in (state_type &__state, const extern_type ∗__from, const extern_type ∗__from_end, const
extern_type ∗&__from_next, intern_type ∗__to, intern_type ∗__to_end, intern_type ∗&__to_next) const
• virtual int do_length (state_type &, const extern_type ∗__from, const extern_type ∗__end, size_t __max) const
• virtual int do_max_length () const throw ()
• virtual result do_out (state_type &__state, const intern_type ∗__from, const intern_type ∗__from_end, const
intern_type ∗&__from_next, extern_type ∗__to, extern_type ∗__to_end, extern_type ∗&__to_next) const
• virtual result do_unshift (state_type &__state, extern_type ∗__to, extern_type ∗__to_end, extern_type ∗&__to←-
_next) const
do_always_noconv()
virtual bool std::codecvt< char16_t, char, mbstate_t >::do_always_noconv () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< char16_t, char, mbstate_t >.
do_encoding()
virtual int std::codecvt< char16_t, char, mbstate_t >::do_encoding () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< char16_t, char, mbstate_t >.
do_in()
do_length()
Generated by Doxygen
1764
do_max_length()
virtual int std::codecvt< char16_t, char, mbstate_t >::do_max_length () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< char16_t, char, mbstate_t >.
do_out()
do_unshift()
in()
Generated by Doxygen
5.298 std::codecvt< char16_t, char, mbstate_t > Class Reference 1765
The state argument should be initialized if the input is at the beginning and carried from a previous call if continuing
conversion. There are no guarantees about how state is used.
The result returned is a member of codecvt_base::result. If all the input is converted, returns codecvt_base::ok. If
no conversion is necessary, returns codecvt_base::noconv. If the input ends early or there is insufficient space in the
output, returns codecvt_base::partial. Otherwise the conversion failed and codecvt_base::error is returned.
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
out()
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Generated by Doxygen
1766
Returns
codecvt_base::result.
unshift()
Parameters
__state Persistent conversion state data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
The documentation for this class was generated from the following file:
• codecvt.h
Generated by Doxygen
5.299 std::codecvt< char32_t, char, mbstate_t > Class Reference 1767
std::locale::facet std::codecvt_base
std::__codecvt_abstract
_base< char32_t, char,
mbstate_t >
std::codecvt< char32
_t, char, mbstate_t >
Public Types
• static locale::id id
Generated by Doxygen
1768
• virtual result do_in (state_type &__state, const extern_type ∗__from, const extern_type ∗__from_end, const
extern_type ∗&__from_next, intern_type ∗__to, intern_type ∗__to_end, intern_type ∗&__to_next) const
• virtual int do_length (state_type &, const extern_type ∗__from, const extern_type ∗__end, size_t __max) const
• virtual int do_max_length () const throw ()
• virtual result do_out (state_type &__state, const intern_type ∗__from, const intern_type ∗__from_end, const
intern_type ∗&__from_next, extern_type ∗__to, extern_type ∗__to_end, extern_type ∗&__to_next) const
• virtual result do_unshift (state_type &__state, extern_type ∗__to, extern_type ∗__to_end, extern_type ∗&__to←-
_next) const
do_always_noconv()
virtual bool std::codecvt< char32_t, char, mbstate_t >::do_always_noconv () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< char32_t, char, mbstate_t >.
do_encoding()
virtual int std::codecvt< char32_t, char, mbstate_t >::do_encoding () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< char32_t, char, mbstate_t >.
do_in()
do_length()
Generated by Doxygen
5.299 std::codecvt< char32_t, char, mbstate_t > Class Reference 1769
do_max_length()
virtual int std::codecvt< char32_t, char, mbstate_t >::do_max_length () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< char32_t, char, mbstate_t >.
do_out()
do_unshift()
in()
Generated by Doxygen
1770
The state argument should be initialized if the input is at the beginning and carried from a previous call if continuing
conversion. There are no guarantees about how state is used.
The result returned is a member of codecvt_base::result. If all the input is converted, returns codecvt_base::ok. If
no conversion is necessary, returns codecvt_base::noconv. If the input ends early or there is insufficient space in the
output, returns codecvt_base::partial. Otherwise the conversion failed and codecvt_base::error is returned.
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
out()
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Generated by Doxygen
5.300 std::codecvt< wchar_t, char, mbstate_t > Class Reference 1771
Returns
codecvt_base::result.
unshift()
Parameters
__state Persistent conversion state data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
The documentation for this class was generated from the following file:
• codecvt.h
Generated by Doxygen
1772
std::locale::facet std::codecvt_base
std::__codecvt_abstract
_base< wchar_t, char,
mbstate_t >
std::codecvt< wchar
_t, char, mbstate_t >
Public Types
• static locale::id id
Generated by Doxygen
5.300 std::codecvt< wchar_t, char, mbstate_t > Class Reference 1773
• virtual result do_in (state_type &__state, const extern_type ∗__from, const extern_type ∗__from_end, const
extern_type ∗&__from_next, intern_type ∗__to, intern_type ∗__to_end, intern_type ∗&__to_next) const
• virtual int do_length (state_type &, const extern_type ∗__from, const extern_type ∗__end, size_t __max) const
• virtual int do_max_length () const throw ()
• virtual result do_out (state_type &__state, const intern_type ∗__from, const intern_type ∗__from_end, const
intern_type ∗&__from_next, extern_type ∗__to, extern_type ∗__to_end, extern_type ∗&__to_next) const
• virtual result do_unshift (state_type &__state, extern_type ∗__to, extern_type ∗__to_end, extern_type ∗&__to←-
_next) const
Protected Attributes
• __c_locale _M_c_locale_codecvt
Friends
do_always_noconv()
virtual bool std::codecvt< wchar_t, char, mbstate_t >::do_always_noconv () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< wchar_t, char, mbstate_t >.
do_encoding()
virtual int std::codecvt< wchar_t, char, mbstate_t >::do_encoding () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< wchar_t, char, mbstate_t >.
do_in()
Generated by Doxygen
1774
do_length()
do_max_length()
virtual int std::codecvt< wchar_t, char, mbstate_t >::do_max_length () const throw ( ) [protected],
[virtual]
Implements std::__codecvt_abstract_base< wchar_t, char, mbstate_t >.
do_out()
do_unshift()
in()
Generated by Doxygen
5.300 std::codecvt< wchar_t, char, mbstate_t > Class Reference 1775
The source and destination character sets are determined by the facet's locale, internal and external types.
The characters in [from,from_end) are converted and written to [to,to_end). from_next and to_next are set to point to the
character following the last successfully converted character, respectively. If the result needed no conversion, from_next
and to_next are not affected.
The state argument should be initialized if the input is at the beginning and carried from a previous call if continuing
conversion. There are no guarantees about how state is used.
The result returned is a member of codecvt_base::result. If all the input is converted, returns codecvt_base::ok. If
no conversion is necessary, returns codecvt_base::noconv. If the input ends early or there is insufficient space in the
output, returns codecvt_base::partial. Otherwise the conversion failed and codecvt_base::error is returned.
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
out()
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
Generated by Doxygen
1776
Parameters
Returns
codecvt_base::result.
unshift()
Parameters
__state Persistent conversion state data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
The documentation for this class was generated from the following file:
• codecvt.h
Generated by Doxygen
5.302 std::codecvt_byname< _InternT, _ExternT, _StateT > Class Template Reference 1777
std::__codecvt_abstract
std::codecvt< _InternT,
_base< _InternT, _ExternT,
_ExternT, encoding_state >
encoding_state >
std::__codecvt_abstract
std::codecvt< char16
_base< char16_t, char,
_t, char, mbstate_t >
mbstate_t >
std::__codecvt_abstract
std::codecvt< char32
std::codecvt_base _base< char32_t, char,
_t, char, mbstate_t >
mbstate_t >
std::__codecvt_abstract
std::codecvt< wchar
_base< wchar_t, char,
_t, char, mbstate_t >
mbstate_t >
std::__codecvt_abstract std::codecvt_byname
std::codecvt< _InternT,
_base< _InternT, _ExternT, < _InternT, _ExternT,
_ExternT, _StateT >
_StateT > _StateT >
Public Types
• codecvt.h
Generated by Doxygen
1778
std::locale::facet std::codecvt_base
std::__codecvt_abstract
_base< _InternT, _ExternT,
_StateT >
std::codecvt< _InternT,
_ExternT, _StateT >
std::codecvt_byname
< _InternT, _ExternT,
_StateT >
Public Types
Generated by Doxygen
5.302 std::codecvt_byname< _InternT, _ExternT, _StateT > Class Template Reference 1779
• static locale::id id
Protected Attributes
• __c_locale _M_c_locale_codecvt
do_always_noconv()
do_encoding()
Generated by Doxygen
1780
do_in()
do_length()
do_max_length()
do_out()
do_unshift()
Generated by Doxygen
5.302 std::codecvt_byname< _InternT, _ExternT, _StateT > Class Template Reference 1781
extern_type ∗ __to_end,
extern_type ∗& __to_next) const [protected], [virtual], [inherited]
Implements std::__codecvt_abstract_base< _InternT, _ExternT, _StateT >.
in()
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
out()
Generated by Doxygen
1782
Parameters
__state Persistent conversion state data.
__from Start of input.
__from_end End of input.
__from_next Returns start of unconverted data.
__to Start of output buffer.
__to_end End of output buffer.
__to_next Returns start of unused output area.
Returns
codecvt_base::result.
unshift()
Parameters
__state Persistent conversion state data.
__to Start of output buffer.
__to_end End of output buffer.
Generated by Doxygen
5.303 std::__cxx11::collate< _CharT > Class Template Reference 1783
Returns
codecvt_base::result.
The documentation for this class was generated from the following files:
• codecvt.h
• localefwd.h
std::locale::facet
std::__cxx11::collate
< _CharT >
Public Types
• static locale::id id
Generated by Doxygen
1784
• virtual ∼collate ()
• virtual int do_compare (const _CharT ∗__lo1, const _CharT ∗__hi1, const _CharT ∗__lo2, const _CharT ∗__hi2)
const
• virtual long do_hash (const _CharT ∗__lo, const _CharT ∗__hi) const
• virtual string_type do_transform (const _CharT ∗__lo, const _CharT ∗__hi) const
Protected Attributes
• __c_locale _M_c_locale_collate
template<typename _CharT>
class std::__cxx11::collate< _CharT >
char_type
string_type
collate() [1/2]
Generated by Doxygen
5.303 std::__cxx11::collate< _CharT > Class Template Reference 1785
Parameters
collate() [2/2]
Parameters
∼collate()
template<typename _CharT >
virtual std::__cxx11::collate< _CharT >::∼collate () [inline], [protected], [virtual]
Destructor.
compare()
Parameters
Returns
Generated by Doxygen
1786
do_compare()
compare().
Parameters
Returns
do_hash()
Returns
Hash value.
do_transform()
Generated by Doxygen
5.303 std::__cxx11::collate< _CharT > Class Template Reference 1787
Parameters
_←- Start.
_lo
_←- End.
_hi
Returns
transformed string.
hash()
Parameters
Returns
Hash value.
transform()
Parameters
Returns
Transformed string_type.
Generated by Doxygen
1788
id
• locale_classes.h
• locale_classes.tcc
Public Types
template<typename _CharT>
class std::__cxx11::collate_byname< _CharT >
char_type
string_type
• locale_classes.h
Generated by Doxygen
5.305 std::common_iterator< _It, _Sent > Class Template Reference 1789
Friends
Generated by Doxygen
1790
template<typename... _Tp>
struct std::common_type< _Tp >
common_type
The documentation for this struct was generated from the following file:
• type_traits
Public Types
• using type
Public Types
• using type
Generated by Doxygen
5.309 std::common_type< chrono::duration< _Rep1, _Period1 >, chrono::duration< _Rep2, _Period2 > >
Struct Template Reference 1791
Public Types
• using type
Public Types
• using type
Generated by Doxygen
1792
• chrono.h
• compare
Public Types
Generated by Doxygen
5.314 std::complex< _Tp > Class Template Reference 1793
template<typename _Tp>
class std::complex< _Tp >
Parameters
value_type
complex() [1/2]
complex() [2/2]
operator+=()
Generated by Doxygen
1794
operator-=()
• complex
Public Types
• complex
Generated by Doxygen
5.316 std::complex< float > Class Reference 1795
Public Types
• complex
Public Types
Generated by Doxygen
1796
Public Types
Generated by Doxygen
5.319 __gnu_pbds::detail::ov_tree_map< Key, Mapped, Cmp_Fn, Node_And_It_Traits, _Alloc >::cond_dtor<
Size_Type > Class Template Reference 1797
Protected Attributes
• bool m_key_destruct
• entry_allocator ∗const m_p_a
• entry ∗const m_p_e
template<typename HT_Map>
class __gnu_pbds::detail::cond_dealtor< HT_Map >
• cond_dealtor.hpp
• cond_key_dtor_entry_dealtor.hpp
Protected Attributes
• value_vector m_a_vec
• const Size_Type m_max_size
• bool m_no_action
• iterator & m_r_last_it
template<typename Key, typename Mapped, typename Cmp_Fn, typename Node_And_It_Traits, typename _←-
Alloc>
template<typename Size_Type>
class __gnu_pbds::detail::ov_tree_map< Key, Mapped, Cmp_Fn, Node_And_It_Traits, _Alloc >::cond_dtor<
Size_Type >
Conditional destructor.
The documentation for this class was generated from the following file:
• ov_tree_map_.hpp
Generated by Doxygen
1798
__gnu_cxx::throw_allocator __gnu_cxx::throw_allocator
_base< _Tp, limit_condition > _limit< _Tp >
__gnu_cxx::throw_value __gnu_cxx::throw_value
__gnu_cxx::limit_condition
_base< limit_condition > _limit
__gnu_cxx::condition_base
__gnu_cxx::throw_allocator __gnu_cxx::throw_allocator
__gnu_cxx::random_condition
_base< _Tp, random_condition > _random< _Tp >
__gnu_cxx::throw_value __gnu_cxx::throw_value
_base< random_condition > _random
• throw_allocator.h
Public Types
Generated by Doxygen
5.322 std::_V2::condition_variable_any Class Reference 1799
condition_variable
The documentation for this class was generated from the following file:
• condition_variable
condition_variable_any
The documentation for this class was generated from the following file:
• condition_variable
Generated by Doxygen
1800
Public Types
• using type
• type_traits
__gnu_pbds::detail
::pat_trie_base::_Inode
< _ATraits, Metadata >
::const_iterator
__gnu_pbds::detail
::pat_trie_base::_Inode
< _ATraits, Metadata >
::iterator
Public Types
Generated by Doxygen
5.325 std::chrono::tzdb_list::const_iterator Class Reference 1801
Public Attributes
• node_pointer_pointer m_p_p_cur
• node_pointer_pointer m_p_p_end
• pat_trie_base.hpp
Public Types
• using difference_type
• using iterator_category
• using pointer
• using reference
• using value_type
Friends
• class tzdb_list
• chrono
Generated by Doxygen
1802
std::binary_function
< _Tp, _Arg, _Ret >
std::const_mem_fun1
_ref_t< _Ret, _Tp, _Arg >
Public Types
first_argument_type
result_type
second_argument_type
Generated by Doxygen
5.327 std::const_mem_fun1_t< _Ret, _Tp, _Arg > Class Template Reference 1803
The documentation for this class was generated from the following file:
• stl_function.h
std::binary_function
< const _Tp *, _Arg,
_Ret >
std::const_mem_fun1
_t< _Ret, _Tp, _Arg >
Public Types
first_argument_type
result_type
Generated by Doxygen
1804
second_argument_type
• stl_function.h
std::unary_function
< _Tp, _Ret >
std::const_mem_fun
_ref_t< _Ret, _Tp >
Public Types
argument_type
Generated by Doxygen
5.329 std::const_mem_fun_t< _Ret, _Tp > Class Template Reference 1805
result_type
• stl_function.h
std::unary_function
< const _Tp *, _Ret >
std::const_mem_fun
_t< _Ret, _Tp >
Public Types
argument_type
Generated by Doxygen
1806
result_type
• stl_function.h
Public Types
Public Attributes
• _Result _M_val
An SGI extension .
The documentation for this struct was generated from the following file:
• ext/functional
Generated by Doxygen
5.332 __gnu_cxx::constant_unary_fun< _Result, _Argument > Struct Template Reference 1807
__gnu_parallel::find_tag
__gnu_parallel::constant
_size_blocks_tag
See also
_GLIBCXX_FIND_CONSTANT_SIZE_BLOCKS
The documentation for this struct was generated from the following file:
• tags.h
Public Types
Public Attributes
• result_type _M_val
An SGI extension .
The documentation for this struct was generated from the following file:
• ext/functional
Generated by Doxygen
1808
Public Types
Public Attributes
• result_type _M_val
template<class _Result>
struct __gnu_cxx::constant_void_fun< _Result >
An SGI extension .
The documentation for this struct was generated from the following file:
• ext/functional
template<typename Key, typename Mapped, typename _Alloc, typename Tag, typename Policy_Tl = null_type>
struct __gnu_pbds::detail::container_base_dispatch< Key, Mapped, _Alloc, Tag, Policy_Tl >
• tag_and_trait.hpp
Public Types
Generated by Doxygen
5.336 __gnu_pbds::detail::container_base_dispatch< _VTp, Cmp_Fn, _Alloc, binomial_heap_tag, null_type
> Struct Template Reference 1809
type
• priority_queue_base_dispatch.hpp
Public Types
type
• priority_queue_base_dispatch.hpp
Public Types
Generated by Doxygen
1810
type
• priority_queue_base_dispatch.hpp
Public Types
type
• priority_queue_base_dispatch.hpp
Public Types
Generated by Doxygen
5.340 __gnu_pbds::detail::container_base_dispatch< Key, Mapped, _Alloc, cc_hash_tag, Policy_Tl > Struct
Template Reference 1811
type
• priority_queue_base_dispatch.hpp
Public Types
• typedef cc_ht_map< Key, Mapped, at0t, at1t, _Alloc, at3t::value, at4t, at2t > type
type
• container_base_dispatch.hpp
Public Types
• typedef gp_ht_map< Key, Mapped, at0t, at1t, _Alloc, at3t::value, at4t, at5t, at2t > type
Generated by Doxygen
1812
type
• container_base_dispatch.hpp
Public Types
type
• container_base_dispatch.hpp
Public Types
Generated by Doxygen
5.344 __gnu_pbds::detail::container_base_dispatch< Key, Mapped, _Alloc, pat_trie_tag, Policy_Tl > Struct
Template Reference 1813
type
• container_base_dispatch.hpp
Public Types
• container_base_dispatch.hpp
Public Types
type
• container_base_dispatch.hpp
Generated by Doxygen
1814
Public Types
type
• container_base_dispatch.hpp
Public Types
• typedef cc_ht_set< Key, null_type, at0t, at1t, _Alloc, at3t::value, at4t, at2t > type
type
• container_base_dispatch.hpp
Generated by Doxygen
5.348 __gnu_pbds::detail::container_base_dispatch< Key, null_type, _Alloc, gp_hash_tag, Policy_Tl >
Struct Template Reference 1815
Public Types
• typedef gp_ht_set< Key, null_type, at0t, at1t, _Alloc, at3t::value, at4t, at5t, at2t > type
type
• container_base_dispatch.hpp
Public Types
type
• container_base_dispatch.hpp
Generated by Doxygen
1816
Public Types
type
• container_base_dispatch.hpp
Public Types
type
• container_base_dispatch.hpp
Generated by Doxygen
5.352 __gnu_pbds::detail::container_base_dispatch< Key, null_type, _Alloc, rb_tree_tag, Policy_Tl > Struct
Template Reference 1817
Public Types
• container_base_dispatch.hpp
Public Types
type
• container_base_dispatch.hpp
Generated by Doxygen
1818
std::exception
std::logic_error
__gnu_pbds::container
_error
__gnu_pbds::insert __gnu_pbds::resize
__gnu_pbds::join_error
_error _error
what()
• exception.hpp
Generated by Doxygen
5.356 __gnu_pbds::container_traits< Cntnr > Struct Template Reference 1819
__gnu_pbds::ov_tree_tag
__gnu_pbds::rb_tree_tag
__gnu_pbds::tree_tag
__gnu_pbds::splay_tree_tag
__gnu_pbds::basic_branch_tag __gnu_pbds::trie_tag
__gnu_pbds::pat_trie_tag
__gnu_pbds::basic_hash_tag __gnu_pbds::cc_hash_tag
__gnu_pbds::associative_tag
__gnu_pbds::list_update_tag __gnu_pbds::gp_hash_tag
__gnu_pbds::binary
_heap_tag
__gnu_pbds::binomial
_heap_tag
__gnu_pbds::priority __gnu_pbds::pairing
__gnu_pbds::container_tag
_queue_tag _heap_tag
__gnu_pbds::rc_binomial
_heap_tag
__gnu_pbds::sequence_tag
__gnu_pbds::thin_heap_tag
__gnu_pbds::string_tag
• tag_and_trait.hpp
__gnu_pbds::container
_traits_base< Cntnr::
container_category >
__gnu_pbds::container
_traits< Cntnr >
Public Types
Generated by Doxygen
1820
template<typename Cntnr>
struct __gnu_pbds::container_traits< Cntnr >
Container traits.
anonymous enum
Enumerator
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
template<typename _Tag>
struct __gnu_pbds::container_traits_base< _Tag >
Public Types
Generated by Doxygen
5.359 __gnu_pbds::container_traits_base< binomial_heap_tag > Struct Reference 1821
Public Types
• tag_and_trait.hpp
Public Types
Specialization, cc hash.
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
Public Types
Specialization, gp hash.
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
Generated by Doxygen
1822
Public Types
• tag_and_trait.hpp
Public Types
Specialization, ov tree.
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
Public Types
• tag_and_trait.hpp
Public Types
Generated by Doxygen
5.366 __gnu_pbds::container_traits_base< rb_tree_tag > Struct Reference 1823
• tag_and_trait.hpp
Public Types
Specialization, rb tree.
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
Public Types
• tag_and_trait.hpp
Public Types
• tag_and_trait.hpp
Generated by Doxygen
1824
Public Types
• tag_and_trait.hpp
std::input_iterator_tag
std::forward_iterator_tag
std::bidirectional
_iterator_tag
std::random_access
_iterator_tag
std::contiguous_iterator_tag
Generated by Doxygen
5.371 std::counted_iterator< _It > Class Template Reference 1825
• stl_iterator_base_types.h
Public Types
• using difference_type
• using iterator_type
Friends
Generated by Doxygen
1826
template<input_or_output_iterator _It>
class std::counted_iterator< _It >
• bits/stl_iterator.h
std::locale::facet std::ctype_base
std::__ctype_abstract
_base< _CharT >
std::ctype_byname<
_CharT >
Public Types
Generated by Doxygen
5.372 std::ctype< _CharT > Class Template Reference 1827
• virtual const char_type ∗ do_is (const char_type ∗__lo, const char_type ∗__hi, mask ∗__vec) const
• virtual bool do_is (mask __m, char_type __c) const
• virtual char do_narrow (char_type, char __dfault) const
• virtual const char_type ∗ do_narrow (const char_type ∗__lo, const char_type ∗__hi, char __dfault, char ∗__to)
const
• virtual const char_type ∗ do_scan_is (mask __m, const char_type ∗__lo, const char_type ∗__hi) const
• virtual const char_type ∗ do_scan_not (mask __m, const char_type ∗__lo, const char_type ∗__hi) const
• virtual const char_type ∗ do_tolower (char_type ∗__lo, const char_type ∗__hi) const
• virtual char_type do_tolower (char_type __c) const
• virtual const char_type ∗ do_toupper (char_type ∗__lo, const char_type ∗__hi) const
• virtual char_type do_toupper (char_type __c) const
• virtual char_type do_widen (char __c) const
• virtual const char ∗ do_widen (const char ∗__lo, const char ∗__hi, char_type ∗__dest) const
Generated by Doxygen
1828
template<typename _CharT>
class std::ctype< _CharT >
do_is() [1/2]
Parameters
Returns
__hi.
do_is() [2/2]
Generated by Doxygen
5.372 std::ctype< _CharT > Class Template Reference 1829
mask __m,
char_type __c) const [protected], [virtual]
Test char_type classification.
This function finds a mask M for c and compares it to mask m.
do_is() is a hook for a derived facet to change the behavior of classifying. do_is() must always return the same result for
the same input.
Parameters
Returns
(M & __m) != 0.
do_narrow() [1/2]
Parameters
__c The char_type to convert.
__dfault Char to return if conversion fails.
Returns
do_narrow() [2/2]
Generated by Doxygen
1830
This virtual function converts each char_type in the range [__lo,__hi) to char using the simplest reasonable transforma-
tion and writes the results to the destination array. For any element in the input that cannot be converted, __dfault is
used instead.
do_narrow() is a hook for a derived facet to change the behavior of narrowing. do_narrow() must always return the same
result for the same input.
Note: this is not what you want for codepage conversions. See codecvt for that.
Parameters
Returns
__hi.
do_scan_is()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
do_scan_not()
Generated by Doxygen
5.372 std::ctype< _CharT > Class Template Reference 1831
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
do_tolower() [1/2]
Parameters
Returns
__hi.
do_tolower() [2/2]
Generated by Doxygen
1832
Parameters
_←- The char_type to convert.
_c
Returns
do_toupper() [1/2]
Parameters
Returns
__hi.
do_toupper() [2/2]
Parameters
_←- The char_type to convert.
_c
Generated by Doxygen
5.372 std::ctype< _CharT > Class Template Reference 1833
Returns
do_widen() [1/2]
Parameters
_←- The char to convert.
_c
Returns
do_widen() [2/2]
Parameters
_←- Pointer to start range.
_lo
_←- Pointer to end of range.
_hi
_←- Pointer to the destination array.
_to
Returns
__hi.
Generated by Doxygen
1834
is() [1/2]
Parameters
Returns
__hi.
is() [2/2]
Parameters
Returns
(M & __m) != 0.
narrow() [1/2]
Generated by Doxygen
5.372 std::ctype< _CharT > Class Template Reference 1835
This function converts the char_type to char using the simplest reasonable transformation. If the conversion fails, dfault
is returned instead. It does so by returning ctype<char_type>::do_narrow(__c).
Note: this is not what you want for codepage conversions. See codecvt for that.
Generated by Doxygen
1836
Parameters
__c The char_type to convert.
__dfault Char to return if conversion fails.
Returns
narrow() [2/2]
Parameters
Returns
__hi.
scan_is()
Generated by Doxygen
5.372 std::ctype< _CharT > Class Template Reference 1837
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
scan_not()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to first char in range.
_lo
_←- Pointer to end of range.
_hi
Returns
tolower() [1/2]
Parameters
Generated by Doxygen
1838
Returns
__hi.
tolower() [2/2]
Parameters
_←- The char_type to convert.
_c
Returns
toupper() [1/2]
Parameters
Returns
__hi.
Generated by Doxygen
5.372 std::ctype< _CharT > Class Template Reference 1839
toupper() [2/2]
Parameters
_←- The char_type to convert.
_c
Returns
widen() [1/2]
Parameters
_←- The char to convert.
_c
Returns
widen() [2/2]
Generated by Doxygen
1840
Parameters
Returns
__hi.
id
• locale_facets.h
• localefwd.h
std::locale::facet std::ctype_base
std::ctype_byname<
char >
Generated by Doxygen
5.373 std::ctype< char > Class Reference 1841
Public Types
• ctype (__c_locale __cloc, const mask ∗__table=0, bool __del=false, size_t __refs=0)
• ctype (const mask ∗__table=0, bool __del=false, size_t __refs=0)
• const char ∗ is (const char ∗__lo, const char ∗__hi, mask ∗__vec) const
• bool is (mask __m, char __c) const
• char narrow (char_type __c, char __dfault) const
• const char_type ∗ narrow (const char_type ∗__lo, const char_type ∗__hi, char __dfault, char ∗__to) const
• const char ∗ scan_is (mask __m, const char ∗__lo, const char ∗__hi) const
• const char ∗ scan_not (mask __m, const char ∗__lo, const char ∗__hi) const
• const mask ∗ table () const throw ()
• const char_type ∗ tolower (char_type ∗__lo, const char_type ∗__hi) const
• char_type tolower (char_type __c) const
• const char_type ∗ toupper (char_type ∗__lo, const char_type ∗__hi) const
• char_type toupper (char_type __c) const
• char_type widen (char __c) const
• const char ∗ widen (const char ∗__lo, const char ∗__hi, char_type ∗__to) const
• virtual ∼ctype ()
• virtual char do_narrow (char_type __c, char __dfault) const
• virtual const char_type ∗ do_narrow (const char_type ∗__lo, const char_type ∗__hi, char __dfault, char ∗__to)
const
• virtual const char_type ∗ do_tolower (char_type ∗__lo, const char_type ∗__hi) const
• virtual char_type do_tolower (char_type __c) const
Generated by Doxygen
1842
• virtual const char_type ∗ do_toupper (char_type ∗__lo, const char_type ∗__hi) const
• virtual char_type do_toupper (char_type __c) const
• virtual char_type do_widen (char __c) const
• virtual const char ∗ do_widen (const char ∗__lo, const char ∗__hi, char_type ∗__to) const
Protected Attributes
• __c_locale _M_c_locale_ctype
• bool _M_del
• char _M_narrow [1+static_cast< unsigned char >(-1)]
• char _M_narrow_ok
• const mask ∗ _M_table
• __to_type _M_tolower
• __to_type _M_toupper
• char _M_widen [1+static_cast< unsigned char >(-1)]
• char _M_widen_ok
char_type
ctype() [1/2]
Parameters
__table If non-zero, table is used as the per-char mask. Else classic_table() is used.
__del If true, passes ownership of table to this facet.
__refs Passed to the base facet class.
Generated by Doxygen
5.373 std::ctype< char > Class Reference 1843
ctype() [2/2]
Parameters
∼ctype()
virtual std::ctype< char >::∼ctype () [protected], [virtual]
Destructor.
This function deletes table() if del was true in the constructor.
classic_table()
do_narrow() [1/2]
Parameters
__c The char to convert.
__dfault Char to return if conversion fails.
Returns
Generated by Doxygen
1844
do_narrow() [2/2]
Parameters
Returns
__hi.
do_tolower() [1/2]
Parameters
Returns
__hi.
do_tolower() [2/2]
Generated by Doxygen
5.373 std::ctype< char > Class Reference 1845
This virtual function converts the char argument to lowercase if possible. If not possible (for example, '2'), returns the
argument.
do_tolower() is a hook for a derived facet to change the behavior of lowercasing. do_tolower() must always return the
same result for the same input.
Parameters
_←- The char to convert.
_c
Returns
do_toupper() [1/2]
Parameters
Returns
__hi.
do_toupper() [2/2]
Parameters
_←- The char to convert.
_c
Returns
Generated by Doxygen
1846
do_widen() [1/2]
Parameters
_←- The char to convert.
_c
Returns
do_widen() [2/2]
Parameters
Returns
__hi.
is() [1/2]
Generated by Doxygen
5.373 std::ctype< char > Class Reference 1847
Parameters
Returns
__hi.
is() [2/2]
Parameters
Returns
narrow() [1/2]
Parameters
__c The char to convert.
__dfault Char to return if conversion fails.
Returns
Generated by Doxygen
1848
narrow() [2/2]
Parameters
Returns
__hi.
scan_is()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
Generated by Doxygen
5.373 std::ctype< char > Class Reference 1849
scan_not()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
table()
tolower() [1/2]
Parameters
Returns
__hi.
Generated by Doxygen
1850
tolower() [2/2]
Parameters
_←- The char to convert.
_c
Returns
toupper() [1/2]
Parameters
Returns
__hi.
toupper() [2/2]
Parameters
_←- The char to convert.
_c
Generated by Doxygen
5.373 std::ctype< char > Class Reference 1851
Returns
widen() [1/2]
Parameters
_←- The char to convert.
_c
Returns
widen() [2/2]
Parameters
Returns
__hi.
Generated by Doxygen
1852
id
table_size
• locale_facets.h
• ctype_inline.h
std::locale::facet std::ctype_base
std::__ctype_abstract
_base< wchar_t >
Public Types
Generated by Doxygen
5.374 std::ctype< wchar_t > Class Reference 1853
• virtual ∼ctype ()
• __wmask_type _M_convert_to_wmask (const mask __m) const throw ()
• void _M_initialize_ctype () throw ()
• virtual const char_type ∗ do_is (const char_type ∗__lo, const char_type ∗__hi, mask ∗__vec) const
• virtual bool do_is (mask __m, char_type __c) const
• virtual char do_narrow (char_type __c, char __dfault) const
• virtual const char_type ∗ do_narrow (const char_type ∗__lo, const char_type ∗__hi, char __dfault, char ∗__to)
const
• virtual const char_type ∗ do_scan_is (mask __m, const char_type ∗__lo, const char_type ∗__hi) const
• virtual const char_type ∗ do_scan_not (mask __m, const char_type ∗__lo, const char_type ∗__hi) const
• virtual const char_type ∗ do_tolower (char_type ∗__lo, const char_type ∗__hi) const
• virtual char_type do_tolower (char_type __c) const
• virtual const char_type ∗ do_toupper (char_type ∗__lo, const char_type ∗__hi) const
• virtual char_type do_toupper (char_type __c) const
• virtual char_type do_widen (char __c) const
• virtual const char ∗ do_widen (const char ∗__lo, const char ∗__hi, char_type ∗__to) const
Generated by Doxygen
1854
Protected Attributes
char_type
ctype() [1/2]
Parameters
ctype() [2/2]
Parameters
∼ctype()
virtual std::ctype< wchar_t >::∼ctype () [protected], [virtual]
Destructor.
Generated by Doxygen
5.374 std::ctype< wchar_t > Class Reference 1855
do_is() [1/2]
Parameters
Returns
__hi.
do_is() [2/2]
Parameters
Returns
(M & __m) != 0.
do_narrow() [1/2]
Generated by Doxygen
1856
This virtual function converts the argument to char using the simplest reasonable transformation. If the conversion fails,
dfault is returned instead. For an underived ctype<wchar_t> facet, c will be cast to char and returned.
do_narrow() is a hook for a derived facet to change the behavior of narrowing. do_narrow() must always return the same
result for the same input.
Note: this is not what you want for codepage conversions. See codecvt for that.
Parameters
__c The wchar_t to convert.
__dfault Char to return if conversion fails.
Returns
do_narrow() [2/2]
Parameters
Returns
__hi.
do_scan_is()
Generated by Doxygen
5.374 std::ctype< wchar_t > Class Reference 1857
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
do_scan_not()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
do_tolower() [1/2]
Generated by Doxygen
1858
Parameters
Returns
__hi.
do_tolower() [2/2]
Parameters
_←- The wchar_t to convert.
_c
Returns
do_toupper() [1/2]
Parameters
Returns
__hi.
Generated by Doxygen
5.374 std::ctype< wchar_t > Class Reference 1859
do_toupper() [2/2]
Parameters
_←- The wchar_t to convert.
_c
Returns
do_widen() [1/2]
Parameters
_←- The char to convert.
_c
Returns
do_widen() [2/2]
Generated by Doxygen
1860
Parameters
_←- Pointer to start range.
_lo
_←- Pointer to end of range.
_hi
_←- Pointer to the destination array.
_to
Returns
__hi.
is() [1/2]
Parameters
Returns
__hi.
is() [2/2]
Parameters
Returns
(M & __m) != 0.
Generated by Doxygen
5.374 std::ctype< wchar_t > Class Reference 1861
narrow() [1/2]
Parameters
__c The char_type to convert.
__dfault Char to return if conversion fails.
Returns
narrow() [2/2]
Parameters
Returns
__hi.
scan_is()
Generated by Doxygen
1862
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
scan_not()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to first char in range.
_lo
_←- Pointer to end of range.
_hi
Returns
tolower() [1/2]
Parameters
Generated by Doxygen
5.374 std::ctype< wchar_t > Class Reference 1863
Returns
__hi.
tolower() [2/2]
Parameters
_←- The char_type to convert.
_c
Returns
toupper() [1/2]
Parameters
Returns
__hi.
toupper() [2/2]
Parameters
_←- The char_type to convert.
_c
Generated by Doxygen
1864
Returns
widen() [1/2]
Parameters
_←- The char to convert.
_c
Returns
widen() [2/2]
Parameters
Returns
__hi.
id
• locale_facets.h
Generated by Doxygen
5.375 std::ctype_base Struct Reference 1865
std::__ctype_abstract
std::ctype< wchar_t >
_base< wchar_t >
std::__ctype_abstract std::ctype_byname<
std::ctype_base std::ctype< _CharT >
_base< _CharT > _CharT >
std::ctype_byname<
std::ctype< char >
char >
Public Types
• ctype_base.h
Generated by Doxygen
1866
std::locale::facet std::ctype_base
std::__ctype_abstract
_base< _CharT >
std::ctype_byname<
_CharT >
Public Types
Generated by Doxygen
5.376 std::ctype_byname< _CharT > Class Template Reference 1867
• virtual const char_type ∗ do_is (const char_type ∗__lo, const char_type ∗__hi, mask ∗__vec) const
• virtual bool do_is (mask __m, char_type __c) const
• virtual char do_narrow (char_type, char __dfault) const
• virtual const char_type ∗ do_narrow (const char_type ∗__lo, const char_type ∗__hi, char __dfault, char ∗__to)
const
• virtual const char_type ∗ do_scan_is (mask __m, const char_type ∗__lo, const char_type ∗__hi) const
• virtual const char_type ∗ do_scan_not (mask __m, const char_type ∗__lo, const char_type ∗__hi) const
• virtual const char_type ∗ do_tolower (char_type ∗__lo, const char_type ∗__hi) const
• virtual char_type do_tolower (char_type __c) const
• virtual const char_type ∗ do_toupper (char_type ∗__lo, const char_type ∗__hi) const
• virtual char_type do_toupper (char_type __c) const
• virtual char_type do_widen (char __c) const
• virtual const char ∗ do_widen (const char ∗__lo, const char ∗__hi, char_type ∗__dest) const
template<typename _CharT>
class std::ctype_byname< _CharT >
Generated by Doxygen
1868
do_is() [1/2]
Parameters
Returns
__hi.
do_is() [2/2]
Parameters
Returns
(M & __m) != 0.
do_narrow() [1/2]
Generated by Doxygen
5.376 std::ctype_byname< _CharT > Class Template Reference 1869
char_type __c,
char __dfault) const [protected], [virtual], [inherited]
Narrow char_type to char.
This virtual function converts the argument to char using the simplest reasonable transformation. If the conversion fails,
dfault is returned instead.
do_narrow() is a hook for a derived facet to change the behavior of narrowing. do_narrow() must always return the same
result for the same input.
Note: this is not what you want for codepage conversions. See codecvt for that.
Parameters
__c The char_type to convert.
__dfault Char to return if conversion fails.
Returns
do_narrow() [2/2]
Parameters
Returns
__hi.
do_scan_is()
Generated by Doxygen
1870
mask __m,
const char_type ∗ __lo,
const char_type ∗ __hi) const [protected], [virtual], [inherited]
Find char_type matching mask.
This function searches for and returns the first char_type c in [__lo,__hi) for which is(__m,c) is true.
do_scan_is() is a hook for a derived facet to change the behavior of match searching. do_is() must always return the
same result for the same input.
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
do_scan_not()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
do_tolower() [1/2]
Generated by Doxygen
5.376 std::ctype_byname< _CharT > Class Template Reference 1871
char_type ∗ __lo,
const char_type ∗ __hi) const [protected], [virtual], [inherited]
Convert array to lowercase.
This virtual function converts each char_type in the range [__lo,__hi) to lowercase if possible. Other elements remain
untouched.
do_tolower() is a hook for a derived facet to change the behavior of lowercasing. do_tolower() must always return the
same result for the same input.
Parameters
Returns
__hi.
do_tolower() [2/2]
Parameters
_←- The char_type to convert.
_c
Returns
do_toupper() [1/2]
Generated by Doxygen
1872
Parameters
Returns
__hi.
Implements std::__ctype_abstract_base< _CharT >.
do_toupper() [2/2]
Parameters
_←- The char_type to convert.
_c
Returns
do_widen() [1/2]
Parameters
_←- The char to convert.
_c
Returns
Generated by Doxygen
5.376 std::ctype_byname< _CharT > Class Template Reference 1873
do_widen() [2/2]
Parameters
_←- Pointer to start range.
_lo
_←- Pointer to end of range.
_hi
_←- Pointer to the destination array.
_to
Returns
__hi.
is() [1/2]
Parameters
Returns
__hi.
Generated by Doxygen
1874
is() [2/2]
Parameters
Returns
(M & __m) != 0.
narrow() [1/2]
Parameters
__c The char_type to convert.
__dfault Char to return if conversion fails.
Returns
narrow() [2/2]
Generated by Doxygen
5.376 std::ctype_byname< _CharT > Class Template Reference 1875
char __dfault,
char ∗ __to) const [inline], [inherited]
Narrow array to char array.
This function converts each char_type in the input to char using the simplest reasonable transformation and writes the
results to the destination array. For any char_type in the input that cannot be converted, dfault is used instead. It does
so by returning ctype<char_type>::do_narrow(__lo, __hi, __dfault, __to).
Note: this is not what you want for codepage conversions. See codecvt for that.
Parameters
Returns
__hi.
scan_is()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
scan_not()
Generated by Doxygen
1876
Parameters
_←- The mask to compare against.
_m
_←- Pointer to first char in range.
_lo
_←- Pointer to end of range.
_hi
Returns
tolower() [1/2]
Parameters
Returns
__hi.
tolower() [2/2]
Parameters
_←- The char_type to convert.
_c
Generated by Doxygen
5.376 std::ctype_byname< _CharT > Class Template Reference 1877
Returns
toupper() [1/2]
Parameters
Returns
__hi.
toupper() [2/2]
Parameters
_←- The char_type to convert.
_c
Returns
widen() [1/2]
Generated by Doxygen
1878
Parameters
_←- The char to convert.
_c
Returns
widen() [2/2]
Parameters
Returns
__hi.
id
• locale_facets.h
• localefwd.h
Generated by Doxygen
5.377 std::ctype_byname< char > Class Reference 1879
std::locale::facet std::ctype_base
std::ctype_byname<
char >
Public Types
Generated by Doxygen
1880
Protected Attributes
• __c_locale _M_c_locale_ctype
• bool _M_del
• char _M_narrow [1+static_cast< unsigned char >(-1)]
• char _M_narrow_ok
• const mask ∗ _M_table
• __to_type _M_tolower
• __to_type _M_toupper
• char _M_widen [1+static_cast< unsigned char >(-1)]
• char _M_widen_ok
Generated by Doxygen
5.377 std::ctype_byname< char > Class Reference 1881
char_type
classic_table()
do_narrow() [1/2]
Parameters
__c The char to convert.
__dfault Char to return if conversion fails.
Returns
do_narrow() [2/2]
Parameters
Generated by Doxygen
1882
Returns
__hi.
do_tolower() [1/2]
Parameters
Returns
__hi.
do_tolower() [2/2]
Parameters
_←- The char to convert.
_c
Returns
Generated by Doxygen
5.377 std::ctype_byname< char > Class Reference 1883
do_toupper() [1/2]
Parameters
Returns
__hi.
do_toupper() [2/2]
Parameters
_←- The char to convert.
_c
Returns
do_widen() [1/2]
Generated by Doxygen
1884
Parameters
_←- The char to convert.
_c
Returns
do_widen() [2/2]
Parameters
Returns
__hi.
is() [1/2]
Parameters
Returns
__hi.
Generated by Doxygen
5.377 std::ctype_byname< char > Class Reference 1885
is() [2/2]
Parameters
Returns
narrow() [1/2]
Parameters
__c The char to convert.
__dfault Char to return if conversion fails.
Returns
narrow() [2/2]
Generated by Doxygen
1886
Parameters
Returns
__hi.
scan_is()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Returns
scan_not()
Parameters
_←- The mask to compare against.
_m
_←- Pointer to start of range.
_lo
_←- Pointer to end of range.
_hi
Generated by Doxygen
5.377 std::ctype_byname< char > Class Reference 1887
Returns
table()
tolower() [1/2]
Parameters
Returns
__hi.
tolower() [2/2]
Parameters
_←- The char to convert.
_c
Returns
Generated by Doxygen
1888
toupper() [1/2]
Parameters
Returns
__hi.
toupper() [2/2]
Parameters
_←- The char to convert.
_c
Returns
widen() [1/2]
Generated by Doxygen
5.378 __gnu_cxx::debug_allocator< _Alloc > Class Template Reference 1889
Parameters
_←- The char to convert.
_c
Returns
widen() [2/2]
Parameters
Returns
__hi.
id
table_size
Generated by Doxygen
1890
Public Types
Friends
template<typename _Alloc>
class __gnu_cxx::debug_allocator< _Alloc >
Public Types
• using type
template<typename _Tp>
struct std::decay< _Tp >
decay
The documentation for this struct was generated from the following file:
• type_traits
Generated by Doxygen
5.380 std::decimal::decimal128 Class Reference 1891
Public Types
Generated by Doxygen
1892
decimal128()
std::decimal::decimal128::decimal128 (
__decfloat128 __z) [inline]
Conforming extension: Conversion from scalar decimal type.
The documentation for this class was generated from the following file:
• decimal
Public Types
Generated by Doxygen
5.381 std::decimal::decimal32 Class Reference 1893
decimal32()
std::decimal::decimal32::decimal32 (
__decfloat32 __z) [inline]
Conforming extension: Conversion from scalar decimal type.
The documentation for this class was generated from the following file:
• decimal
Generated by Doxygen
1894
Public Types
Generated by Doxygen
5.383 simd_abi::deduce< _Tp, _Np,... > Struct Template Reference 1895
decimal64()
std::decimal::decimal64::decimal64 (
__decfloat64 __z) [inline]
Conforming extension: Conversion from scalar decimal type.
The documentation for this class was generated from the following file:
• decimal
Template Parameters
The documentation for this struct was generated from the following file:
• simd.h
Generated by Doxygen
1896
Public Types
type
direct_mask_range_hashing __gnu_pbds::detail::default_comb_hash_fn::type
Dispatched type.
The documentation for this struct was generated from the following file:
• standard_policies.hpp
template<typename _Tp>
struct std::default_delete< _Tp >
Since
C++11
default_delete() [1/2]
default_delete() [2/2]
Generated by Doxygen
5.386 std::default_delete< _Tp[]> Struct Template Reference 1897
operator()()
• unique_ptr.h
template<typename _Tp>
struct std::default_delete< _Tp[ ]>
Since
C++11
default_delete() [1/2]
default_delete() [2/2]
Generated by Doxygen
1898
operator()()
• unique_ptr.h
Public Types
template<typename Key>
struct __gnu_pbds::detail::default_eq_fn< Key >
type
• standard_policies.hpp
Public Types
template<typename Key>
struct __gnu_pbds::detail::default_hash_fn< Key >
Generated by Doxygen
5.389 __gnu_parallel::default_parallel_tag Struct Reference 1899
type
• standard_policies.hpp
__gnu_parallel::parallel_tag
__gnu_parallel::default
_parallel_tag
__get_num_threads()
Generated by Doxygen
1900
set_num_threads()
void __gnu_parallel::parallel_tag::set_num_threads (
_ThreadIndex __num_threads) [inline], [inherited]
Set the desired number of threads.
Parameters
The documentation for this struct was generated from the following file:
• tags.h
Public Types
template<typename Comb_Probe_Fn>
struct __gnu_pbds::detail::default_probe_fn< Comb_Probe_Fn >
type
• standard_policies.hpp
Public Types
template<typename Comb_Hash_Fn>
struct __gnu_pbds::detail::default_resize_policy< Comb_Hash_Fn >
Generated by Doxygen
5.392 std::default_sentinel_t Struct Reference 1901
type
• standard_policies.hpp
A sentinel type that can be used to check for the end of a range.
For some iterator types the past-the-end sentinel value is independent of the underlying sequence, and a default sentinel
can be used with them. For example, a std::counted_iterator keeps a count of how many elements remain,
and so checking for the past-the-end value only requires checking if that count has reached zero. A past-the-end
std::istream_iterator is equal to the default-constructed value, which can be easily checked.
Comparing iterators of these types to std::default_sentinel is a convenient way to check if the end has been
reached.
Since
C++20
The documentation for this struct was generated from the following file:
• iterator_concepts.h
template<typename Key>
struct __gnu_pbds::detail::default_trie_access_traits< Key >
• standard_policies.hpp
Public Types
Generated by Doxygen
1902
type
• standard_policies.hpp
Public Types
type
lu_move_to_front_policy __gnu_pbds::detail::default_update_policy::type
Dispatched type.
The documentation for this struct was generated from the following file:
• standard_policies.hpp
• std_mutex.h
Generated by Doxygen
5.397 std::__debug::deque< _Tp, _Allocator > Class Template Reference 1903
__gnu_debug::_Safe
_container< _SafeContainer, std::__debug::deque
_Alloc, _SafeBase, _IsCxx11Allocator < _Tp, _Allocator >
Aware >
Public Types
Generated by Doxygen
1904
Friends
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1905
• debug/deque
std::_Deque_base<
_Tp, _Alloc >
Public Types
• deque ()=default
• template<typename _InputIterator , typename = std::_RequireInputIter<_InputIterator>>
deque (_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type())
• deque (const allocator_type &__a)
• deque (const deque &__x)
• deque (const deque &__x, const __type_identity_t< allocator_type > &__a)
Generated by Doxygen
1906
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1907
Protected Types
• enum { _S_initial_map_size }
• typedef __gnu_cxx::__alloc_traits< _Map_alloc_type > _Map_alloc_traits
• typedef _Alloc_traits::template rebind< _Ptr >::other _Map_alloc_type
• typedef _Alloc_traits::pointer _Ptr
• typedef _Alloc_traits::const_pointer _Ptr_const
Generated by Doxygen
1908
• template<typename... _Args>
void _M_push_back_aux (_Args &&... __args)
• template<typename... _Args>
void _M_push_front_aux (_Args &&... __args)
• void _M_pop_back_aux ()
• void _M_pop_front_aux ()
A standard container using fixed-size memory allocation and constant-time manipulation of elements at either end.
Template Parameters
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1909
• Tp∗∗ _M_map
• size_t _M_map_size
map_size is at least 8. map is an array of map_size pointers-to-nodes. (The name map has nothing to do with the
std::map class, and nodes should not be confused with std::list's usage of node.)
A node has no specific type name as such, but it is referred to as node in this file. It is a simple array-of-Tp. If Tp is very
large, there will be one Tp element per node (i.e., an array of one). For non-huge Tp's, node size is inversely related to
Tp size: the larger the Tp, the fewer Tp's will fit in a node. The goal here is to keep the total size of a node relatively
small and constant over different Tp's, to improve allocator efficiency.
Not every pointer in the map array will point to a node. If the initial number of elements in the deque is small, the /middle/
map pointers will be valid, and the ones at the edges will be unused. This same situation will arise as the map grows:
available map pointers, if any, will be on the ends. As new nodes are created, only a subset of the map's pointers need
to be copied outward.
Class invariants:
– i.node points to a member of the map array. (Yes, you read that correctly: i.node does not actually point to
a node.) The member of the map array is what actually points to the node.
– i.first == ∗(i.node) (This points to the node (first Tp element).)
– i.last == i.first + node_size
– i.cur is a pointer in the range [i.first, i.last). NOTE: the implication of this is that i.cur is always a dereference-
able pointer, even if i is a past-the-end iterator.
• Start and Finish are always nonsingular iterators. NOTE: this means that an empty deque must have one node,
a deque with <N elements (where N is the node buffer size) must have one node, a deque with N through (2N-1)
elements must have two nodes, etc.
• For every node other than start.node and finish.node, every element in the node is an initialized object. If start.←-
node == finish.node, then [start.cur, finish.cur) are initialized objects, and the elements outside that range are
uninitialized storage. Otherwise, [start.cur, start.last) and [finish.first, finish.cur) are initialized objects, and [start.←-
first, start.cur) and [finish.cur, finish.last) are uninitialized storage.
• A pointer in the range [map, map + map_size) points to an allocated node if and only if the pointer is in the range
[start.node, finish.node].
Here's the magic: nothing in deque is aware of the discontiguous storage!
The memory setup and layout occurs in the parent, _Base, and the iterator class is entirely responsible for leaping
from one node to the next. All the implementation routines for deque itself work only through the start and finish
iterators. This keeps the routines simple and sane, and we can use other standard algorithms as well.
Generated by Doxygen
1910
deque() [1/10]
deque() [2/10]
Parameters
_←- An allocator object.
_a
deque() [3/10]
Parameters
deque() [4/10]
Parameters
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1911
deque() [5/10]
Parameters
The newly-created deque uses a copy of the allocator object used by __x (unless the allocator traits dictate a different
object).
References std::deque< _Tp, _Alloc >::begin(), and std::deque< _Tp, _Alloc >::end().
deque() [6/10]
deque() [7/10]
deque() [8/10]
deque() [9/10]
Parameters
_←- An initializer_list.
_l
Generated by Doxygen
1912
deque() [10/10]
Parameters
∼deque()
template<typename _Tp , typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::∼deque () [inline]
The dtor only erases the elements, and note that if the elements themselves are pointers, the pointed-to memory is not
touched in any way. Managing the pointer is the user's responsibility.
References std::deque< _Tp, _Alloc >::begin(), and std::deque< _Tp, _Alloc >::end().
_M_fill_initialize()
Parameters
__value Initial value.
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1913
Returns
Nothing.
Precondition
_M_start and _M_finish have already been initialized, but none of the deque's elements have yet been constructed.
This function is called only when the user provides an explicit size (with or without an explicit exemplar value).
References std::_Destroy().
Referenced by std::deque< _Tp, _Alloc >::deque().
_M_new_elements_at_back()
_M_new_elements_at_front()
_M_pop_back_aux()
_M_pop_front_aux()
_M_push_back_aux()
Generated by Doxygen
1914
_M_push_front_aux()
_M_range_check()
_M_range_initialize() [1/2]
Parameters
Returns
Nothing.
If the iterators are actually forward iterators (or better), then the memory layout can be done all at once. Else we move
forward using push_back on each value from the iterator.
References std::_Destroy(), std::advance(), and std::distance().
_M_range_initialize() [2/2]
Parameters
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1915
Returns
Nothing.
If the iterators are actually forward iterators (or better), then the memory layout can be done all at once. Else we move
forward using push_back on each value from the iterator.
Referenced by std::deque< _Tp, _Alloc >::deque(), and std::deque< _Tp, _Alloc >::deque().
_M_reallocate_map()
_M_reserve_elements_at_back()
_M_reserve_elements_at_front()
_M_reserve_map_at_back()
_M_reserve_map_at_front()
Generated by Doxygen
1916
Makes sure the _M_map has space for new nodes. Does not actually add the nodes. Can invalidate _M_map pointers.
(And consequently, deque iterators.)
References std::deque< _Tp, _Alloc >::_M_reallocate_map().
assign() [1/3]
Parameters
This function fills a deque with copies of the elements in the range [__first,__last).
Note that the assignment completely changes the deque and that the resulting deque's size is the same as the number
of elements assigned.
References std::__iterator_category().
assign() [2/3]
Parameters
←- An initializer_list.
_←-
←-
_←-
l
This function fills a deque with copies of the elements in the initializer_list __l.
Note that the assignment completely changes the deque and that the resulting deque's size is the same as the number
of elements assigned.
assign() [3/3]
Parameters
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1917
This function fills a deque with n copies of the given value. Note that the assignment completely changes the deque and
that the resulting deque's size is the same as the number of elements assigned.
at() [1/2]
Parameters
_←- The index of the element for which data should be accessed.
_n
Returns
Exceptions
This function provides for safer data access. The parameter is first checked that it is in the range of the deque. The
function throws out_of_range if the check fails.
References std::deque< _Tp, _Alloc >::_M_range_check().
at() [2/2]
Parameters
_←- The index of the element for which data should be accessed.
_n
Returns
Exceptions
This function provides for safer data access. The parameter is first checked that it is in the range of the deque. The
function throws out_of_range if the check fails.
References std::deque< _Tp, _Alloc >::_M_range_check().
Generated by Doxygen
1918
back() [1/2]
back() [2/2]
begin() [1/2]
begin() [2/2]
cbegin()
cend()
clear()
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1919
crbegin()
crend()
emplace()
Parameters
__position A const_iterator into the deque.
__args Arguments.
Returns
empty()
end() [1/2]
end() [2/2]
Generated by Doxygen
1920
erase() [1/2]
Parameters
Returns
An iterator pointing to the element pointed to by last prior to erasing (or end()).
This function will erase the elements in the range [__first,__last) and shorten the deque accordingly.
The user is cautioned that this function only erases the elements, and that if the elements themselves are pointers, the
pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility.
erase() [2/2]
Parameters
__position Iterator pointing to element to be erased.
Returns
This function will erase the element at the given position and thus shorten the deque by one.
The user is cautioned that this function only erases the element, and that if the element is itself a pointer, the pointed-to
memory is not touched in any way. Managing the pointer is the user's responsibility.
front() [1/2]
front() [2/2]
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1921
get_allocator()
insert() [1/5]
Parameters
_←- An iterator into the deque.
_p
_←- An initializer_list.
_l
Returns
This function will insert copies of the data in the initializer_list __l into the deque before the location specified by __p.
This is known as list insert.
References std::deque< _Tp, _Alloc >::begin(), and std::deque< _Tp, _Alloc >::cbegin().
insert() [2/5]
Parameters
__position A const_iterator into the deque.
__first An input iterator.
__last An input iterator.
Returns
This function will insert copies of the data in the range [__first,__last) into the deque before the location specified by
__position. This is known as range insert.
References std::__iterator_category(), std::deque< _Tp, _Alloc >::begin(), and std::deque< _Tp, _Alloc >::cbegin().
Generated by Doxygen
1922
insert() [3/5]
Parameters
__position A const_iterator into the deque.
__x Data to be inserted.
Returns
This function will insert a copy of the given value before the specified location.
insert() [4/5]
Parameters
__position A const_iterator into the deque.
__n Number of elements to be inserted.
__x Data to be inserted.
Returns
This function will insert a specified number of copies of the given data before the location specified by __position.
References std::deque< _Tp, _Alloc >::begin(), and std::deque< _Tp, _Alloc >::cbegin().
insert() [5/5]
Parameters
__position A const_iterator into the deque.
__x Data to be inserted.
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1923
Returns
This function will insert a copy of the given rvalue before the specified location.
References std::deque< _Tp, _Alloc >::emplace(), and std::move().
max_size()
operator=() [1/3]
Parameters
operator=() [2/3]
Parameters
The contents of __x are moved into this deque (without copying, if the allocators permit it). __x is a valid, but unspecified
deque.
References std::move().
operator=() [3/3]
Generated by Doxygen
1924
Parameters
←- An initializer_list.
_←-
←-
_←-
l
This function fills a deque with copies of the elements in the initializer_list __l.
Note that the assignment completely changes the deque and that the resulting deque's size is the same as the number
of elements assigned.
operator[]() [1/2]
Parameters
_←- The index of the element for which data should be accessed.
_n
Returns
operator[]() [2/2]
Parameters
_←- The index of the element for which data should be accessed.
_n
Returns
pop_back()
Generated by Doxygen
5.398 std::deque< _Tp, _Alloc > Class Template Reference 1925
pop_front()
push_back()
Parameters
_←- Data to be added.
_x
This is a typical stack operation. The function creates an element at the end of the deque and assigns the given data to
it. Due to the nature of a deque this operation can be done in constant time.
References std::deque< _Tp, _Alloc >::_M_push_back_aux().
push_front()
Parameters
_←- Data to be added.
_x
This is a typical stack operation. The function creates an element at the front of the deque and assigns the given data
to it. Due to the nature of a deque this operation can be done in constant time.
References std::deque< _Tp, _Alloc >::_M_push_front_aux().
rbegin() [1/2]
rbegin() [2/2]
Generated by Doxygen
1926
rend() [1/2]
rend() [2/2]
resize() [1/2]
Parameters
This function will resize the deque to the specified number of elements. If the number is smaller than the deque's current
size the deque is truncated, otherwise default constructed elements are appended.
References std::deque< _Tp, _Alloc >::size().
resize() [2/2]
Parameters
This function will resize the deque to the specified number of elements. If the number is smaller than the deque's current
size the deque is truncated, otherwise the deque is extended and new elements are populated with given data.
References std::deque< _Tp, _Alloc >::size().
shrink_to_fit()
Generated by Doxygen
5.399 std::destroying_delete_t Struct Reference 1927
size()
swap()
Parameters
This exchanges the elements between two deques in constant time. (Four pointers, so it should be quite fast.) Note that
the global std::swap() function is specialized such that std::swap(d1,d2) will feed to this function.
Whether the allocators are swapped depends on the allocator traits.
The documentation for this class was generated from the following files:
• stl_deque.h
• deque.tcc
Tag type used to declare a class-specific operator delete that can invoke the destructor before deallocating the memory.
The documentation for this struct was generated from the following file:
• new
Public Types
template<typename _Tp>
struct std::tr2::direct_bases< _Tp >
Generated by Doxygen
1928
__gnu_pbds::detail
::mask_based_range_hashing
< std::size_t >
__gnu_pbds::direct
_mask_range_hashing
< Size_Type >
Public Types
operator()()
Generated by Doxygen
5.402 __gnu_pbds::direct_mod_range_hashing< Size_Type > Class Template Reference 1929
• hash_policy.hpp
__gnu_pbds::detail
::mod_based_range_hashing
< std::size_t >
__gnu_pbds::direct
_mod_range_hashing<
Size_Type >
Public Types
operator()()
Generated by Doxygen
1930
>::operator() (
size_type hash) const [inline], [protected]
Transforms the __hash value hash into a ranged-hash value (using a modulo operation).
The documentation for this class was generated from the following file:
• hash_policy.hpp
Generated by Doxygen
5.404 std::filesystem::directory_iterator Class Reference 1931
Friends
• struct _Dir
• class directory_iterator
• template<typename _CharT , typename _Traits >
basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, const
directory_entry &__d)
• class recursive_directory_iterator
Since
C++17
The documentation for this class was generated from the following file:
• bits/fs_dir.h
Public Types
Generated by Doxygen
1932
Friends
Related Symbols
Since
C++17
The documentation for this class was generated from the following file:
• bits/fs_dir.h
Public Types
• discard_block_engine ()
• discard_block_engine (_RandomNumberEngine &&__rng)
• template<typename _Sseq , typename = _If_seed_seq<_Sseq>>
discard_block_engine (_Sseq &__q)
• discard_block_engine (const _RandomNumberEngine &__rng)
• discard_block_engine (result_type __s)
• const _RandomNumberEngine & base () const noexcept
• void discard (unsigned long long __z)
• result_type operator() ()
• void seed ()
• template<typename _Sseq >
_If_seed_seq< _Sseq > seed (_Sseq &__q)
• void seed (result_type __s)
Generated by Doxygen
5.405 std::discard_block_engine< _RandomNumberEngine, __p, __r > Class Template Reference 1933
Friends
• template<typename _RandomNumberEngine1 , size_t __p1, size_t __r1, typename _CharT , typename _Traits >
std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const
std::discard_block_engine< _RandomNumberEngine1, __p1, __r1 > &__x)
• bool operator== (const discard_block_engine &__lhs, const discard_block_engine &__rhs)
• template<typename _RandomNumberEngine1 , size_t __p1, size_t __r1, typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
std::discard_block_engine< _RandomNumberEngine1, __p1, __r1 > &__x)
Produces random numbers from some base engine by discarding blocks of data.
Precondition
0≤r≤p
Since
C++11
result_type
discard_block_engine() [1/5]
Generated by Doxygen
1934
discard_block_engine() [2/5]
Parameters
discard_block_engine() [3/5]
Parameters
discard_block_engine() [4/5]
Parameters
discard_block_engine() [5/5]
Parameters
_←- A seed sequence.
_q
Generated by Doxygen
5.405 std::discard_block_engine< _RandomNumberEngine, __p, __r > Class Template Reference 1935
base()
discard()
max()
min()
operator()()
seed() [1/3]
seed() [2/3]
Parameters
Generated by Doxygen
1936
seed() [3/3]
operator<<
Parameters
__os An output stream.
__x A discard_block_engine random number generator engine.
Returns
The output stream with the state of __x inserted or in an error state.
operator==
Parameters
__lhs A discard_block_engine random number generator object.
__rhs Another discard_block_engine random number generator object.
Returns
true if the infinite sequences of generated values would be equal, false otherwise.
operator>>
Generated by Doxygen
5.406 std::discrete_distribution< _IntType > Class Template Reference 1937
Parameters
_←- An input stream.
_is
_←- A discard_block_engine random number generator engine.
_x
Returns
The input stream with the state of __x extracted or in an error state.
The documentation for this class was generated from the following files:
• random.h
• bits/random.tcc
Classes
• struct param_type
Public Types
Generated by Doxygen
1938
Friends
Since
C++11
result_type
max()
min()
operator()()
Generated by Doxygen
5.406 std::discrete_distribution< _IntType > Class Template Reference 1939
param() [1/2]
param() [2/2]
Parameters
probabilities()
reset()
operator<<
Parameters
__os An output stream.
__x A discrete_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
Generated by Doxygen
1940
operator==
operator>>
Parameters
_←- An input stream.
_is
_←- A discrete_distribution random number generator engine.
_x
Returns
The documentation for this class was generated from the following files:
• random.h
• bits/random.tcc
std::binary_function
< _Tp, _Tp, _Tp >
Generated by Doxygen
5.408 std::divides< void > Struct Reference 1941
Public Types
• constexpr _Tp operator() (const _Tp &__x, const _Tp &__y) const
template<typename _Tp>
struct std::divides< _Tp >
first_argument_type
result_type
second_argument_type
• stl_function.h
Public Types
• stl_function.h
Generated by Doxygen
1942
std::exception
std::logic_error
std::domain_error
Thrown by the library, or by you, to report domain errors (domain in the mathematical sense).
what()
• stdexcept
Generated by Doxygen
5.410 __gnu_pbds::detail::dumnode_const_iterator< Key, Data, _Alloc > Struct Template Reference 1943
Public Types
• null_node_metadata.hpp
• using period
• using rep
Generated by Doxygen
1944
Related Symbols
• chrono.h
template<typename _Rep>
struct std::chrono::duration_values< _Rep >
duration_values
The documentation for this struct was generated from the following file:
• chrono.h
Generated by Doxygen
5.413 std::tr2::dynamic_bitset< _WordT, _Alloc > Class Template Reference 1945
std::tr2::__dynamic
_bitset_base< _WordT,
_Alloc >
std::tr2::dynamic_bitset
< _WordT, _Alloc >
Classes
• class reference
Public Types
• dynamic_bitset ()=default
• dynamic_bitset (const allocator_type &__alloc)
• dynamic_bitset (const char ∗__str, const allocator_type &__alloc=allocator_type())
• dynamic_bitset (const dynamic_bitset &)=default
• template<typename _CharT , typename _Traits , typename _Alloc1 >
dynamic_bitset (const std::basic_string< _CharT, _Traits, _Alloc1 > &__str, typename basic_string< _CharT,
_Traits, _Alloc1 >::size_type __pos=0, typename basic_string< _CharT, _Traits, _Alloc1 >::size_type __←-
n=std::basic_string< _CharT, _Traits, _Alloc1 >::npos, _CharT __zero=_CharT('0'), _CharT __one=_CharT('1'),
const allocator_type &__alloc=allocator_type())
• dynamic_bitset (dynamic_bitset &&__b) noexcept
• dynamic_bitset (initializer_list< block_type > __il, const allocator_type &__alloc=allocator_type())
• dynamic_bitset (size_type __nbits, unsigned long long __val=0ULL, const allocator_type &__alloc=allocator_←-
type())
• template<typename _Traits = std::char_traits<char>, typename _CharT = typename _Traits::char_type>
void _M_copy_from_ptr (const _CharT ∗, size_t, size_t, size_t, _CharT __zero=_CharT('0'), _CharT __one=_←-
CharT('1'))
Generated by Doxygen
1946
Generated by Doxygen
5.413 std::tr2::dynamic_bitset< _WordT, _Alloc > Class Template Reference 1947
Friends
int main()
{
long a = ’a’;
dynamic_bitset<> b(a);
ostringstream s;
s « b;
string str = s.str();
cout « "index 3 in the string is " « str[3] « " but\n"
« "index 3 in the bitset is " « b[3] « endl;
}
Most of the actual code isn't contained in dynamic_bitset<> itself, but in the base class __dynamic_bitset_base. The
base class works with whole words, not with individual bits. This allows us to specialize __dynamic_bitset_base for the
important special case where the dynamic_bitset is only a single word.
Generated by Doxygen
1948
Extra confusion can result due to the fact that the storage for __dynamic_bitset_base is a vector, and is indexed as such.
This is carefully encapsulated.
dynamic_bitset() [1/7]
dynamic_bitset() [2/7]
dynamic_bitset() [3/7]
dynamic_bitset() [4/7]
Parameters
Exceptions
Generated by Doxygen
5.413 std::tr2::dynamic_bitset< _WordT, _Alloc > Class Template Reference 1949
std::invalid_argument If a character appears in the string which is neither '0' nor '1'.
dynamic_bitset() [5/7]
Parameters
Exceptions
std::invalid_argument If a character appears in the string which is neither '0' nor '1'.
dynamic_bitset() [6/7]
dynamic_bitset() [7/7]
all()
any()
Generated by Doxygen
1950
Returns
append() [1/2]
append() [2/2]
clear()
count()
empty()
find_first()
See also
find_next
Generated by Doxygen
5.413 std::tr2::dynamic_bitset< _WordT, _Alloc > Class Template Reference 1951
find_next()
Parameters
__prev Where to start searching.
See also
find_first
flip() [1/2]
flip() [2/2]
Parameters
Exceptions
get_allocator()
max_size()
Generated by Doxygen
1952
none()
Returns
num_blocks()
operator&=() [1/2]
Parameters
__rhs A same-sized dynamic_bitset.
operator&=() [2/2]
Parameters
__rhs A same-sized dynamic_bitset.
operator-=()
Parameters
__rhs A same-sized dynamic_bitset.
Generated by Doxygen
5.413 std::tr2::dynamic_bitset< _WordT, _Alloc > Class Template Reference 1953
operator<<()
operator<<=()
Parameters
operator=() [1/2]
operator=() [2/2]
operator>>()
operator>>=()
Parameters
Generated by Doxygen
1954
operator[]() [1/2]
Parameters
__pos Index into the dynamic_bitset.
Returns
A bool for a 'const dynamic_bitset'. For non-const bitsets, an instance of the reference proxy class.
Note
These operators do no range checking and throw no exceptions, as required by DR 11 to the standard.
operator[]() [2/2]
Parameters
__pos Index into the dynamic_bitset.
Returns
A bool for a 'const dynamic_bitset'. For non-const bitsets, an instance of the reference proxy class.
Note
These operators do no range checking and throw no exceptions, as required by DR 11 to the standard.
operator∧ =()
Parameters
__rhs A same-sized dynamic_bitset.
operator"|=()
Generated by Doxygen
5.413 std::tr2::dynamic_bitset< _WordT, _Alloc > Class Template Reference 1955
Parameters
__rhs A same-sized dynamic_bitset.
operator∼()
push_back()
reset() [1/2]
reset() [2/2]
Parameters
Exceptions
resize()
Generated by Doxygen
1956
set() [1/2]
set() [2/2]
Parameters
Exceptions
size()
swap()
test()
Parameters
Returns
Generated by Doxygen
5.413 std::tr2::dynamic_bitset< _WordT, _Alloc > Class Template Reference 1957
Exceptions
to_string()
Returns
Note the ordering of the bits: decreasing character positions correspond to increasing bit positions (see the main class
notes for an example).
to_ullong()
Returns
Exceptions
to_ulong()
Returns
Exceptions
The documentation for this class was generated from the following files:
• dynamic_bitset
• dynamic_bitset.tcc
Generated by Doxygen
1958
• type_traits
Friends
template<typename _Tp>
class std::enable_shared_from_this< _Tp >
Since
C++11
weak_from_this() [1/2]
Generated by Doxygen
5.416 __gnu_cxx::enc_filebuf< _CharT > Class Template Reference 1959
Since
C++17
weak_from_this() [2/2]
Since
C++17
The documentation for this class was generated from the following files:
• bits/shared_ptr.h
• shared_ptr_base.h
std::basic_streambuf
< _CharT, encoding_char
_traits< _CharT > >
std::basic_filebuf
< _CharT, encoding_char
_traits< _CharT > >
__gnu_cxx::enc_filebuf
< _CharT >
Public Types
Generated by Doxygen
1960
Generated by Doxygen
5.416 __gnu_cxx::enc_filebuf< _CharT > Class Template Reference 1961
Protected Attributes
• char_type ∗ _M_buf
• bool _M_buf_allocated
• locale _M_buf_locale
• size_t _M_buf_size
• const __codecvt_type ∗ _M_codecvt
• char ∗ _M_ext_buf
• streamsize _M_ext_buf_size
• char ∗ _M_ext_end
• const char ∗ _M_ext_next
• __file_type _M_file
• char_type ∗ _M_in_beg
• char_type ∗ _M_in_cur
• char_type ∗ _M_in_end
• __c_lock _M_lock
• ios_base::openmode _M_mode
• char_type ∗ _M_out_beg
• char_type ∗ _M_out_cur
• char_type ∗ _M_out_end
• bool _M_reading
• __state_type _M_state_beg
• __state_type _M_state_cur
• __state_type _M_state_last
• bool _M_writing
• char_type _M_pback
• char_type ∗ _M_pback_cur_save
• char_type ∗ _M_pback_end_save
• bool _M_pback_init
Generated by Doxygen
1962
template<typename _CharT>
class __gnu_cxx::enc_filebuf< _CharT >
class enc_filebuf.
_M_create_pback()
_M_destroy_pback()
_M_set_buffer()
close()
eback()
Generated by Doxygen
5.416 __gnu_cxx::enc_filebuf< _CharT > Class Template Reference 1963
egptr()
epptr()
gbump()
Parameters
_←- The delta by which to move.
_n
This just advances the read position without returning any data.
getloc()
If pubimbue(loc) has been called, then the most recent loc is returned. Otherwise the global locale in effect at the time
of construction is returned.
Generated by Doxygen
1964
gptr()
imbue()
Parameters
__loc A new locale.
Translations done during I/O which depend on the current locale are changed by this call. The standard adds, Between
invocations of this function a class derived from streambuf can safely cache results of calls to locale functions and to
members of facets so obtained.
Note
in_avail()
If a read position is available, returns the number of characters available for reading before the buffer must be refilled.
Otherwise returns the derived showmanyc().
is_open()
open() [1/3]
Generated by Doxygen
5.416 __gnu_cxx::enc_filebuf< _CharT > Class Template Reference 1965
Parameters
Returns
open() [2/3]
Parameters
Returns
If a file is already open, this function immediately fails. Otherwise it tries to open the file named __s using the flags given
in __mode.
Table 92, adapted here, gives the relation between openmode combinations and the equivalent fopen() flags. (NB:
lines app, in|out|app, in|app, binary|app, binary|in|out|app, and binary|in|app per DR 596)
+---------------------------------------------------------+
| ios_base Flag combination stdio equivalent |
|binary in out trunc app |
+---------------------------------------------------------+
| + w |
| + + a |
| + a |
| + + w |
| + r |
| + + r+ |
| + + + w+ |
| + + + a+ |
| + + a+ |
+---------------------------------------------------------+
| + + wb |
| + + + ab |
| + + ab |
| + + + wb |
| + + rb |
| + + + r+b |
| + + + + w+b |
| + + + + a+b |
| + + + a+b |
+---------------------------------------------------------+
Generated by Doxygen
1966
open() [3/3]
Parameters
Returns
overflow()
Parameters
_←- An additional character to consume.
_c
Returns
Informally, this function is called when the output buffer is full (or does not exist, as buffering need not actually be done).
If a buffer exists, it is consumed, with some effect on the controlled sequence. (Typically, the buffer is written out to the
sequence verbatim.) In either case, the character c is also written out, if __c is not eof().
For a formal definition of this function, see a good text such as Langer & Kreft, or [27.5.2.4.5]/3-7.
A functioning output streambuf can be created by overriding only this function (no buffer area will be used).
Note
pbackfail()
Parameters
_←- The character to be inserted back into the sequence.
_c
Generated by Doxygen
5.416 __gnu_cxx::enc_filebuf< _CharT > Class Template Reference 1967
Returns
Postcondition
The constraints of gptr(), eback(), and pptr() are the same as for underflow().
Note
pbase()
pbump()
Parameters
_←- The delta by which to move.
_n
This just advances the write position without returning any data.
pptr()
pubimbue()
Generated by Doxygen
1968
Parameters
__loc The new locale.
Returns
pubseekoff()
Parameters
__off Offset.
__way Value for ios_base::seekdir.
__mode Value for ios_base::openmode.
pubseekpos()
Parameters
__sp Position
__mode Value for ios_base::openmode.
pubsetbuf()
pubsync()
Generated by Doxygen
5.416 __gnu_cxx::enc_filebuf< _CharT > Class Template Reference 1969
sbumpc()
Returns
If the input read position is available, returns that character and increments the read pointer, otherwise calls and returns
uflow().
seekoff()
Note
Base class version does nothing, returns a pos_type that represents an invalid stream position.
seekpos()
Note
Base class version does nothing, returns a pos_type that represents an invalid stream position.
setbuf()
Parameters
Generated by Doxygen
1970
Returns
this
If no file has been opened, and both __s and __n are zero, then the stream becomes unbuffered. Otherwise, __s
is used as a buffer; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.←-
html#io.streambuf.buffering for more.
Reimplemented from std::basic_streambuf< _CharT, encoding_char_traits< _CharT > >.
setg()
Parameters
__gbeg A pointer.
__gnext A pointer.
__gend A pointer.
Postcondition
setp()
Parameters
__pbeg A pointer.
__pend A pointer.
Postcondition
sgetc()
Generated by Doxygen
5.416 __gnu_cxx::enc_filebuf< _CharT > Class Template Reference 1971
Returns
If the input read position is available, returns that character, otherwise calls and returns underflow(). Does not
move the read position after fetching the character.
sgetn()
Parameters
Returns xsgetn(__s,__n). The effect is to fill __s[0] through __s[__n-1] with characters from the input sequence, if
possible.
showmanyc()
Returns
If it returns a positive value, then successive calls to underflow() will not return traits::eof() until at least that
number of characters have been supplied. If showmanyc() returns -1, then calls to underflow() or uflow()
will fail. [27.5.2.4.3]/1
Note
snextc()
Returns
Calls sbumpc(), and if that function returns traits::eof(), so does this function. Otherwise, sgetc().
Generated by Doxygen
1972
sputbackc()
Parameters
_←- The character to push back.
_c
Returns
Similar to sungetc(), but __c is pushed onto the stream instead of the previous character. If successful, the next character
fetched from the input stream will be __c.
sputc()
Parameters
_←- A character to output.
_c
Returns
__c, if possible.
sputn()
Parameters
Generated by Doxygen
5.416 __gnu_cxx::enc_filebuf< _CharT > Class Template Reference 1973
sungetc()
Returns
If a putback position is available, this function decrements the input pointer and returns that character. Otherwise, calls
and returns pbackfail(). The effect is to unget the last character gotten.
sync()
Returns
-1 on failure.
Each derived class provides its own appropriate behavior, including the definition of failure.
Note
uflow()
Returns
Informally, this function does the same thing as underflow(), and in fact is required to call that function. It also
returns the new character, like underflow() does. However, this function also moves the read position forward by
one.
underflow()
Returns
Informally, this function is called when the input buffer is exhausted (or does not exist, as buffering need not actually be
done). If a buffer exists, it is refilled. In either case, the next available character is returned, or traits::eof() to
indicate a null pending sequence.
For a formal definition of the pending sequence, see a good text such as Langer & Kreft, or [27.5.2.4.3]/7-14.
A functioning input streambuf can be created by overriding only this function (no buffer area will be used). For an
example, see https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.html
Generated by Doxygen
1974
Note
xsgetn()
Parameters
Returns
xsputn()
Parameters
Returns
_M_buf
Generated by Doxygen
5.416 __gnu_cxx::enc_filebuf< _CharT > Class Template Reference 1975
_M_buf_locale
_M_buf_size
_M_ext_buf
_M_ext_buf_size
_M_ext_next
_M_in_beg
_M_in_cur
_M_in_end
_M_mode
Generated by Doxygen
1976
_M_out_beg
_M_out_cur
_M_out_end
_M_pback
_M_pback_cur_save
_M_pback_end_save
_M_pback_init
Generated by Doxygen
5.417 __gnu_cxx::encoding_char_traits< _CharT > Struct Template Reference 1977
_M_reading
• enc_filebuf.h
__gnu_cxx::char_traits
< _CharT >
std::char_traits<
_CharT >
__gnu_cxx::encoding
_char_traits< _CharT >
Public Types
Generated by Doxygen
1978
template<typename _CharT>
struct __gnu_cxx::encoding_char_traits< _CharT >
encoding_char_traits
The documentation for this struct was generated from the following file:
• codecvt_specializations.h
Public Types
• encoding_state (const char ∗__int, const char ∗__ext, int __ibom=0, int __ebom=0, int __bytes=1)
• encoding_state (const encoding_state &__obj)
• int character_ratio () const
• int external_bom () const
• const std::string external_encoding () const
• bool good () const throw ()
• const descriptor_type & in_descriptor () const
• int internal_bom () const
• const std::string internal_encoding () const
• encoding_state & operator= (const encoding_state &__obj)
• const descriptor_type & out_descriptor () const
Generated by Doxygen
5.419 __gnu_pbds::detail::entry_cmp< _VTp, Cmp_Fn, _Alloc, No_Throw > Struct Template Reference 1979
Protected Attributes
• int _M_bytes
• int _M_ext_bom
• std::string _M_ext_enc
• descriptor_type _M_in_desc
• int _M_int_bom
• std::string _M_int_enc
• descriptor_type _M_out_desc
• codecvt_specializations.h
• entry_cmp.hpp
Classes
• struct type
Public Types
Specialization, false.
The documentation for this struct was generated from the following file:
• entry_cmp.hpp
Generated by Doxygen
1980
Public Types
Specialization, true.
type
• entry_cmp.hpp
• entry_pred.hpp
Public Types
Specialization, false.
The documentation for this struct was generated from the following file:
• entry_pred.hpp
Generated by Doxygen
5.425 __gnu_pbds::detail::eq_by_less< Key, Cmp_Fn > Struct Template Reference 1981
Public Types
Specialization, true.
The documentation for this struct was generated from the following file:
• entry_pred.hpp
Equivalence function.
The documentation for this struct was generated from the following file:
• eq_by_less.hpp
__gnu_parallel::find_tag
__gnu_parallel::equal
_split_tag
Generated by Doxygen
1982
See also
_GLIBCXX_FIND_EQUAL_SPLIT
The documentation for this struct was generated from the following file:
• tags.h
std::binary_function
< _Tp, _Tp, bool >
Public Types
• constexpr bool operator() (const _Tp &__x, const _Tp &__y) const
template<typename _Tp>
struct std::equal_to< _Tp >
first_argument_type
result_type
Generated by Doxygen
5.428 std::ranges::equal_to Struct Reference 1983
second_argument_type
• stl_function.h
Public Types
• using is_transparent
• ranges_cmp.h
Public Types
• stl_function.h
Generated by Doxygen
1984
Since
C++11
default_error_condition()
equivalent() [1/2]
equivalent() [2/2]
message()
Generated by Doxygen
5.431 std::error_code Class Reference 1985
name()
operator<=>()
strong_ordering std::_V2::error_category::operator<=> (
const error_category & __rhs) const [inline], [nodiscard], [noexcept]
Ordered comparison that defines a total order for error categories.
operator==()
bool std::_V2::error_category::operator== (
const error_category & __other) const [inline], [noexcept]
An error_category only compares equal to itself.
The documentation for this class was generated from the following file:
• system_error
Related Symbols
Class error_code
This class is a value type storing an integer error number and a category that gives meaning to the error number.
Typically this is done close the the point where the error happens, to capture the original error value.
Generated by Doxygen
1986
An error_code object can be used to store the original error value emitted by some subsystem, with a category
relevant to the subsystem. For example, errors from POSIX library functions can be represented by an errno value
and the "generic" category, but errors from an HTTP library might be represented by an HTTP response status code
(e.g. 404) and a custom category defined by the library.
Since
C++11
error_code()
category()
default_error_condition()
message()
operator bool()
value()
• system_error
• error_condition () noexcept
• template<typename _ErrorConditionEnum , typename = _Check<_ErrorConditionEnum>>
error_condition (_ErrorConditionEnum __e) noexcept
Generated by Doxygen
5.432 std::error_condition Class Reference 1987
Related Symbols
Class error_condition
This class represents error conditions that may be visible at an API boundary. Different error_code values that can
occur within a library or module might map to the same error_condition.
An error_condition represents something that the program can test for, and subsequently take appropriate action.
Since
C++11
error_condition() [1/3]
error_condition() [2/3]
std::error_condition::error_condition (
int __v,
const error_category & __cat) [inline], [noexcept]
Initialize with the specified value and category.
error_condition() [3/3]
Generated by Doxygen
1988
assign()
void std::error_condition::assign (
int __v,
const error_category & __cat) [inline], [noexcept]
Set the value and category.
category()
clear()
message()
operator bool()
value()
• system_error
__gnu_parallel::parallel_tag
__gnu_parallel::exact_tag
Generated by Doxygen
5.434 std::exception Class Reference 1989
__get_num_threads()
set_num_threads()
void __gnu_parallel::parallel_tag::set_num_threads (
_ThreadIndex __num_threads) [inline], [inherited]
Set the desired number of threads.
Parameters
The documentation for this struct was generated from the following file:
• tags.h
Generated by Doxygen
1990
__gnu_cxx::forced_error
__gnu_cxx::recursive
_init_error
std::bad_alloc
std::experimental::
fundamentals_v1::bad
__gnu_pbds::insert
std::bad_cast _any_cast
_error
std::bad_exception __gnu_pbds::container
__gnu_pbds::join_error
_error
std::exception
std::bad_function_call
__gnu_pbds::resize
std::domain_error
_error
std::bad_typeid
std::experimental::
fundamentals_v1::bad
std::bad_weak_ptr _optional_access
std::logic_error std::future_error
std::invalid_argument
std::length_error
std::out_of_range
std::overflow_error
std::range_error
std::runtime_error
std::regex_error
std::experimental::
filesystem::v1::filesystem_error
std::system_error
std::filesystem::filesystem
_error
std::underflow_error
what()
Generated by Doxygen
5.435 std::__unspecified__::exception_ptr Class Reference 1991
Returns a C-style character string describing the general cause of the current error.
• exception.h
Friends
Related Symbols
Since
The documentation for this class was generated from the following file:
• exception_ptr.h
Generated by Doxygen
1992
Classes
• struct param_type
Public Types
• exponential_distribution ()
• exponential_distribution (_RealType __lambda)
• exponential_distribution (const param_type &__p)
• template<typename _ForwardIterator , typename _UniformRandomNumberGenerator >
void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng)
• template<typename _ForwardIterator , typename _UniformRandomNumberGenerator >
void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng, const
param_type &__p)
• template<typename _UniformRandomNumberGenerator >
void __generate (result_type ∗__f, result_type ∗__t, _UniformRandomNumberGenerator &__urng, const
param_type &__p)
• _RealType lambda () const
• result_type max () const
• result_type min () const
• template<typename _UniformRandomNumberGenerator >
result_type operator() (_UniformRandomNumberGenerator &__urng)
• template<typename _UniformRandomNumberGenerator >
result_type operator() (_UniformRandomNumberGenerator &__urng, const param_type &__p)
• param_type param () const
• void param (const param_type &__param)
• void reset ()
Friends
1
Mean λ
ln 2
Median λ
Mode zero
Range [0, ∞]
1
Standard Deviation λ
Generated by Doxygen
5.436 std::exponential_distribution< _RealType > Class Template Reference 1993
Since
C++11
result_type
exponential_distribution() [1/2]
exponential_distribution() [2/2]
lambda()
max()
min()
operator()()
Generated by Doxygen
1994
param() [1/2]
param() [2/2]
Parameters
reset()
operator==
• random.h
• bits/random.tcc
Generated by Doxygen
5.438 std::extreme_value_distribution< _RealType > Class Template Reference 1995
std::integral_constant
< size_t, 0 >
std::extent< typename,
_Uint >
Public Types
• using type
• using value_type
extent
The documentation for this struct was generated from the following file:
• type_traits
Classes
• struct param_type
Public Types
Generated by Doxygen
1996
Friends
Since
C++11
result_type
a()
Generated by Doxygen
5.438 std::extreme_value_distribution< _RealType > Class Template Reference 1997
b()
max()
min()
operator()()
param() [1/2]
param() [2/2]
Parameters
reset()
Generated by Doxygen
1998
operator==
• random.h
• bits/random.tcc
Generated by Doxygen
5.439 std::locale::facet Class Reference 1999
std::__codecvt_abstract
std::codecvt< _InternT,
_base< _InternT, _ExternT,
_ExternT, encoding_state >
encoding_state >
std::__codecvt_abstract
std::codecvt< char16
_base< char16_t, char,
_t, char, mbstate_t >
mbstate_t >
std::__codecvt_abstract
std::codecvt< char32
_base< char32_t, char,
_t, char, mbstate_t >
mbstate_t >
std::__codecvt_abstract
std::codecvt< wchar
_base< wchar_t, char,
_t, char, mbstate_t >
mbstate_t >
std::__ctype_abstract
std::ctype< wchar_t >
_base< wchar_t >
std::time_get< _CharT,
istreambuf_iterator
< _CharT > >
std::time_put< _CharT,
ostreambuf_iterator
< _CharT > >
std::__codecvt_abstract std::codecvt_byname
std::codecvt< _InternT,
_base< _InternT, _ExternT, < _InternT, _ExternT,
_ExternT, _StateT >
_StateT > _StateT >
std::__ctype_abstract std::ctype_byname<
std::locale::facet std::ctype< _CharT >
_base< _CharT > _CharT >
std::__cxx11::collate
< _CharT >
std::ctype_byname<
std::ctype< char > char >
std::money_get< _CharT,
_InIter >
std::money_put< _CharT,
_OutIter >
std::moneypunct< _CharT,
_Intl >
std::num_get< _CharT,
_InIter >
std::num_put< _CharT,
_OutIter >
std::numpunct_byname
std::numpunct< _CharT > < _CharT >
Generated by Doxygen
2000
• virtual ∼facet ()
• facet & operator= (const facet &)=delete
Friends
• class locale
• class locale::_Impl
facet()
std::locale::facet::facet (
size_t __refs = 0) throw ( ) [inline], [explicit], [protected]
Facet constructor.
This is the constructor provided by the standard. If refs is 0, the facet is destroyed when the last referencing locale is
destroyed. Otherwise the facet will never be destroyed.
Parameters
∼facet()
virtual std::locale::facet::∼facet () [protected], [virtual]
Facet destructor.
The documentation for this class was generated from the following file:
• locale_classes.h
Generated by Doxygen
5.441 std::experimental::filesystem::v1::filesystem_error Class Reference 2001
Friends
C++17
The documentation for this class was generated from the following file:
• bits/fs_dir.h
std::exception
std::runtime_error
std::system_error
std::experimental::
filesystem::v1::filesystem_error
Generated by Doxygen
2002
• filesystem_error (const string &__what_arg, const path &__p1, const path &__p2, error_code __ec)
• filesystem_error (const string &__what_arg, const path &__p1, error_code __ec)
• filesystem_error (const string &__what_arg, error_code __ec)
• const error_code & code () const noexcept
• const path & path1 () const noexcept
• const path & path2 () const noexcept
• const char ∗ what () const noexcept
what()
• experimental/bits/fs_path.h
Generated by Doxygen
5.442 std::filesystem::filesystem_error Class Reference 2003
std::exception
std::runtime_error
std::system_error
std::filesystem::filesystem
_error
Since
C++17
what()
Generated by Doxygen
2004
References std::make_error_code().
The documentation for this class was generated from the following file:
• bits/fs_path.h
__gnu_parallel::constant
_size_blocks_tag
__gnu_parallel::equal
__gnu_parallel::find_tag
_split_tag
__gnu_parallel::growing
_blocks_tag
• tags.h
Classes
• struct param_type
Public Types
Generated by Doxygen
5.444 std::fisher_f_distribution< _RealType > Class Template Reference 2005
Friends
Since
C++11
result_type
Generated by Doxygen
2006
max()
min()
operator()()
param() [1/2]
param() [2/2]
Parameters
reset()
operator<<
Generated by Doxygen
5.445 __gnu_cxx::forced_error Struct Reference 2007
Parameters
__os An output stream.
__x A fisher_f_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
operator==
operator>>
Parameters
_←- An input stream.
_is
_←- A fisher_f_distribution random number generator engine.
_x
Returns
The documentation for this class was generated from the following files:
• random.h
• bits/random.tcc
Generated by Doxygen
2008
std::exception
__gnu_cxx::forced_error
what()
• throw_allocator.h
Generated by Doxygen
5.447 std::__debug::forward_list< _Tp, _Alloc > Class Template Reference 2009
std::input_iterator_tag
std::forward_iterator_tag
std::bidirectional
_iterator_tag
std::random_access
_iterator_tag
std::contiguous_iterator_tag
• stl_iterator_base_types.h
Generated by Doxygen
2010
__gnu_debug::_Safe
_container< _SafeContainer, std::__debug::forward
_Alloc, _SafeBase, _IsCxx11Allocator _list< _Tp, _Alloc >
Aware >
Public Types
Generated by Doxygen
5.447 std::__debug::forward_list< _Tp, _Alloc > Class Template Reference 2011
Friends
Generated by Doxygen
2012
• debug/forward_list
std::_Fwd_list_base
< _Tp, _Alloc >
std::forward_list<
_Tp, _Alloc >
Public Types
• forward_list ()=default
• template<typename _InputIterator , typename = std::_RequireInputIter<_InputIterator>>
forward_list (_InputIterator __first, _InputIterator __last, const _Alloc &__al=_Alloc())
• forward_list (const _Alloc &__al) noexcept
• forward_list (const forward_list &__list)
• forward_list (const forward_list &__list, const __type_identity_t< _Alloc > &__al)
• forward_list (forward_list &&)=default
Generated by Doxygen
5.448 std::forward_list< _Tp, _Alloc > Class Template Reference 2013
Generated by Doxygen
2014
• void splice_after (const_iterator __pos, forward_list &&, const_iterator __before, const_iterator __last) noexcept
• void splice_after (const_iterator __pos, forward_list &, const_iterator __before, const_iterator __last) noexcept
A standard container with linear time access to elements, and fixed time insertion/deletion at any point in the sequence.
Since
C++11
Template Parameters
Meets the requirements of a container, a sequence, including the optional sequence requirements
with the exception of at and operator[].
This is a singly linked list. Traversal up the list requires linear time, but adding and removing elements (or nodes) is
done in constant time, regardless of where the change takes place. Unlike std::vector and std::deque, random-access
iterators are not provided, so subscripting ([]) access is not allowed. For algorithms which only need sequential access,
this lack makes no difference.
Also unlike the other standard containers, std::forward_list provides specialized algorithms unique to linked lists, such
as splicing, sorting, and in-place reversal.
forward_list() [1/10]
Generated by Doxygen
5.448 std::forward_list< _Tp, _Alloc > Class Template Reference 2015
forward_list() [2/10]
Parameters
_←- An allocator object.
_al
forward_list() [3/10]
Parameters
__list Input list to copy.
__al An allocator object.
References std::forward_list< _Tp, _Alloc >::begin(), and std::forward_list< _Tp, _Alloc >::end().
forward_list() [4/10]
Parameters
__list Input list to move.
__al An allocator object.
forward_list() [5/10]
Parameters
Generated by Doxygen
2016
This constructor creates the forward_list with __n default constructed elements.
forward_list() [6/10]
Parameters
forward_list() [7/10]
Parameters
Create a forward_list consisting of copies of the elements from [__first,__last). This is linear in N (where N is
distance(__first,__last)).
forward_list() [8/10]
Parameters
References std::forward_list< _Tp, _Alloc >::begin(), and std::forward_list< _Tp, _Alloc >::end().
Generated by Doxygen
5.448 std::forward_list< _Tp, _Alloc > Class Template Reference 2017
forward_list() [9/10]
Parameters
The newly-created forward_list contains the exact contents of the moved instance. The contents of the moved instance
are a valid, but unspecified forward_list.
forward_list() [10/10]
Parameters
Create a forward_list consisting of copies of the elements in the initializer_list __il. This is linear in __il.size().
∼forward_list()
template<typename _Tp , typename _Alloc = allocator<_Tp>>
std::forward_list< _Tp, _Alloc >::∼forward_list () [inline], [noexcept]
The forward_list dtor.
assign() [1/3]
Parameters
This function fills a forward_list with copies of the elements in the range [ __first,__last).
Generated by Doxygen
2018
Note that the assignment completely changes the forward_list and that the number of elements of the resulting forward←-
_list is the same as the number of elements assigned.
References std::forward_list< _Tp, _Alloc >::before_begin(), std::forward_list< _Tp, _Alloc >::begin(), std::forward_list< _Tp, _Alloc >::c
std::forward_list< _Tp, _Alloc >::clear(), std::forward_list< _Tp, _Alloc >::end(), std::forward_list< _Tp, _Alloc >::erase_after(),
and std::forward_list< _Tp, _Alloc >::insert_after().
Referenced by std::forward_list< _Tp, _Alloc >::assign(), std::forward_list< _Tp, _Alloc >::operator=(), and std::forward_list< _Tp, _Alloc
assign() [2/3]
Parameters
This function fills a forward_list with __n copies of the given value. Note that the assignment completely changes the
forward_list, and that the resulting forward_list has __n elements.
References std::forward_list< _Tp, _Alloc >::before_begin(), std::forward_list< _Tp, _Alloc >::begin(), std::forward_list< _Tp, _Alloc >::c
std::forward_list< _Tp, _Alloc >::clear(), std::forward_list< _Tp, _Alloc >::end(), std::forward_list< _Tp, _Alloc >::erase_after(),
and std::forward_list< _Tp, _Alloc >::insert_after().
assign() [3/3]
Parameters
Replace the contents of the forward_list with copies of the elements in the initializer_list __il. This is linear in __←-
il.size().
References std::forward_list< _Tp, _Alloc >::assign().
before_begin() [1/2]
before_begin() [2/2]
Generated by Doxygen
5.448 std::forward_list< _Tp, _Alloc > Class Template Reference 2019
Returns a read/write iterator that points before the first element in the forward_list. Iteration is done in ordinary element
order.
Referenced by std::forward_list< _Tp, _Alloc >::assign(), std::forward_list< _Tp, _Alloc >::assign(), std::forward_list< _Tp, _Alloc >::inse
and std::forward_list< _Tp, _Alloc >::insert_after().
begin() [1/2]
begin() [2/2]
cbefore_begin()
cbegin()
cend()
clear()
Generated by Doxygen
2020
emplace_after()
Parameters
Returns
This function will insert an object of type T constructed with T(std::forward<Args>(args)...) after the
specified location. Due to the nature of a forward_list this operation can be done in constant time, and does not
invalidate iterators and references.
References std::forward().
emplace_front()
Parameters
__args Arguments.
This function will insert an object of type Tp constructed with Tp(std::forward<Args>(args)...) at the
front of the list Due to the nature of a forward_list this operation can be done in constant time, and does not invalidate
iterators and references.
References std::forward_list< _Tp, _Alloc >::cbefore_begin(), std::forward(), and std::forward_list< _Tp, _Alloc >::front().
empty()
end() [1/2]
Generated by Doxygen
5.448 std::forward_list< _Tp, _Alloc > Class Template Reference 2021
end() [2/2]
erase_after() [1/2]
Parameters
Returns
An iterator pointing to the element following the one that was erased, or end() if no such element exists.
This function will erase the element at the given position and thus shorten the forward_list by one.
Due to the nature of a forward_list this operation can be done in constant time, and only invalidates iterators/references to
the element being removed. The user is also cautioned that this function only erases the element, and that if the element
is itself a pointer, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility.
Referenced by std::forward_list< _Tp, _Alloc >::assign(), and std::forward_list< _Tp, _Alloc >::assign().
erase_after() [2/2]
Parameters
Returns
__last
This function will erase the elements in the range (__pos,__last) and shorten the forward_list accordingly.
This operation is linear time in the size of the range and only invalidates iterators/references to the element being
removed.
The user is also cautioned that this function only erases the elements, and that if the elements themselves are pointers,
the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility.
Generated by Doxygen
2022
front() [1/2]
front() [2/2]
get_allocator()
insert_after() [1/4]
Parameters
Returns
This function will insert copies of the data in the range [ __first, __last) into the forward_list after the location
specified by `__pos.
This operation is linear in the number of elements inserted and does not invalidate iterators and references.
References std::forward_list< _Tp, _Alloc >::before_begin(), std::forward_list< _Tp, _Alloc >::empty(), and std::forward_list< _Tp, _Alloc
insert_after() [2/4]
Parameters
Generated by Doxygen
5.448 std::forward_list< _Tp, _Alloc > Class Template Reference 2023
Returns
This function will insert a copy of the given value after the specified location. Due to the nature of a forward_list this
operation can be done in constant time, and does not invalidate iterators and references.
Referenced by std::forward_list< _Tp, _Alloc >::assign(), std::forward_list< _Tp, _Alloc >::assign(), and std::forward_list< _Tp, _Alloc >:
insert_after() [3/4]
Parameters
Returns
This function will insert a specified number of copies of the given data after the location specified by pos.
This operation is linear in the number of elements inserted and does not invalidate iterators and references.
References std::forward_list< _Tp, _Alloc >::before_begin(), and std::forward_list< _Tp, _Alloc >::end().
insert_after() [4/4]
Parameters
Returns
This function will insert copies of the data in the initializer_list __il into the forward_list before the location specified by
__pos.
This operation is linear in the number of elements inserted and does not invalidate iterators and references.
References std::forward_list< _Tp, _Alloc >::insert_after().
Generated by Doxygen
2024
max_size()
merge() [1/2]
Parameters
Assumes that both __list and this list are sorted according to operator<(). Merges elements of __list into this
list in sorted order, leaving __list empty when complete. Elements in this list precede elements in __list that are
equal.
References std::forward_list< _Tp, _Alloc >::merge(), and std::move().
Referenced by std::forward_list< _Tp, _Alloc >::merge().
merge() [2/2]
Parameters
Assumes that both __list and this list are sorted according to comp. Merges elements of __list into this list
in sorted order, leaving __list empty when complete. Elements in this list precede elements in __list that are
equivalent according to comp().
References std::__addressof(), and std::move().
operator=() [1/3]
Parameters
Generated by Doxygen
5.448 std::forward_list< _Tp, _Alloc > Class Template Reference 2025
operator=() [2/3]
Parameters
The contents of __list are moved into this forward_list (without copying, if the allocators permit it).
Afterwards __list is a valid, but unspecified forward_list
Whether the allocator is moved depends on the allocator traits.
References std::forward_list< _Tp, _Alloc >::assign(), std::forward_list< _Tp, _Alloc >::clear(), and std::move().
operator=() [3/3]
Parameters
Replace the contents of the forward_list with copies of the elements in the initializer_list __il. This is linear in __←-
il.size().
References std::forward_list< _Tp, _Alloc >::assign().
pop_front()
push_front()
Generated by Doxygen
2026
Parameters
__val Data to be added.
This is a typical stack operation. The function creates an element at the front of the forward_list and assigns the given
data to it. Due to the nature of a forward_list this operation can be done in constant time, and does not invalidate iterators
and references.
References std::forward_list< _Tp, _Alloc >::cbefore_begin().
remove()
Parameters
__val The value to remove.
Removes every element in the list equal to __val. Remaining elements stay in list order. Note that this function only
erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way.
Managing the pointer is the user's responsibility.
References std::forward_list< _Tp, _Alloc >::cbefore_begin(), and std::forward_list< _Tp, _Alloc >::splice_after().
remove_if()
Parameters
Removes every element in the list for which the predicate returns true. Remaining elements stay in list order. Note that
this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not
touched in any way. Managing the pointer is the user's responsibility.
resize() [1/2]
Parameters
This function will resize the forward_list to the specified number of elements. If the number is smaller than the forward←-
_list's current number of elements the forward_list is truncated, otherwise the forward_list is extended and the new
elements are default constructed.
References std::end().
Generated by Doxygen
5.448 std::forward_list< _Tp, _Alloc > Class Template Reference 2027
resize() [2/2]
Parameters
This function will resize the forward_list to the specified number of elements. If the number is smaller than the forward←-
_list's current number of elements the forward_list is truncated, otherwise the forward_list is extended and new elements
are populated with given data.
References std::end().
reverse()
sort() [1/2]
sort() [2/2]
splice_after() [1/4]
Generated by Doxygen
2028
Parameters
Removes elements in the range (__before,__last) and inserts them after __pos in constant time.
Undefined if __pos is in (__before,__last).
splice_after() [2/4]
Parameters
The elements of list are inserted in constant time after the element referenced by pos. list becomes an empty
list.
Requires this != &x.
Referenced by std::forward_list< _Tp, _Alloc >::remove().
splice_after() [3/4]
Parameters
Removes the element in list __list referenced by __i and inserts it into the current list after __pos.
splice_after() [4/4]
Generated by Doxygen
5.448 std::forward_list< _Tp, _Alloc > Class Template Reference 2029
Generated by Doxygen
2030
Parameters
Removes elements in the range (__before,__last) and inserts them after __pos in constant time.
Undefined if __pos is in (__before,__last).
swap()
Parameters
This exchanges the elements between two lists in constant time. Note that the global std::swap() function is
overloaded such that std::swap(l1, l2) will feed to this function.
Whether the allocators are swapped depends on the allocator traits.
unique() [1/2]
unique() [2/2]
Parameters
For each consecutive set of elements [first,last) that satisfy predicate(first,i) where i is an iterator in [first,last), remove all
but the first one. Remaining elements stay in list order. Note that this function only erases the elements, and that if the
elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's
responsibility.
The documentation for this class was generated from the following files:
Generated by Doxygen
5.449 std::fpos< _StateT > Class Template Reference 2031
• forward_list.h
• forward_list.tcc
template<typename _StateT>
class std::fpos< _StateT >
Parameters
fpos()
operator streamoff()
Generated by Doxygen
2032
operator+()
operator+=()
operator-() [1/2]
operator-() [2/2]
operator-=()
state() [1/2]
state() [2/2]
• postypes.h
Generated by Doxygen
5.450 __gnu_cxx::free_list Class Reference 2033
__gnu_cxx::free_list
__gnu_cxx::bitmap_allocator
< _Tp >
Public Types
• void _M_clear ()
• std::size_t ∗ _M_get (std::size_t __sz)
• void _M_insert (std::size_t ∗__addr) throw ()
The free list class for managing chunks of memory to be given to and returned by the bitmap_allocator.
_M_clear()
void __gnu_cxx::free_list::_M_clear ()
This function just clears the internal Free List, and gives back all the memory to the OS.
_M_get()
std::size_t ∗ __gnu_cxx::free_list::_M_get (
std::size_t __sz)
This function gets a block of memory of the specified size from the free list.
Parameters
Returns
A pointer to the new memory block of size at least equal to that requested.
Generated by Doxygen
2034
_M_insert()
void __gnu_cxx::free_list::_M_insert (
std::size_t ∗ __addr) throw ( ) [inline]
This function returns the block of memory to the internal free list.
Parameters
__addr The pointer to the memory block that was given by a call to the _M_get function.
Public Attributes
• errc ec
• const char ∗ ptr
Friends
std::iterator< output
_iterator_tag, void,
void, void, void >
std::front_insert_iterator
< _Container >
Generated by Doxygen
5.452 std::front_insert_iterator< _Container > Class Template Reference 2035
Public Types
Protected Attributes
• _Container ∗ container
template<typename _Container>
class std::front_insert_iterator< _Container >
container_type
iterator_category
pointer
reference
Generated by Doxygen
2036
value_type
front_insert_iterator()
operator∗()
operator++() [1/2]
operator++() [2/2]
operator=()
Parameters
Returns
This kind of iterator doesn't really have a position in the container (you can think of the position as being permanently at
the front, if you like). Assigning a value to the iterator will always prepend the value to the front of the container.
The documentation for this class was generated from the following file:
• bits/stl_iterator.h
Generated by Doxygen
5.453 std::function< _Res(_ArgTypes...)> Class Template Reference 2037
std::_Function_base
std::function< _Res
(_ArgTypes...)>
Public Types
• function () noexcept
• template<typename _Functor , typename _Constraints = _Requires<_Callable<_Functor>>>
function (_Functor &&__f) noexcept(_Handler< _Functor >::template _S_nothrow_init< _Functor >())
• function (const function &__x)
• function (function &&__x) noexcept
• function (nullptr_t) noexcept
• operator bool () const noexcept
• _Res operator() (_ArgTypes... __args) const
• template<typename _Functor >
_Requires< _Callable< _Functor >, function & > operator= (_Functor &&__f) noexcept(_Handler< _Functor
>::template _S_nothrow_init< _Functor >())
• function & operator= (const function &__x)
• function & operator= (function &&__x) noexcept
• function & operator= (nullptr_t) noexcept
• template<typename _Functor >
function & operator= (reference_wrapper< _Functor > __f) noexcept
• void swap (function &__x) noexcept
• const type_info & target_type () const noexcept
Generated by Doxygen
2038
C++11
function() [1/5]
!(bool)∗this
function() [2/5]
!(bool)∗this
function() [3/5]
Parameters
Postcondition
bool(∗this) == bool(__x)
The newly-created function contains a copy of the target of __x (if it has one).
function() [4/5]
Generated by Doxygen
5.453 std::function< _Res(_ArgTypes...)> Class Template Reference 2039
Parameters
The newly-created function contains the target of __x (if it has one).
function() [5/5]
Parameters
←- A function object that is callable with parameters of type ArgTypes... and returns a value convertible to Res.
_←-
←-
_←-
f
The newly-created function object will target a copy of __f. If __f is reference_wrapper<F>, then this function
object will contain a reference to the function object __f.get(). If __f is a null function pointer, null pointer-to-
member, or empty std::function, the newly-created object will be empty.
If __f is a non-null function pointer or an object of type reference_wrapper<F>, this function will not throw.
References std::forward().
operator bool()
Returns
true when this function object contains a target, or false when it is empty.
operator()()
Returns
Generated by Doxygen
2040
Exceptions
The function call operator invokes the target function object stored by this.
References std::forward().
operator=() [1/5]
Parameters
←- A function object that is callable with parameters of type _ArgTypes... and returns a value convertible to
_←- _Res.
←-
_←-
f
Returns
∗this
Since
C++11
This function object wrapper will target a copy of __f. If __f is reference_wrapper<F>, then this function object
will contain a reference to the function object __f.get(). If __f is a null function pointer or null pointer-to-member,
this object will be empty.
If __f is a non-null function pointer or an object of type reference_wrapper<F>, this function will not throw.
References std::forward().
operator=() [2/5]
Parameters
Postcondition
(bool)∗this == (bool)x
Returns
∗this
The target of __x is copied to ∗this. If __x has no target, then ∗this will be empty.
If __x targets a function pointer or a reference to a function object, then this operation will not throw an exception.
Generated by Doxygen
5.453 std::function< _Res(_ArgTypes...)> Class Template Reference 2041
operator=() [3/5]
Parameters
Returns
∗this
The target of __x is moved to ∗this. If __x has no target, then ∗this will be empty.
If __x targets a function pointer or a reference to a function object, then this operation will not throw an exception.
References std::move().
operator=() [4/5]
!(bool)∗this
Returns
∗this
The target of ∗this is deallocated, leaving it empty.
operator=() [5/5]
swap()
Parameters
Swap the targets of this function object and __f. This function will not throw exceptions.
Generated by Doxygen
2042
target() [1/2]
Returns
target() [2/2]
Returns
target_type()
Generated by Doxygen
5.454 std::future< _Res > Class Template Reference 2043
Returns
• std_function.h
std::__basic_future
< _Res >
Protected Types
Generated by Doxygen
2044
Friends
template<typename _Res>
class std::future< _Res >
future()
_M_get_result()
get()
• future
Generated by Doxygen
5.455 std::future< _Res & > Class Template Reference 2045
std::__basic_future
< _Res & >
Protected Types
Friends
template<typename _Res>
class std::future< _Res & >
Generated by Doxygen
2046
future()
_M_get_result()
get()
• future
std::__basic_future
< void >
Generated by Doxygen
5.457 std::future_error Class Reference 2047
Protected Types
Friends
future()
_M_get_result()
get()
• future
Generated by Doxygen
2048
std::exception
std::logic_error
std::future_error
Friends
Since
C++11
what()
• future
Generated by Doxygen
5.458 std::gamma_distribution< _RealType > Class Template Reference 2049
Classes
• struct param_type
Public Types
• gamma_distribution ()
• gamma_distribution (_RealType __alpha_val, _RealType __beta_val=_RealType(1))
• gamma_distribution (const param_type &__p)
• template<typename _ForwardIterator , typename _UniformRandomNumberGenerator >
void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng)
• template<typename _ForwardIterator , typename _UniformRandomNumberGenerator >
void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng, const
param_type &__p)
• template<typename _UniformRandomNumberGenerator >
void __generate (result_type ∗__f, result_type ∗__t, _UniformRandomNumberGenerator &__urng, const
param_type &__p)
• _RealType alpha () const
• _RealType beta () const
• result_type max () const
• result_type min () const
• template<typename _UniformRandomNumberGenerator >
result_type operator() (_UniformRandomNumberGenerator &__urng)
• template<typename _UniformRandomNumberGenerator >
result_type operator() (_UniformRandomNumberGenerator &__urng, const param_type &__p)
• template<typename _UniformRandomNumberGenerator >
gamma_distribution< _RealType >::result_type operator() (_UniformRandomNumberGenerator &__urng, const
param_type &__param)
• param_type param () const
• void param (const param_type &__param)
• void reset ()
Friends
Generated by Doxygen
2050
Since
C++11
result_type
gamma_distribution() [1/2]
gamma_distribution() [2/2]
alpha()
beta()
max()
min()
Generated by Doxygen
5.458 std::gamma_distribution< _RealType > Class Template Reference 2051
operator()() [1/2]
operator()() [2/2]
param() [1/2]
param() [2/2]
Parameters
reset()
operator<<
Generated by Doxygen
2052
Parameters
__os An output stream.
__x A gamma_distribution random number distribution.
Returns
The output stream with the state of __x inserted or in an error state.
operator==
operator>>
Parameters
_←- An input stream.
_is
_←- A gamma_distribution random number generator engine.
_x
Returns
The documentation for this class was generated from the following files:
• random.h
• bits/random.tcc
Classes
• struct param_type
Generated by Doxygen
5.459 std::geometric_distribution< _IntType > Class Template Reference 2053
Public Types
Friends
C++11
result_type
Generated by Doxygen
2054
max()
min()
operator()()
p()
param() [1/2]
param() [2/2]
Parameters
reset()
Generated by Doxygen
5.460 __gnu_pbds::gp_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn,
Resize_Policy, Store_Hash, _Alloc > Class Template Reference 2055
operator==
• random.h
• bits/random.tcc
__gnu_pbds::basic_hash __gnu_pbds::gp_hash
_table< Key, Mapped, Hash _table< Key, Mapped,
_Fn, Eq_Fn, Resize_Policy, Hash_Fn, Eq_Fn, Comb
Store_Hash, Tag, Policy_Tl, _Probe_Fn, Probe_Fn, Resize
_Alloc > _Policy, Store_Hash, _Alloc >
Public Types
• gp_hash_table ()
• gp_hash_table (const gp_hash_table &other)
• gp_hash_table (const hash_fn &h)
• gp_hash_table (const hash_fn &h, const eq_fn &e)
• gp_hash_table (const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp)
• gp_hash_table (const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp, const probe_fn &p)
• gp_hash_table (const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp, const probe_fn &p, const resize←-
_policy &rp)
• template<typename It >
gp_hash_table (It first, It last)
Generated by Doxygen
2056
• template<typename It >
gp_hash_table (It first, It last, const hash_fn &h)
• template<typename It >
gp_hash_table (It first, It last, const hash_fn &h, const eq_fn &e)
• template<typename It >
gp_hash_table (It first, It last, const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp)
• template<typename It >
gp_hash_table (It first, It last, const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp, const probe_fn &p)
• template<typename It >
gp_hash_table (It first, It last, const hash_fn &h, const eq_fn &e, const comb_probe_fn &cp, const probe_fn &p,
const resize_policy &rp)
• gp_hash_table & operator= (const gp_hash_table &other)
• void swap (gp_hash_table &other)
Template Parameters
gp_hash_table() [1/12]
Generated by Doxygen
5.460 __gnu_pbds::gp_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn,
Resize_Policy, Store_Hash, _Alloc > Class Template Reference 2057
gp_hash_table() [2/12]
gp_hash_table() [3/12]
gp_hash_table() [4/12]
gp_hash_table() [5/12]
Generated by Doxygen
2058
gp_hash_table() [6/12]
gp_hash_table() [7/12]
gp_hash_table() [8/12]
Generated by Doxygen
5.460 __gnu_pbds::gp_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn,
Resize_Policy, Store_Hash, _Alloc > Class Template Reference 2059
Constructor taking __iterators to a range of value_types and some policy objects. The value_types between first_it and
last_it will be inserted into the container object. r_hash_fn will be copied by the hash_fn object of the container object.
gp_hash_table() [9/12]
gp_hash_table() [10/12]
gp_hash_table() [11/12]
Generated by Doxygen
2060
gp_hash_table() [12/12]
• assoc_container.hpp
Generated by Doxygen
5.462 __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Probe_Fn, Probe_Fn, Resize_Policy > Class Template Reference 2061
__gnu_pbds::container_tag
__gnu_pbds::associative_tag
__gnu_pbds::basic_hash_tag
__gnu_pbds::gp_hash_tag
General-probing hash.
The documentation for this struct was generated from the following file:
• tag_and_trait.hpp
__gnu_pbds::detail
::hash_eq_fn< Key, Eq
_Fn, _Alloc, Store_Hash >
__gnu_pbds::detail
__gnu_pbds::detail
::gp_ht_map< Key, Mapped,
::ranged_probe_fn< Key,
Hash_Fn, Eq_Fn, _Alloc,
Hash_Fn, _Alloc, Comb
Store_Hash, Comb_Probe
_Probe_Fn, Probe_Fn, Store_Hash >
_Fn, Probe_Fn, Resize_Policy >
__gnu_pbds::detail __gnu_pbds::detail
::maybe_null_type< Key, ::types_traits< Key,
Mapped, _Alloc, Store Mapped, _Alloc, Store
_Hash > _Hash >
Generated by Doxygen
2062
Public Types
• enum { store_hash }
• typedef _Alloc allocator_type
• typedef Comb_Probe_Fn comb_probe_fn
• typedef const_iterator_ const_iterator
• typedef traits_base::const_pointer const_pointer
• typedef traits_base::const_reference const_reference
• typedef _Alloc::difference_type difference_type
• typedef Eq_Fn eq_fn
• typedef Hash_Fn hash_fn
• typedef iterator_ iterator
• typedef traits_base::key_const_pointer key_const_pointer
• typedef traits_base::key_const_reference key_const_reference
• typedef traits_base::key_pointer key_pointer
• typedef traits_base::key_reference key_reference
• typedef traits_base::key_type key_type
• typedef traits_base::mapped_const_pointer mapped_const_pointer
• typedef traits_base::mapped_const_reference mapped_const_reference
• typedef traits_base::mapped_pointer mapped_pointer
• typedef traits_base::mapped_reference mapped_reference
• typedef traits_base::mapped_type mapped_type
• typedef __nothrowcopy::indicator no_throw_indicator
• typedef point_const_iterator_ point_const_iterator
• typedef point_iterator_ point_iterator
• typedef traits_base::pointer pointer
• typedef Probe_Fn probe_fn
• typedef traits_base::reference reference
• typedef Resize_Policy resize_policy
• typedef _Alloc::size_type size_type
• typedef integral_constant< int, Store_Hash > store_extra
• typedef stored_data< value_type, size_type, Store_Hash > stored_data_type
• typedef traits_base::value_type value_type
• gp_ht_map (const gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Probe_Fn, Probe←-
_Fn, Resize_Policy > &)
• gp_ht_map (const Hash_Fn &)
• gp_ht_map (const Hash_Fn &, const Eq_Fn &)
• gp_ht_map (const Hash_Fn &, const Eq_Fn &, const Comb_Probe_Fn &)
• gp_ht_map (const Hash_Fn &, const Eq_Fn &, const Comb_Probe_Fn &, const Probe_Fn &)
• gp_ht_map (const Hash_Fn &, const Eq_Fn &, const Comb_Probe_Fn &, const Probe_Fn &, const Resize_←-
Policy &)
• iterator begin ()
• const_iterator begin () const
• void clear ()
• template<typename It >
void copy_from_range (It, It)
• bool empty () const
• iterator end ()
• const_iterator end () const
Generated by Doxygen
5.462 __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Probe_Fn, Probe_Fn, Resize_Policy > Class Template Reference 2063
Public Attributes
• no_throw_indicator m_no_throw_copies_indicator
• store_extra m_store_extra_indicator
Friends
• class const_iterator_
• class iterator_
template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn, typename _Alloc, bool
Store_Hash, typename Comb_Probe_Fn, typename Probe_Fn, typename Resize_Policy>
class __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Probe_Fn,
Probe_Fn, Resize_Policy >
Template Parameters
Generated by Doxygen
2064
Template Parameters
Comb_Probe_Fn Combining probe functor. If Hash_Fn is not null_type, then this is the ranged-probe functor;
otherwise, this is the range-hashing functor. XXX See Design::Hash-Based Containers::Hash
Policies. Default direct_mask_range_hashing.
Probe_Fn Probe functor. Defaults to linear_probe_fn, also quadratic_probe_fn.
Resize_Policy Resizes hash. Defaults to hash_standard_resize_policy, using hash_exponential_size_policy
and hash_load_check_resize_trigger.
anonymous enum
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
anonymous enum
Value stores hash, true or false.
empty()
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
bool __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Probe_←-
Fn, Probe_Fn, Resize_Policy >::empty () const [inline], [nodiscard]
True if size() == 0.
get_comb_probe_fn() [1/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
Comb_Probe_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Probe_Fn, Probe_Fn, Resize_Policy >::get_comb_probe_fn ()
Return current comb_probe_fn.
get_comb_probe_fn() [2/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
const Comb_Probe_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_←-
Hash, Comb_Probe_Fn, Probe_Fn, Resize_Policy >::get_comb_probe_fn () const
Return current const comb_probe_fn.
get_eq_fn() [1/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
Eq_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_←-
Probe_Fn, Probe_Fn, Resize_Policy >::get_eq_fn ()
Return current eq_fn.
Generated by Doxygen
5.462 __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Probe_Fn, Probe_Fn, Resize_Policy > Class Template Reference 2065
get_eq_fn() [2/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
const Eq_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Probe_Fn, Probe_Fn, Resize_Policy >::get_eq_fn () const
Return current const eq_fn.
get_hash_fn() [1/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
Hash_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_←-
Probe_Fn, Probe_Fn, Resize_Policy >::get_hash_fn ()
Return current hash_fn.
get_hash_fn() [2/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
const Hash_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Probe_Fn, Probe_Fn, Resize_Policy >::get_hash_fn () const
Return current const hash_fn.
get_probe_fn() [1/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
Probe_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_←-
Probe_Fn, Probe_Fn, Resize_Policy >::get_probe_fn ()
Return current probe_fn.
get_probe_fn() [2/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
const Probe_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Probe_Fn, Probe_Fn, Resize_Policy >::get_probe_fn () const
Return current const probe_fn.
get_resize_policy() [1/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
Resize_Policy & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash,
Comb_Probe_Fn, Probe_Fn, Resize_Policy >::get_resize_policy ()
Return current resize_policy.
get_resize_policy() [2/2]
template<typename Key , typename Mapped , typename Hash_Fn , typename Eq_Fn , typename _Alloc ,
bool Store_Hash, typename Comb_Probe_Fn , typename Probe_Fn , typename Resize_Policy >
const Resize_Policy & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_←-
Hash, Comb_Probe_Fn, Probe_Fn, Resize_Policy >::get_resize_policy () const
Return current const resize_policy.
The documentation for this class was generated from the following file:
Generated by Doxygen
2066
• gp_ht_map_.hpp
Public Types
• using duration
• using period
• using rep
• using time_point
Since
C++20
The documentation for this class was generated from the following file:
• chrono
Generated by Doxygen
5.464 std::greater< _Tp > Struct Template Reference 2067
std::binary_function
< _Tp, _Tp, bool >
Public Types
• constexpr bool operator() (const _Tp &__x, const _Tp &__y) const
template<typename _Tp>
struct std::greater< _Tp >
first_argument_type
result_type
second_argument_type
• stl_function.h
Generated by Doxygen
2068
Public Types
• using is_transparent
• ranges_cmp.h
Public Types
• stl_function.h
Generated by Doxygen
5.467 std::greater_equal< _Tp > Struct Template Reference 2069
std::binary_function
< _Tp, _Tp, bool >
std::greater_equal
< _Tp >
Public Types
• constexpr bool operator() (const _Tp &__x, const _Tp &__y) const
template<typename _Tp>
struct std::greater_equal< _Tp >
first_argument_type
result_type
second_argument_type
• stl_function.h
Generated by Doxygen
2070
Public Types
• using is_transparent
• ranges_cmp.h
Public Types
• stl_function.h
Generated by Doxygen
5.471 __gnu_parallel::growing_blocks_tag Struct Reference 2071
Group condition.
The documentation for this struct was generated from the following file:
• throw_allocator.h
__gnu_parallel::find_tag
__gnu_parallel::growing
_blocks_tag
See also
_GLIBCXX_FIND_GROWING_BLOCKS
The documentation for this struct was generated from the following file:
• tags.h
• gslice ()
• gslice (const gslice &)
• gslice (size_t __o, const valarray< size_t > &__l, const valarray< size_t > &__s)
• ∼gslice ()
• gslice & operator= (const gslice &)
• valarray< size_t > size () const
• size_t start () const
• valarray< size_t > stride () const
Generated by Doxygen
2072
Friends
• gslice.h
Public Types
Generated by Doxygen
5.473 std::gslice_array< _Tp > Class Template Reference 2073
Friends
template<typename _Tp>
class std::gslice_array< _Tp >
Parameters
Tp Element type.
gslice_array()
operator%=()
Generated by Doxygen
2074
operator&=()
operator∗=()
operator+=()
operator-=()
operator/=()
operator<<=()
operator=()
operator>>=()
Generated by Doxygen
5.474 std::has_virtual_destructor< _Tp > Struct Template Reference 2075
operator∧ =()
operator"|=()
• valarray
• gslice_array.h
template<typename _Tp>
struct std::has_virtual_destructor< _Tp >
has_virtual_destructor
The documentation for this struct was generated from the following file:
• type_traits
template<typename _Tp>
struct std::hash< _Tp >
• string_view
• typeindex
• functional_hash.h
• experimental/string_view
Generated by Doxygen
2076
template<size_t _Nb>
struct std::hash< __debug::bitset< _Nb > >
• debug/bitset
5.477 std::hash< __debug::vector< bool, _Alloc > > Struct Template Reference
#include <vector>
• size_t operator() (const __debug::vector< bool, _Alloc > &__b) const noexcept
template<typename _Alloc>
struct std::hash< __debug::vector< bool, _Alloc > >
• debug/vector
• vstring.h
• vstring.h
Generated by Doxygen
5.480 std::hash< __gnu_cxx::__vstring > Struct Reference 2077
std::unary_function
< __gnu_cxx::throw_value
_limit, size_t >
std::hash< __gnu_cxx
::throw_value_limit >
Public Types
Generated by Doxygen
2078
argument_type
result_type
• throw_allocator.h
std::unary_function
< __gnu_cxx::throw_value
_random, size_t >
std::hash< __gnu_cxx
::throw_value_random >
Public Types
Generated by Doxygen
5.484 std::hash< __gnu_debug::basic_string< _CharT > > Struct Template Reference 2079
argument_type
result_type
• throw_allocator.h
std::hash< std::basic
_string< _CharT > >
std::hash< __gnu_debug
::basic_string< _CharT > >
template<typename _CharT>
struct std::hash< __gnu_debug::basic_string< _CharT > >
• debug/string
5.485 std::hash< __shared_ptr< _Tp, _Lp > > Struct Template Reference
#include <shared_ptr_base.h>
Generated by Doxygen
2080
• size_t operator() (const __shared_ptr< _Tp, _Lp > &__s) const noexcept
• shared_ptr_base.h
template<typename _Tp>
struct std::hash< _Tp ∗ >
• functional_hash.h
5.487 std::hash< basic_string< char, char_traits< char >, _Alloc > > Struct Template
Reference
#include <basic_string.h>
template<typename _Alloc>
struct std::hash< basic_string< char, char_traits< char >, _Alloc > >
• basic_string.h
5.488 std::hash< basic_string< char16_t, char_traits< char16_t >, _Alloc > > Struct
Template Reference
#include <basic_string.h>
Generated by Doxygen
5.489 std::hash< basic_string< char32_t, char_traits< char32_t >, _Alloc > > Struct Template Reference
2081
template<typename _Alloc>
struct std::hash< basic_string< char16_t, char_traits< char16_t >, _Alloc > >
• basic_string.h
5.489 std::hash< basic_string< char32_t, char_traits< char32_t >, _Alloc > > Struct
Template Reference
#include <basic_string.h>
template<typename _Alloc>
struct std::hash< basic_string< char32_t, char_traits< char32_t >, _Alloc > >
• basic_string.h
5.490 std::hash< basic_string< wchar_t, char_traits< wchar_t >, _Alloc > > Struct
Template Reference
#include <basic_string.h>
template<typename _Alloc>
struct std::hash< basic_string< wchar_t, char_traits< wchar_t >, _Alloc > >
• basic_string.h
Generated by Doxygen
2082
• functional_hash.h
• functional_hash.h
• functional_hash.h
• functional_hash.h
Generated by Doxygen
5.495 std::hash< double > Struct Reference 2083
• functional_hash.h
• system_error
• system_error
Public Types
• using argument_type
• using result_type
• size_t operator() (const experimental::optional< _Tp > &__t) const noexcept(noexcept(hash< _Tp > {}(∗__t)))
Generated by Doxygen
2084
template<typename _Tp>
struct std::hash< experimental::optional< _Tp > >
• experimental/optional
template<typename _Tp>
struct std::hash< experimental::shared_ptr< _Tp > >
• experimental/bits/shared_ptr.h
• functional_hash.h
• functional_hash.h
Generated by Doxygen
5.502 std::hash< long > Struct Reference 2085
• functional_hash.h
• functional_hash.h
• functional_hash.h
Generated by Doxygen
2086
template<typename _Tp>
struct std::hash< shared_ptr< _Tp > >
• bits/shared_ptr.h
• functional_hash.h
• functional_hash.h
• std_thread.h
Generated by Doxygen
5.510 std::hash< unique_ptr< _Tp, _Dp > > Struct Template Reference 2087
Public Types
5.510 std::hash< unique_ptr< _Tp, _Dp > > Struct Template Reference
#include <unique_ptr.h>
Generated by Doxygen
2088
Generated by Doxygen
5.517 std::hash<::bitset< _Nb > > Struct Template Reference 2089
template<size_t _Nb>
struct std::hash<::bitset< _Nb > >
• bitset
• size_t operator() (const ::vector< bool, _Alloc > &) const noexcept
template<typename _Alloc>
struct std::hash<::vector< bool, _Alloc > >
• stl_bvector.h
• vector.tcc
Generated by Doxygen
2090
__gnu_pbds::detail
::cc_ht_map< Key, Mapped,
Hash_Fn, Eq_Fn, _Alloc,
Store_Hash, Comb_Hash_Fn,
Resize_Policy >
__gnu_pbds::detail
::hash_eq_fn< Key, Eq
_Fn, _Alloc, Store_Hash >
__gnu_pbds::detail
::gp_ht_map< Key, Mapped,
Hash_Fn, Eq_Fn, _Alloc,
Store_Hash, Comb_Probe
_Fn, Probe_Fn, Resize_Policy >
Primary template.
The documentation for this struct was generated from the following file:
• hash_eq_fn.hpp
Public Types
Generated by Doxygen
5.521 __gnu_pbds::detail::hash_eq_fn< Key, Eq_Fn, _Alloc, true > Struct Template Reference 2091
• hash_eq_fn.hpp
Public Types
• hash_eq_fn.hpp
__gnu_pbds::hash_standard
__gnu_pbds::hash_exponential _resize_policy< Size_Policy,
_size_policy< Size_Type > Trigger_Policy, External
_Size_Access, Size_Type >
Public Types
Generated by Doxygen
2092
A size policy whose sequence of sizes form an exponential sequence (typically powers of 2.
hash_exponential_size_policy()
• hash_policy.hpp
Public Types
• enum { external_load_access }
• typedef Size_Type size_type
Generated by Doxygen
5.523 __gnu_pbds::hash_load_check_resize_trigger< External_Load_Access, Size_Type > Class Template
Reference 2093
A resize trigger policy based on a load check. It keeps the load factor between some load factors load_min and load←-
_max.
anonymous enum
Enumerator
external_load_access Specifies whether the load factor can be accessed externally. The two options have
different trade-offs in terms of flexibility, genericity, and encapsulation.
hash_load_check_resize_trigger()
Generated by Doxygen
2094
get_loads()
notify_cleared()
notify_inserted()
notify_resized()
set_loads()
• hash_policy.hpp
Primary template.
The documentation for this class was generated from the following file:
• hash_load_check_resize_trigger_size_base.hpp
Generated by Doxygen
5.525 __gnu_pbds::detail::hash_load_check_resize_trigger_size_base< Size_Type, true > Class Template
Reference 2095
Protected Types
template<typename Size_Type>
class __gnu_pbds::detail::hash_load_check_resize_trigger_size_base< Size_Type, true >
Specializations.
The documentation for this class was generated from the following file:
• hash_load_check_resize_trigger_size_base.hpp
5.526 __gnu_cxx::hash_map< _Key, _Tp, _HashFn, _EqualKey, _Alloc > Class Template
Reference
#include <hash_map>
Public Types
Generated by Doxygen
2096
Friends
• template<class _K1 , class _T1 , class _HF , class _EqK , class _Al >
bool operator== (const hash_map< _K1, _T1, _HF, _EqK, _Al > &, const hash_map< _K1, _T1, _HF, _EqK,
_Al > &)
template<class _Key, class _Tp, class _HashFn = hash<_Key>, class _EqualKey = equal_to<_Key>, class
_Alloc = allocator<_Tp>>
class __gnu_cxx::hash_map< _Key, _Tp, _HashFn, _EqualKey, _Alloc >
Generated by Doxygen
5.527 __gnu_cxx::hash_multimap< _Key, _Tp, _HashFn, _EqualKey, _Alloc > Class Template Reference 2097
The documentation for this class was generated from the following file:
• hash_map
Public Types
Generated by Doxygen
2098
Friends
• template<class _K1 , class _T1 , class _HF , class _EqK , class _Al >
bool operator== (const hash_multimap< _K1, _T1, _HF, _EqK, _Al > &, const hash_multimap< _K1, _T1, _HF,
_EqK, _Al > &)
template<class _Key, class _Tp, class _HashFn = hash<_Key>, class _EqualKey = equal_to<_Key>, class
_Alloc = allocator<_Tp>>
class __gnu_cxx::hash_multimap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >
The documentation for this class was generated from the following file:
• hash_map
Public Types
Generated by Doxygen
5.528 __gnu_cxx::hash_multiset< _Value, _HashFcn, _EqualKey, _Alloc > Class Template Reference 2099
Generated by Doxygen
2100
Friends
template<class _Value, class _HashFcn = hash<_Value>, class _EqualKey = equal_to<_Value>, class _Alloc
= allocator<_Value>>
class __gnu_cxx::hash_multiset< _Value, _HashFcn, _EqualKey, _Alloc >
Public Types
size_type
std::size_t __gnu_pbds::hash_prime_size_policy::size_type
Size type.
hash_prime_size_policy()
__gnu_pbds::hash_prime_size_policy::hash_prime_size_policy (
size_type start_size = 8) [inline]
Default constructor, or onstructor taking a start_size The policy will use the sequence of sizes approximately start_size,
start_size∗ 2, start_size∗ 2∧ 2, ...
The documentation for this class was generated from the following file:
Generated by Doxygen
5.530 __gnu_cxx::hash_set< _Value, _HashFcn, _EqualKey, _Alloc > Class Template Reference 2101
• hash_policy.hpp
Public Types
Generated by Doxygen
2102
Friends
template<class _Value, class _HashFcn = hash<_Value>, class _EqualKey = equal_to<_Value>, class _Alloc
= allocator<_Value>>
class __gnu_cxx::hash_set< _Value, _HashFcn, _EqualKey, _Alloc >
• hash_set
__gnu_pbds::hash_exponential
_size_policy< Size_Type >
__gnu_pbds::hash_standard
_resize_policy< Size_Policy,
Trigger_Policy, External
__gnu_pbds::detail __gnu_pbds::hash_load
_Size_Access, Size_Type >
::hash_load_check_resize _check_resize_trigger
_trigger_size_base< std < External_Load_Access,
::size_t, false > Size_Type >
Public Types
• enum { external_load_access }
• enum { external_size_access }
• typedef Size_Policy size_policy
• typedef Size_Type size_type
• typedef Trigger_Policy trigger_policy
Generated by Doxygen
5.531 __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access,
Size_Type > Class Template Reference 2103
• hash_standard_resize_policy ()
• hash_standard_resize_policy (const Size_Policy &r_size_policy)
• hash_standard_resize_policy (const Size_Policy &r_size_policy, const Trigger_Policy &r_trigger_policy)
• size_type get_actual_size () const
• std::pair< float, float > get_loads () const
• Size_Policy & get_size_policy ()
• const Size_Policy & get_size_policy () const
• Trigger_Policy & get_trigger_policy ()
• const Trigger_Policy & get_trigger_policy () const
• void resize (size_type suggested_new_size)
• void set_loads (std::pair< float, float > load_pair)
• void swap (hash_exponential_size_policy< Size_Type > &other)
• void swap (hash_load_check_resize_trigger &other)
• void swap (hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >
&other)
anonymous enum
Generated by Doxygen
2104
Enumerator
external_load_access Specifies whether the load factor can be accessed externally. The two options have
different trade-offs in terms of flexibility, genericity, and encapsulation.
hash_standard_resize_policy() [1/3]
hash_standard_resize_policy() [2/3]
hash_standard_resize_policy() [3/3]
get_actual_size()
get_loads()
Generated by Doxygen
5.531 __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access,
Size_Type > Class Template Reference 2105
get_new_size()
get_size_policy() [1/2]
get_size_policy() [2/2]
get_trigger_policy() [1/2]
get_trigger_policy() [2/2]
resize()
Generated by Doxygen
2106
set_loads()
• hash_policy.hpp
Public Types
• using precision
Friends
• template<typename >
struct __detail::__utc_leap_second
template<typename _Duration>
class std::chrono::hh_mm_ss< _Duration >
C++20
The documentation for this class was generated from the following file:
• chrono
Generated by Doxygen
5.533 std::locale::id Class Reference 2107
• id ()
• size_t _M_id () const throw ()
Friends
Facet ID class.
The ID class provides facets with an index used to identify them. Every facet class must define a public static member
locale::id, or be derived from a facet that provides this member, otherwise the facet cannot be used in a locale. The
locale::id ensures that each class type gets a unique identifier.
id()
std::locale::id::id () [inline]
Constructor.
has_facet
Template Parameters
Parameters
__loc The locale to test.
Returns
Generated by Doxygen
2108
use_facet
Template Parameters
Parameters
__loc The locale to use.
Returns
Exceptions
The documentation for this class was generated from the following file:
• locale_classes.h
• id (native_handle_type __id)
Friends
Related Symbols
Generated by Doxygen
5.535 std::identity Struct Reference 2109
Since
C++11
The documentation for this class was generated from the following files:
• std_thread.h
• thread
Public Types
• using is_transparent
• ranges_cmp.h
• experimental/optional
Public Types
Generated by Doxygen
2110
• independent_bits_engine ()
• independent_bits_engine (_RandomNumberEngine &&__rng)
• template<typename _Sseq , typename = _If_seed_seq<_Sseq>>
independent_bits_engine (_Sseq &__q)
• independent_bits_engine (const _RandomNumberEngine &__rng)
• independent_bits_engine (result_type __s)
• const _RandomNumberEngine & base () const noexcept
• void discard (unsigned long long __z)
• result_type operator() ()
• void seed ()
• template<typename _Sseq >
_If_seed_seq< _Sseq > seed (_Sseq &__q)
• void seed (result_type __s)
Friends
Produces random numbers by combining random numbers from some base engine to produce random numbers with a
specified number of bits __w.
Since
C++11
result_type
independent_bits_engine() [1/5]
Generated by Doxygen
5.537 std::independent_bits_engine< _RandomNumberEngine, __w, _UIntType > Class Template Reference
2111
independent_bits_engine() [2/5]
Parameters
independent_bits_engine() [3/5]
Parameters
independent_bits_engine() [4/5]
Parameters
independent_bits_engine() [5/5]
Parameters
_←- A seed sequence.
_q
Generated by Doxygen
2112
base()
discard()
max()
min()
operator()()
seed() [1/3]
seed() [2/3]
Parameters
Generated by Doxygen
5.537 std::independent_bits_engine< _RandomNumberEngine, __w, _UIntType > Class Template Reference
2113
seed() [3/3]
operator==
Parameters
__lhs A independent_bits_engine random number generator object.
__rhs Another independent_bits_engine random number generator object.
Returns
true if the infinite sequences of generated values would be equal, false otherwise.
operator>>
Parameters
_←- An input stream.
_is
_←- A independent_bits_engine random number generator engine.
_x
Returns
The input stream with the state of __x extracted or in an error state.
The documentation for this class was generated from the following files:
• random.h
• bits/random.tcc
Generated by Doxygen
2114
Public Types
Friends
Generated by Doxygen
5.538 std::indirect_array< _Tp > Class Template Reference 2115
template<class _Tp>
class std::indirect_array< _Tp >
Parameters
Tp Element type.
indirect_array()
operator%=()
operator&=()
operator∗=()
operator+=()
Generated by Doxygen
2116
operator-=()
operator/=()
operator<<=()
operator=()
operator>>=()
operator∧ =()
operator"|=()
• valarray
• indirect_array.h
Generated by Doxygen
5.539 std::initializer_list< _E > Class Template Reference 2117
Public Types
Related Symbols
template<class _E>
class std::initializer_list< _E >
initializer_list
begin()
Parameters
_←- Initializer list.
_ils
end()
Generated by Doxygen
2118
Parameters
_←- Initializer list.
_ils
The documentation for this class was generated from the following file:
• initializer_list
std::input_iterator_tag
std::forward_iterator_tag
std::bidirectional
_iterator_tag
std::random_access
_iterator_tag
std::contiguous_iterator_tag
• stl_iterator_base_types.h
Generated by Doxygen
5.542 std::insert_iterator< _Container > Class Template Reference 2119
std::exception
std::logic_error
__gnu_pbds::container
_error
__gnu_pbds::insert
_error
An entry cannot be inserted into a container object for logical reasons (not, e.g., if memory is unabvailable, in which
case the allocator_type's exception will be thrown).
what()
• exception.hpp
Generated by Doxygen
2120
std::iterator< output
_iterator_tag, void,
void, void, void >
std::insert_iterator
< _Container >
Public Types
Protected Attributes
• _Container ∗ container
• _Iter iter
template<typename _Container>
class std::insert_iterator< _Container >
Generated by Doxygen
5.542 std::insert_iterator< _Container > Class Template Reference 2121
container_type
iterator_category
pointer
reference
value_type
insert_iterator()
operator∗()
operator++() [1/2]
Generated by Doxygen
2122
operator++() [2/2]
operator=()
Parameters
Returns
This kind of iterator maintains its own position in the container. Assigning a value to the iterator will insert the value into
the container at the place before the iterator.
The position is maintained such that subsequent assignments will insert values immediately after one another. For
example,
// vector v contains A and Z
• bits/stl_iterator.h
Public Types
• utility.h
Generated by Doxygen
5.544 std::integral_constant< _Tp, __v > Struct Template Reference 2123
Public Types
• using type
• using value_type
integral_constant
The documentation for this struct was generated from the following file:
• type_traits
std::exception
std::logic_error
std::invalid_argument
Generated by Doxygen
2124
what()
• stdexcept
std::basic_istream
< _CharT, char_traits
< _CharT > >
std::basic_iostream
< _CharT, char_traits
< _CharT > >
std::basic_ostream
std::basic_ios< _CharT,
< _CharT, char_traits
char_traits< _CharT > >
< _CharT > >
std::basic_istream
< char >
std::basic_istream std::basic_iostream
< char, _Traits > < char >
std::basic_ios< char,
std::ios_base
_Traits >
std::basic_ostream
< char, _Traits >
std::basic_ifstream
< _CharT, _Traits >
std::basic_ostream
< char >
std::basic_istringstream
< _CharT, _Traits, _Alloc >
std::basic_ios< _CharT, std::basic_istream std::basic_fstream
_Traits > < _CharT, _Traits > < _CharT, _Traits >
std::basic_iostream
< _CharT, _Traits >
std::basic_ostream std::basic_stringstream
< _CharT, _Traits > < _CharT, _Traits, _Alloc >
std::basic_ofstream
< _CharT, _Traits >
std::basic_ostringstream
< _CharT, _Traits, _Alloc >
Public Types
Generated by Doxygen
5.546 std::ios_base Class Reference 2125
Generated by Doxygen
2126
Protected Types
• enum { _S_local_word_size }
Protected Attributes
• _Callback_list ∗ _M_callbacks
• iostate _M_exception
• fmtflags _M_flags
• locale _M_ios_locale
• _Words _M_local_word [_S_local_word_size]
• streamsize _M_precision
• iostate _M_streambuf_state
• streamsize _M_width
• _Words ∗ _M_word
• int _M_word_size
• _Words _M_word_zero
event_callback
Generated by Doxygen
5.546 std::ios_base Class Reference 2127
Parameters
Event callbacks are user defined functions that get called during several ios_base and basic_ios functions, specifically
imbue(), copyfmt(), and ∼ios().
iostate
_Ios_Iostate std::ios_base::iostate
This is a bitmask type.
_Ios_Iostate is implementation-defined, but it is valid to perform bitwise operations on these values and expect
the Right Thing to happen. Defined objects of type iostate are:
• badbit
• eofbit
• failbit
• goodbit
openmode
_Ios_Openmode std::ios_base::openmode
This is a bitmask type.
_Ios_Openmode is implementation-defined, but it is valid to perform bitwise operations on these values and expect
the Right Thing to happen. Defined objects of type openmode are:
• app
• ate
• binary
• in
• out
• trunc
seekdir
_Ios_Seekdir std::ios_base::seekdir
This is an enumerated type.
_Ios_Seekdir is implementation-defined. Defined values of type seekdir are:
• beg
Generated by Doxygen
2128
event
enum std::ios_base::event
The set of events that may be passed to an event callback.
erase_event is used during ∼ios() and copyfmt(). imbue_event is used during imbue(). copyfmt_event is used during
copyfmt().
∼ios_base()
virtual std::ios_base::∼ios_base () [virtual]
Invokes each callback with erase_event. Destroys local storage.
Note that the ios_base object for the standard streams never gets destroyed. As a result, any callbacks registered with
the standard streams will not get invoked with erase_event (unless copyfmt is used).
_M_getloc()
flags() [1/2]
Returns
flags() [2/2]
fmtflags std::ios_base::flags (
fmtflags __fmtfl) [inline]
Setting new format flags all at once.
Generated by Doxygen
5.546 std::ios_base Class Reference 2129
Parameters
Returns
getloc()
If imbue(loc) has previously been called, then this function returns loc. Otherwise, it returns a copy of std←-
::locale(), the global C++ locale.
Referenced by std::basic_ios< _CharT, _Traits >::copyfmt(), std::money_put< _CharT, _OutIter >::do_put(), std::chrono::operator<<(),
std::operator>>(), std::operator>>(), and std::ws().
imbue()
locale std::ios_base::imbue (
const locale & __loc) throw ( )
Setting a new locale.
Parameters
__loc The new locale.
Returns
Sets the new locale for this stream, and then invokes each callback with imbue_event.
Referenced by std::basic_ios< _CharT, _Traits >::imbue().
iword()
Parameters
_←- Index into the array.
_ix
Returns
The iword function provides access to an array of integers that can be used for any purpose. The array grows as required
to hold the supplied index. All integers in the array are initialized to 0.
The implementation reserves several indices. You should use xalloc to obtain an index that is safe to use. Also note that
since the array can grow dynamically, it is not safe to hold onto the reference.
Generated by Doxygen
2130
precision() [1/2]
Returns