785
791
_LIBCPP_ALWAYS_INLINE
795
iter_type __do_get_floating_point
796
(iter_type __b, iter_type __e, ios_base& __iob,
797
ios_base::iostate& __err, _Fp& __v) const;
799
template <class _Signed>
800
iter_type __do_get_signed
801
(iter_type __b, iter_type __e, ios_base& __iob,
802
ios_base::iostate& __err, _Signed& __v) const;
804
template <class _Unsigned>
805
iter_type __do_get_unsigned
806
(iter_type __b, iter_type __e, ios_base& __iob,
807
ios_base::iostate& __err, _Unsigned& __v) const;
788
810
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
789
811
ios_base::iostate& __err, bool& __v) const;
790
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
791
ios_base::iostate& __err, long& __v) const;
792
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
793
ios_base::iostate& __err, long long& __v) const;
794
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
795
ios_base::iostate& __err, unsigned short& __v) const;
796
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
797
ios_base::iostate& __err, unsigned int& __v) const;
798
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
799
ios_base::iostate& __err, unsigned long& __v) const;
800
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
801
ios_base::iostate& __err, unsigned long long& __v) const;
802
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
803
ios_base::iostate& __err, float& __v) const;
804
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
805
ios_base::iostate& __err, double& __v) const;
806
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
807
ios_base::iostate& __err, long double& __v) const;
813
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
814
ios_base::iostate& __err, long& __v) const
815
{ return this->__do_get_signed ( __b, __e, __iob, __err, __v ); }
817
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
818
ios_base::iostate& __err, long long& __v) const
819
{ return this->__do_get_signed ( __b, __e, __iob, __err, __v ); }
821
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
822
ios_base::iostate& __err, unsigned short& __v) const
823
{ return this->__do_get_unsigned ( __b, __e, __iob, __err, __v ); }
825
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
826
ios_base::iostate& __err, unsigned int& __v) const
827
{ return this->__do_get_unsigned ( __b, __e, __iob, __err, __v ); }
829
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
830
ios_base::iostate& __err, unsigned long& __v) const
831
{ return this->__do_get_unsigned ( __b, __e, __iob, __err, __v ); }
833
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
834
ios_base::iostate& __err, unsigned long long& __v) const
835
{ return this->__do_get_unsigned ( __b, __e, __iob, __err, __v ); }
837
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
838
ios_base::iostate& __err, float& __v) const
839
{ return this->__do_get_floating_point ( __b, __e, __iob, __err, __v ); }
841
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
842
ios_base::iostate& __err, double& __v) const
843
{ return this->__do_get_floating_point ( __b, __e, __iob, __err, __v ); }
845
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
846
ios_base::iostate& __err, long double& __v) const
847
{ return this->__do_get_floating_point ( __b, __e, __iob, __err, __v ); }
808
849
virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
809
850
ios_base::iostate& __err, void*& __v) const;
949
template <class _CharT, class _InputIterator>
951
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
953
ios_base::iostate& __err,
957
int __base = this->__get_base(__iob);
959
char_type __atoms[26];
960
char_type __thousands_sep;
961
string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
963
__buf.resize(__buf.capacity());
964
char* __a = &__buf[0];
966
unsigned __g[__num_get_base::__num_get_buf_sz];
967
unsigned* __g_end = __g;
969
for (; __b != __e; ++__b)
971
if (__a_end - __a == __buf.size())
973
size_t __tmp = __buf.size();
974
__buf.resize(2*__buf.size());
975
__buf.resize(__buf.capacity());
977
__a_end = __a + __tmp;
979
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
980
__thousands_sep, __grouping, __g, __g_end,
984
if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
987
__v = __num_get_signed_integral<long>(__a, __a_end, __err, __base);
988
// Digit grouping checked
989
__check_grouping(__grouping, __g, __g_end, __err);
992
__err |= ios_base::eofbit;
996
template <class _CharT, class _InputIterator>
998
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
1000
ios_base::iostate& __err,
1001
long long& __v) const
1004
int __base = this->__get_base(__iob);
1006
char_type __atoms[26];
1007
char_type __thousands_sep;
1008
string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
1010
__buf.resize(__buf.capacity());
1011
char* __a = &__buf[0];
1012
char* __a_end = __a;
1013
unsigned __g[__num_get_base::__num_get_buf_sz];
1014
unsigned* __g_end = __g;
1016
for (; __b != __e; ++__b)
1018
if (__a_end - __a == __buf.size())
1020
size_t __tmp = __buf.size();
1021
__buf.resize(2*__buf.size());
1022
__buf.resize(__buf.capacity());
1024
__a_end = __a + __tmp;
1026
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
1027
__thousands_sep, __grouping, __g, __g_end,
1031
if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
1034
__v = __num_get_signed_integral<long long>(__a, __a_end, __err, __base);
1035
// Digit grouping checked
1036
__check_grouping(__grouping, __g, __g_end, __err);
1039
__err |= ios_base::eofbit;
1043
template <class _CharT, class _InputIterator>
1045
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
1047
ios_base::iostate& __err,
1048
unsigned short& __v) const
1051
int __base = this->__get_base(__iob);
1053
char_type __atoms[26];
1054
char_type __thousands_sep;
1055
string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
1057
__buf.resize(__buf.capacity());
1058
char* __a = &__buf[0];
1059
char* __a_end = __a;
1060
unsigned __g[__num_get_base::__num_get_buf_sz];
1061
unsigned* __g_end = __g;
1063
for (; __b != __e; ++__b)
1065
if (__a_end - __a == __buf.size())
1067
size_t __tmp = __buf.size();
1068
__buf.resize(2*__buf.size());
1069
__buf.resize(__buf.capacity());
1071
__a_end = __a + __tmp;
1073
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
1074
__thousands_sep, __grouping, __g, __g_end,
1078
if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
1081
__v = __num_get_unsigned_integral<unsigned short>(__a, __a_end, __err, __base);
1082
// Digit grouping checked
1083
__check_grouping(__grouping, __g, __g_end, __err);
1086
__err |= ios_base::eofbit;
1090
template <class _CharT, class _InputIterator>
1092
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
1094
ios_base::iostate& __err,
1095
unsigned int& __v) const
1098
int __base = this->__get_base(__iob);
1100
char_type __atoms[26];
1101
char_type __thousands_sep;
1102
string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
1104
__buf.resize(__buf.capacity());
1105
char* __a = &__buf[0];
1106
char* __a_end = __a;
1107
unsigned __g[__num_get_base::__num_get_buf_sz];
1108
unsigned* __g_end = __g;
1110
for (; __b != __e; ++__b)
1112
if (__a_end - __a == __buf.size())
1114
size_t __tmp = __buf.size();
1115
__buf.resize(2*__buf.size());
1116
__buf.resize(__buf.capacity());
1118
__a_end = __a + __tmp;
1120
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
1121
__thousands_sep, __grouping, __g, __g_end,
1125
if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
1128
__v = __num_get_unsigned_integral<unsigned int>(__a, __a_end, __err, __base);
1129
// Digit grouping checked
1130
__check_grouping(__grouping, __g, __g_end, __err);
1133
__err |= ios_base::eofbit;
1137
template <class _CharT, class _InputIterator>
1139
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
1141
ios_base::iostate& __err,
1142
unsigned long& __v) const
1145
int __base = this->__get_base(__iob);
1147
char_type __atoms[26];
1148
char_type __thousands_sep;
1149
string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
1151
__buf.resize(__buf.capacity());
1152
char* __a = &__buf[0];
1153
char* __a_end = __a;
1154
unsigned __g[__num_get_base::__num_get_buf_sz];
1155
unsigned* __g_end = __g;
1157
for (; __b != __e; ++__b)
1159
if (__a_end - __a == __buf.size())
1161
size_t __tmp = __buf.size();
1162
__buf.resize(2*__buf.size());
1163
__buf.resize(__buf.capacity());
1165
__a_end = __a + __tmp;
1167
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
1168
__thousands_sep, __grouping, __g, __g_end,
1172
if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
1175
__v = __num_get_unsigned_integral<unsigned long>(__a, __a_end, __err, __base);
1176
// Digit grouping checked
1177
__check_grouping(__grouping, __g, __g_end, __err);
1180
__err |= ios_base::eofbit;
1184
template <class _CharT, class _InputIterator>
1186
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
1188
ios_base::iostate& __err,
1189
unsigned long long& __v) const
1192
int __base = this->__get_base(__iob);
1194
char_type __atoms[26];
1195
char_type __thousands_sep;
1196
string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
1198
__buf.resize(__buf.capacity());
1199
char* __a = &__buf[0];
1200
char* __a_end = __a;
1201
unsigned __g[__num_get_base::__num_get_buf_sz];
1202
unsigned* __g_end = __g;
1204
for (; __b != __e; ++__b)
1206
if (__a_end - __a == __buf.size())
1208
size_t __tmp = __buf.size();
1209
__buf.resize(2*__buf.size());
1210
__buf.resize(__buf.capacity());
1212
__a_end = __a + __tmp;
1214
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
1215
__thousands_sep, __grouping, __g, __g_end,
1219
if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
1222
__v = __num_get_unsigned_integral<unsigned long long>(__a, __a_end, __err, __base);
1223
// Digit grouping checked
1224
__check_grouping(__grouping, __g, __g_end, __err);
1227
__err |= ios_base::eofbit;
1231
template <class _CharT, class _InputIterator>
1233
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
1235
ios_base::iostate& __err,
1238
// Stage 1, nothing to do
1240
char_type __atoms[32];
1241
char_type __decimal_point;
1242
char_type __thousands_sep;
1243
string __grouping = this->__stage2_float_prep(__iob, __atoms,
1247
__buf.resize(__buf.capacity());
1248
char* __a = &__buf[0];
1249
char* __a_end = __a;
1250
unsigned __g[__num_get_base::__num_get_buf_sz];
1251
unsigned* __g_end = __g;
1253
bool __in_units = true;
1255
for (; __b != __e; ++__b)
1257
if (__a_end - __a == __buf.size())
1259
size_t __tmp = __buf.size();
1260
__buf.resize(2*__buf.size());
1261
__buf.resize(__buf.capacity());
1263
__a_end = __a + __tmp;
1265
if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
1266
__decimal_point, __thousands_sep,
1267
__grouping, __g, __g_end,
1271
if (__grouping.size() != 0 && __in_units && __g_end-__g < __num_get_base::__num_get_buf_sz)
1274
__v = __num_get_float<float>(__a, __a_end, __err);
1275
// Digit grouping checked
1276
__check_grouping(__grouping, __g, __g_end, __err);
1279
__err |= ios_base::eofbit;
1283
template <class _CharT, class _InputIterator>
1285
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
1287
ios_base::iostate& __err,
1290
// Stage 1, nothing to do
1292
char_type __atoms[32];
1293
char_type __decimal_point;
1294
char_type __thousands_sep;
1295
string __grouping = this->__stage2_float_prep(__iob, __atoms,
1299
__buf.resize(__buf.capacity());
1300
char* __a = &__buf[0];
1301
char* __a_end = __a;
1302
unsigned __g[__num_get_base::__num_get_buf_sz];
1303
unsigned* __g_end = __g;
1305
bool __in_units = true;
1307
for (; __b != __e; ++__b)
1309
if (__a_end - __a == __buf.size())
1311
size_t __tmp = __buf.size();
1312
__buf.resize(2*__buf.size());
1313
__buf.resize(__buf.capacity());
1315
__a_end = __a + __tmp;
1317
if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
1318
__decimal_point, __thousands_sep,
1319
__grouping, __g, __g_end,
1323
if (__grouping.size() != 0 && __in_units && __g_end-__g < __num_get_base::__num_get_buf_sz)
1326
__v = __num_get_float<double>(__a, __a_end, __err);
1327
// Digit grouping checked
1328
__check_grouping(__grouping, __g, __g_end, __err);
1331
__err |= ios_base::eofbit;
1335
template <class _CharT, class _InputIterator>
1337
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
1339
ios_base::iostate& __err,
1340
long double& __v) const
1342
// Stage 1, nothing to do
1344
char_type __atoms[32];
1345
char_type __decimal_point;
1346
char_type __thousands_sep;
1347
string __grouping = this->__stage2_float_prep(__iob, __atoms,
1351
__buf.resize(__buf.capacity());
1352
char* __a = &__buf[0];
1353
char* __a_end = __a;
1354
unsigned __g[__num_get_base::__num_get_buf_sz];
1355
unsigned* __g_end = __g;
1357
bool __in_units = true;
1359
for (; __b != __e; ++__b)
1361
if (__a_end - __a == __buf.size())
1363
size_t __tmp = __buf.size();
1364
__buf.resize(2*__buf.size());
1365
__buf.resize(__buf.capacity());
1367
__a_end = __a + __tmp;
1369
if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
1370
__decimal_point, __thousands_sep,
1371
__grouping, __g, __g_end,
1375
if (__grouping.size() != 0 && __in_units && __g_end-__g < __num_get_base::__num_get_buf_sz)
1378
__v = __num_get_float<long double>(__a, __a_end, __err);
992
template <class _CharT, class _InputIterator>
993
template <class _Signed>
995
num_get<_CharT, _InputIterator>::__do_get_signed(iter_type __b, iter_type __e,
997
ios_base::iostate& __err,
1001
int __base = this->__get_base(__iob);
1003
char_type __atoms[26];
1004
char_type __thousands_sep;
1005
string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
1007
__buf.resize(__buf.capacity());
1008
char* __a = &__buf[0];
1009
char* __a_end = __a;
1010
unsigned __g[__num_get_base::__num_get_buf_sz];
1011
unsigned* __g_end = __g;
1013
for (; __b != __e; ++__b)
1015
if (__a_end - __a == __buf.size())
1017
size_t __tmp = __buf.size();
1018
__buf.resize(2*__buf.size());
1019
__buf.resize(__buf.capacity());
1021
__a_end = __a + __tmp;
1023
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
1024
__thousands_sep, __grouping, __g, __g_end,
1028
if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
1031
__v = __num_get_signed_integral<_Signed>(__a, __a_end, __err, __base);
1032
// Digit grouping checked
1033
__check_grouping(__grouping, __g, __g_end, __err);
1036
__err |= ios_base::eofbit;
1042
template <class _CharT, class _InputIterator>
1043
template <class _Unsigned>
1045
num_get<_CharT, _InputIterator>::__do_get_unsigned(iter_type __b, iter_type __e,
1047
ios_base::iostate& __err,
1048
_Unsigned& __v) const
1051
int __base = this->__get_base(__iob);
1053
char_type __atoms[26];
1054
char_type __thousands_sep;
1055
string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
1057
__buf.resize(__buf.capacity());
1058
char* __a = &__buf[0];
1059
char* __a_end = __a;
1060
unsigned __g[__num_get_base::__num_get_buf_sz];
1061
unsigned* __g_end = __g;
1063
for (; __b != __e; ++__b)
1065
if (__a_end - __a == __buf.size())
1067
size_t __tmp = __buf.size();
1068
__buf.resize(2*__buf.size());
1069
__buf.resize(__buf.capacity());
1071
__a_end = __a + __tmp;
1073
if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
1074
__thousands_sep, __grouping, __g, __g_end,
1078
if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
1081
__v = __num_get_unsigned_integral<_Unsigned>(__a, __a_end, __err, __base);
1082
// Digit grouping checked
1083
__check_grouping(__grouping, __g, __g_end, __err);
1086
__err |= ios_base::eofbit;
1092
template <class _CharT, class _InputIterator>
1093
template <class _Fp>
1095
num_get<_CharT, _InputIterator>::__do_get_floating_point(iter_type __b, iter_type __e,
1097
ios_base::iostate& __err,
1100
// Stage 1, nothing to do
1102
char_type __atoms[32];
1103
char_type __decimal_point;
1104
char_type __thousands_sep;
1105
string __grouping = this->__stage2_float_prep(__iob, __atoms,
1109
__buf.resize(__buf.capacity());
1110
char* __a = &__buf[0];
1111
char* __a_end = __a;
1112
unsigned __g[__num_get_base::__num_get_buf_sz];
1113
unsigned* __g_end = __g;
1115
bool __in_units = true;
1117
for (; __b != __e; ++__b)
1119
if (__a_end - __a == __buf.size())
1121
size_t __tmp = __buf.size();
1122
__buf.resize(2*__buf.size());
1123
__buf.resize(__buf.capacity());
1125
__a_end = __a + __tmp;
1127
if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
1128
__decimal_point, __thousands_sep,
1129
__grouping, __g, __g_end,
1133
if (__grouping.size() != 0 && __in_units && __g_end-__g < __num_get_base::__num_get_buf_sz)
1136
__v = __num_get_float<_Fp>(__a, __a_end, __err);
1379
1137
// Digit grouping checked
1380
1138
__check_grouping(__grouping, __g, __g_end, __err);