MCPcopy Create free account
hub / github.com/boostorg/parser / read

Function read

include/boost/parser/detail/text/transcode_iterator.hpp:3149–3220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3147 }
3148
3149 constexpr void read()
3150 {
3151 I initial;
3152 if constexpr (
3153#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
3154 std::forward_iterator<I>
3155#else
3156 is_forward<I>
3157#endif
3158 ) {
3159 initial = curr();
3160 }
3161 if constexpr (noexcept(ErrorHandler{}(""))) {
3162 char32_t cp = decode_code_point();
3163 auto it = encode_code_point(cp, buf_.begin());
3164 buf_index_ = 0;
3165 buf_last_ = uint8_t(it - buf_.begin());
3166 } else {
3167#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
3168 auto buf = buf_;
3169 try {
3170#endif
3171 char32_t cp = decode_code_point();
3172 auto it = encode_code_point(cp, buf_.begin());
3173 buf_index_ = 0;
3174 buf_last_ = it - buf_.begin();
3175#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
3176 } catch (...) {
3177 buf_ = buf;
3178 curr() = initial;
3179 throw;
3180 }
3181#endif
3182 }
3183 if constexpr (
3184#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
3185 std::forward_iterator<I>
3186#else
3187 is_forward<I>
3188#endif
3189 ) {
3190 curr() = initial;
3191 }
3192 }
3193
3194 constexpr void read_reverse()
3195 {
3196 auto initial = curr();
3197 if constexpr (noexcept(ErrorHandler{}(""))) {
3198 char32_t cp = decode_code_point_reverse();
3199 auto it = encode_code_point(cp, buf_.begin());
3200 buf_last_ = uint8_t(it - buf_.begin());
3201 buf_index_ = buf_last_ - 1;
3202 to_increment_ = (int)std::distance(curr(), initial);
3203 } else {
3204#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
3205 auto buf = buf_;
3206 try {

Callers 1

Calls 5

currFunction · 0.85
decode_code_pointFunction · 0.85
encode_code_pointFunction · 0.85
distanceFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected