Lines Matching refs:idx

69 inline V as_integer_helper(const string& func, const S& str, size_t* idx, int base, F f) {
80 if (idx)
81 *idx = static_cast<size_t>(ptr - p);
86 inline V as_integer(const string& func, const S& s, size_t* idx, int base);
90 inline int as_integer(const string& func, const string& s, size_t* idx, int base) {
92 long r = as_integer_helper<long>(func, s, idx, base, strtol);
99 inline long as_integer(const string& func, const string& s, size_t* idx, int base) {
100 return as_integer_helper<long>(func, s, idx, base, strtol);
104 inline unsigned long as_integer(const string& func, const string& s, size_t* idx, int base) {
105 return as_integer_helper<unsigned long>(func, s, idx, base, strtoul);
109 inline long long as_integer(const string& func, const string& s, size_t* idx, int base) {
110 return as_integer_helper<long long>(func, s, idx, base, strtoll);
114 inline unsigned long long as_integer(const string& func, const string& s, size_t* idx, int base) {
115 return as_integer_helper<unsigned long long>(func, s, idx, base, strtoull);
121 inline int as_integer(const string& func, const wstring& s, size_t* idx, int base) {
123 long r = as_integer_helper<long>(func, s, idx, base, wcstol);
130 inline long as_integer(const string& func, const wstring& s, size_t* idx, int base) {
131 return as_integer_helper<long>(func, s, idx, base, wcstol);
135 inline unsigned long as_integer(const string& func, const wstring& s, size_t* idx, int base) {
136 return as_integer_helper<unsigned long>(func, s, idx, base, wcstoul);
140 inline long long as_integer(const string& func, const wstring& s, size_t* idx, int base) {
141 return as_integer_helper<long long>(func, s, idx, base, wcstoll);
145 inline unsigned long long as_integer(const string& func, const wstring& s, size_t* idx, int base) {
146 return as_integer_helper<unsigned long long>(func, s, idx, base, wcstoull);
153 inline V as_float_helper(const string& func, const S& str, size_t* idx, F f) {
164 if (idx)
165 *idx = static_cast<size_t>(ptr - p);
170 inline V as_float(const string& func, const S& s, size_t* idx = nullptr);
173 inline float as_float(const string& func, const string& s, size_t* idx) {
174 return as_float_helper<float>(func, s, idx, strtof);
178 inline double as_float(const string& func, const string& s, size_t* idx) {
179 return as_float_helper<double>(func, s, idx, strtod);
183 inline long double as_float(const string& func, const string& s, size_t* idx) {
184 return as_float_helper<long double>(func, s, idx, strtold);
189 inline float as_float(const string& func, const wstring& s, size_t* idx) {
190 return as_float_helper<float>(func, s, idx, wcstof);
194 inline double as_float(const string& func, const wstring& s, size_t* idx) {
195 return as_float_helper<double>(func, s, idx, wcstod);
199 inline long double as_float(const string& func, const wstring& s, size_t* idx) {
200 return as_float_helper<long double>(func, s, idx, wcstold);
206 int stoi(const string& str, size_t* idx, int base) { return as_integer<int>("stoi", str, idx, base); }
208 long stol(const string& str, size_t* idx, int base) { return as_integer<long>("stol", str, idx, base); }
210 unsigned long stoul(const string& str, size_t* idx, int base) {
211 return as_integer<unsigned long>("stoul", str, idx, base);
214 long long stoll(const string& str, size_t* idx, int base) { return as_integer<long long>("stoll", str, idx, base); }
216 unsigned long long stoull(const string& str, size_t* idx, int base) {
217 return as_integer<unsigned long long>("stoull", str, idx, base);
220 float stof(const string& str, size_t* idx) { return as_float<float>("stof", str, idx); }
222 double stod(const string& str, size_t* idx) { return as_float<double>("stod", str, idx); }
224 long double stold(const string& str, size_t* idx) { return as_float<long double>("stold", str, idx); }
227 int stoi(const wstring& str, size_t* idx, int base) { return as_integer<int>("stoi", str, idx, base); }
229 long stol(const wstring& str, size_t* idx, int base) { return as_integer<long>("stol", str, idx, base); }
231 unsigned long stoul(const wstring& str, size_t* idx, int base) {
232 return as_integer<unsigned long>("stoul", str, idx, base);
235 long long stoll(const wstring& str, size_t* idx, int base) { return as_integer<long long>("stoll", str, idx, base); }
237 unsigned long long stoull(const wstring& str, size_t* idx, int base) {
238 return as_integer<unsigned long long>("stoull", str, idx, base);
241 float stof(const wstring& str, size_t* idx) { return as_float<float>("stof", str, idx); }
243 double stod(const wstring& str, size_t* idx) { return as_float<double>("stod", str, idx); }
245 long double stold(const wstring& str, size_t* idx) { return as_float<long double>("stold", str, idx); }