MCPcopy Create free account
hub / github.com/boostorg/json / BOOST_IF_CONSTEXPR

Function BOOST_IF_CONSTEXPR

include/boost/json/basic_parser_impl.hpp:2726–2743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

parse_literalMethod · 0.70
parse_numberMethod · 0.70

Calls 2

sizeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected