| 2724 | std::size_t const size = cs.used(begin); |
| 2725 | BOOST_ASSERT( !num_buf_.size() || precise_parsing ); |
| 2726 | BOOST_IF_CONSTEXPR( precise_parsing ) |
| 2727 | { |
| 2728 | char const* data = begin; |
| 2729 | std::size_t full_size = size; |
| 2730 | // if we previously suspended or if the current input ends with the |
| 2731 | // number, we need to copy the current part of the number to the |
| 2732 | // temporary buffer |
| 2733 | if(BOOST_JSON_UNLIKELY( num_buf_.size() )) |
| 2734 | { |
| 2735 | data = num_buf_.append( begin, size ); |
| 2736 | full_size = num_buf_.size(); |
| 2737 | } |
| 2738 | auto const err = detail::charconv::from_chars( |
| 2739 | data, data + full_size, d ); |
| 2740 | BOOST_ASSERT( err.ec != std::errc::invalid_argument ); |
| 2741 | BOOST_ASSERT( err.ptr == data + full_size ); |
| 2742 | (void)err; |
| 2743 | } |
| 2744 | else BOOST_IF_CONSTEXPR( no_parsing ) |
| 2745 | d = 0; |
| 2746 | else |
no test coverage detected