Skip to content

Commit

Permalink
workaround for boostorg#750
Browse files Browse the repository at this point in the history
workaroud boostorg#750 by replacing `std::endl` with `'\n'`
  • Loading branch information
zhuoqiang authored Jan 14, 2023
1 parent 2f65e6e commit 9936693
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/boost/spirit/home/x3/support/utility/error_reporting.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace boost { namespace spirit { namespace x3
err_out << "In ";
}

err_out << "line " << line << ':' << std::endl;
err_out << "line " << line << ':' << '\n';
}

template <typename Iterator>
Expand All @@ -102,7 +102,7 @@ namespace boost { namespace spirit { namespace x3
}
typedef typename std::iterator_traits<Iterator>::value_type char_type;
std::basic_string<char_type> line{start, end};
err_out << x3::to_utf8(line) << std::endl;
err_out << x3::to_utf8(line) << '\n';
}

template <typename Iterator>
Expand Down Expand Up @@ -165,12 +165,12 @@ namespace boost { namespace spirit { namespace x3
Iterator last = pos_cache.last();

print_file_line(position(err_pos));
err_out << error_message << std::endl;
err_out << error_message << '\n';

Iterator start = get_line_start(first, err_pos);
print_line(start, last);
print_indicator(start, err_pos, '_');
err_out << "^_" << std::endl;
err_out << "^_" << '\n';
}

template <typename Iterator>
Expand All @@ -181,13 +181,13 @@ namespace boost { namespace spirit { namespace x3
Iterator last = pos_cache.last();

print_file_line(position(err_first));
err_out << error_message << std::endl;
err_out << error_message << '\n';

Iterator start = get_line_start(first, err_first);
print_line(start, last);
print_indicator(start, err_first, ' ');
print_indicator(start, err_last, '~');
err_out << " <<-- Here" << std::endl;
err_out << " <<-- Here" << '\n';
}

}}}
Expand Down

0 comments on commit 9936693

Please sign in to comment.