Changeset c5b2b05 in mainline for uspace/lib/cpp/include/internal/locale/num_get.hpp
- Timestamp:
- 2018-07-05T21:41:19Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6c242c3
- Parents:
- 8d0953f
- git-author:
- Dzejrou <dzejrou@…> (2018-01-05 23:03:21)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/internal/locale/num_get.hpp
r8d0953f rc5b2b05 36 36 #include <limits> 37 37 38 extern "C" { 39 #include <errno.h> 40 } 41 38 42 namespace std 39 43 { … … 281 285 template<class BaseType, class T> 282 286 iter_type get_integral_(iter_type in, iter_type end, ios_base& base, 283 ios_base::iostate err, T& v) const287 ios_base::iostate& err, T& v) const 284 288 { 285 289 BaseType res{}; … … 295 299 if (size > 0) 296 300 { 301 int ret{}; 297 302 if constexpr (is_signed<BaseType>::value) 298 str_int64_t(base.buffer_, nullptr, num_base, false, &res); 299 else 300 str_uint64_t(base.buffer_, nullptr, num_base, false, &res); 301 302 if (res > static_cast<BaseType>(numeric_limits<T>::max())) 303 ret = str_int64_t(base.buffer_, nullptr, num_base, false, &res); 304 else 305 ret = str_uint64_t(base.buffer_, nullptr, num_base, false, &res); 306 307 if (ret != EOK) 308 { 309 err |= ios_base::failbit; 310 v = 0; 311 } 312 else if (res > static_cast<BaseType>(numeric_limits<T>::max())) 303 313 { 304 314 err |= ios_base::failbit;
Note:
See TracChangeset
for help on using the changeset viewer.